Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions emulator does not print updated HTTPS urls on region change #1436

Closed
abeisgoat opened this issue Jun 25, 2019 · 5 comments
Closed

Comments

@abeisgoat
Copy link
Contributor

  1. Make an HTTPS function with no region
  2. See the URL default to "us-central1"
  3. Change the code to have functions.region("asia-northeast1").https.onRequest
  4. The new URL is never printed.
@abeisgoat abeisgoat self-assigned this Jun 25, 2019
@samtstern
Copy link
Contributor

@abeisgoat do regions besides us-central1 ever work?

@abeisgoat
Copy link
Contributor Author

Yes they do, we completely drop the region from our routing, so any region will work

@akauppi
Copy link

akauppi commented Jul 22, 2020

I recently noticed that if I want to have Cloud Functions work both online, and during emulation, I must do this:

const fns = window.LOCAL ? firebase.app().functions(/*functionsRegion*/) :
  firebase.app().functions(functionsRegion);

If I mention the region when the back-end is emulated, nothing happens. Commenting it out (as above) makes the functions work. Naturally, I would like to have the same code base, regardless whether the back end is emulated, or not.

Is this connected to the current issue? Should I enter a new one?

@samtstern
Copy link
Contributor

@akauppi that sounds like a separate issue, please file a new one!

@samtstern
Copy link
Contributor

I believe this should be fixed by #3364 which adds better support for multiple regions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants