`getAppEngineLocation` always returns 'us-central1'
See original GitHub issue[REQUIRED] Environment info
firebase-tools: 7.1.0
Platform: macOS Mojave 10.14.5, Node v8.15.1
[REQUIRED] Test case
Deploy a cloud functions project (with scheduled functions) with an app engine location set to another region (e.g. europe-west1
)
[REQUIRED] Steps to reproduce
firebase deploy --force --only functions --project some_project_id
[REQUIRED] Expected behavior
The function should return the location of the app engine found within context.firebaseConfig
.
e.g. App engine location set to europe-west1
should return europe-west1
[REQUIRED] Actual behavior
The function returns the default us-central1
value.
[2019-07-12T15:24:13.299Z] Error Context: {
"body": {
"error": {
"code": 400,
"message": "Location must equal europe-west1 because the App Engine app that is associated with this project is located in europe-west1",
"status": "INVALID_ARGUMENT"
}
},
"response": {
"statusCode": 400,
"body": {
"error": {
"code": 400,
"message": "Location must equal europe-west1 because the App Engine app that is associated with this project is located in europe-west1",
"status": "INVALID_ARGUMENT"
}
},
"headers": {
"vary": "X-Origin, Referer, Origin,Accept-Encoding",
"content-type": "application/json; charset=UTF-8",
"date": "Fri, 12 Jul 2019 15:24:13 GMT",
"server": "ESF",
"cache-control": "private",
"x-xss-protection": "0",
"x-frame-options": "SAMEORIGIN",
"x-content-type-options": "nosniff",
"alt-svc": "quic=\":443\"; ma=2592000; v=\"46,43,39\"",
"accept-ranges": "none",
"transfer-encoding": "chunked"
},
"request": {
"uri": {
"protocol": "https:",
"slashes": true,
"auth": null,
"host": "cloudscheduler.googleapis.com",
"port": 443,
"hostname": "cloudscheduler.googleapis.com",
"hash": null,
"search": null,
"query": null,
"pathname": "/v1beta1/projects/some_project_id/locations/us-central1/jobs/firebase-schedule-functionName-europe-west1",
"path": "/v1beta1/projects/some_project_id/locations/us-central1/jobs/firebase-schedule-functionName-europe-west1",
"href": "https://cloudscheduler.googleapis.com/v1beta1/projects/some_project_id/locations/us-central1/jobs/firebase-schedule-functionName-europe-west1"
},
"method": "PATCH"
}
}
}
It seems as though the context.firebaseConfig
does not have a cloudResourceLocation
field (which is being used to identify the AppEngineLocation) so it is always returning undefined
. Changing that field to locationId
fixed this issue for me.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:18 (4 by maintainers)
Top Results From Across the Web
Returns – Our Place - US
Your item must be shipped back securely to our facility. Any items that are requested to be shipped back and are not returned...
Read more >Return an item - Google Store Help
You can return most items you bought from the Google Store within 15 calendar days after the day you receive it. Returns are...
Read more >Returns & Refunds - Shopping Help - Apple
Find out how you can return an item, how long the refund process takes, what to do if your invoice is not with...
Read more >Returns and Refunds - Customer Care
Use the pre-paid UPS Return Label included in your order and leave the ... but you can always return it by following the...
Read more >HP.com returns & refunds | HP® Official Store
Download and print your prepaid shipping label. HP Returns - Step 3. Step 3. Place all items in original packaging and add your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@joehan solution from @PatNeedham isn’t working for me, I’m using firebase 7.8.2 and I’ve set region of GCP in Firebase console.
Here’s detailed log:
And with .region(‘europe-west1’):
@MaffooBristol I heard back from Firebase support after my last comment on this thread, and the response I got helped eliminate the issue:
On the https://console.firebase.google.com/u/0/project/PROJECT-ID/settings/general/ page - I set it to us-east4 and the Firebase functions deployments have been error-free since then thankfully!