Cannot choose region on launch

Hi there,
When lauching my app (for the first time!), I can’t seem to choose a region. Even entering enter on default choice, I still get the “Error Validation failed: Name is invalid”.
Does anybody know from where that could come from?


Strange. Assuming there’s not some temporary fault, you could try setting the region using the CLI. That shouldn’t be necessary as lhr is clearly a valid value, so be interesting to see if that works:

fly launch --region lhr

If not, try fly doctor and see if that reports any issues at your end.

Unless … by ‘name’ it’s actually referring to the app name, rather than the region name :thinking: Do you have a fly.toml file already? Does it have an app = "x"? If so, check that name is alphanumeric/hyphens. Not 100% of the allowed characters, but safe names would be e.g my-app and not special characters etc. Could be that.

1 Like

This looks like a problem with the app name, as @greg says. Are there any underscores in your app name, by any chance?

1 Like

Thanks for your ideas!

fly launch --region lhr did not work either.
fly doctor did not report any issue (see response below).

Testing authentication token... PASSED
Testing flyctl agent... PASSED
Testing local Docker instance... Nope
Pinging WireGuard gateway (give us a sec)... PASSED

and finally, I’ve actually defined my app name, and it is in CamelCase.

Any other idea or is my installation of fly cursed? :’)

Hmm. Well it may be that Fly requires the app name to be lower-case. So, not camel case. No idea, but that’s definitely worth trying e.g instead of

app = "MyApp"

… instead do …

app = "my-app"

… and try another deploy. Does that fix it? It may be as simple as that. If not, er, not sure. One for Fly.

I think that might be it! App names are only allowed to contain lowercase, numbers and hyphens.

this is because they’re used for dns. here’s a good discussion on this:

1 Like

That fixed it! Thanks :slight_smile:

1 Like