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

Firebase function location not work #558

Open
mickaelponsolle opened this issue Jun 29, 2021 · 3 comments
Open

Firebase function location not work #558

mickaelponsolle opened this issue Jun 29, 2021 · 3 comments

Comments

@mickaelponsolle
Copy link

Version

"nuxt": "^2.15.7",
"firebase": "^7.24.0",
"@nuxtjs/firebase": "^6.1.1",

Steps to reproduce

Hi all !
I'm currently developing an SSR app deployed on Firebase (Hosting and Functions)
I can deploy on the default location of Firebase functions (us-central1).
But , as my users are in Europe, I want to deploy my app on a european location like europe-west1.
I have followed the documentation of nuxt-firebase https://firebase.nuxtjs.org/service-options/functions/ and also https://firebase.google.com/docs/functions/locations#best_practices_for_changing_region
The app is deployed but when I want to access to the app, I have a 403 error (Forbidden).

I missed surely something but I don't know what.
I think to try another hosting solution : Cloud Run or App Engine. But it would be a pity to drop the firebase solution.

Have you some examples or hints for Firebase function location ?

@simeon9696
Copy link

Did you call the function from the client properly?

var functions = firebase.app().functions('europe-west1');

@adarsh4d
Copy link

adarsh4d commented Jul 4, 2021

Also, check if you have hosted the function in the correct location europe-west1 on your firebase console.

There is a chance you might have hosted the function in us-central1, but trying to call it from europe-west1

@ChrisvdLeij
Copy link

ChrisvdLeij commented Aug 11, 2021

Had the same issue. I was using this.$fireModule.functions.. which doesn't use the location set in the config.

The solution for me was to use this.$fire.functions. Which makes use of the location set in the config.

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

No branches or pull requests

4 participants