"Invalid environment URL - this URL is not available" when migrating to use environments

On an older project I was prompted to change to the new environments:

However when I press Yes, I get this error:

Invalid environment URL - this URL is not available

I get the same error when I want to delete the Default environment.

Any ideas what is going on here?

PS The reason in the first place to want to change the environment was because an HTTP api this app provided ceased to work.