Firebase-tools: An unexpected error has occurred on deploy

Created on 21 Apr 2019  路  20Comments  路  Source: firebase/firebase-tools

Just making firebase --deploy as usual and got this error. Update to latest version of firebase-tools but still the same error. What could be wrong?

[debug] [2019-04-21T11:45:53.781Z] TypeError: Cannot read property 'match' of undefined
    at exports.getAppEngineLocation (/usr/local/lib/node_modules/firebase-tools/lib/functionsConfig.js:41:27)
    at module.exports (/usr/local/lib/node_modules/firebase-tools/lib/deploy/functions/release.js:83:29)
    at _chain (/usr/local/lib/node_modules/firebase-tools/lib/deploy/index.js:22:40)
    at /usr/local/lib/node_modules/firebase-tools/lib/deploy/index.js:69:16
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:229:7)
[error] 
[error] Error: An unexpected error has occurred.

ps: I'm trying to move from Node 6 to Node 8

ongoing bug

Most helpful comment

worked for me after upgrading to 6.7.1, thank you guys!

All 20 comments

same issue here:

CLI Version: 6.7.0
Node Version: v10.15.1

same here:

CLI Version: 6.7.0
Node Version: v11.14.0

same here:

CLI Version: 6.7.0
Node Version: v8.16.0

Same here, looks like exports.getAppEngineLocation is return undefined.

Anyone experiencing this issue: can you please visit the Firebase console for your project, click the gear, go to Project Settings and let me know what the "Cloud Firestore location" is? It might be something like nam5 (us-central) or might be something else.

This will help us diagnose whether the fix in #1211 will address your problem. Thanks!

@mbleigh Where can I find that information?

@sarunw in the "Project Settings" (click the gear at the top left). Sorry I should have been more clear :smile:

For anyone having issues finding the Cloud Firestore location:
Screen Shot 2019-04-22 at 9 56 41 AM
Screen Shot 2019-04-22 at 9 58 40 AM

@mbleigh I don't have that "Cloud Firestore location" !! But my project have firestore enabled.

Thanks @sarunw, that is super helpful to know

@mbleigh For this project there is no such field in Firebase console settings page.
Other projects have "nam5 (us-central)". And they updated without any issue.
What should I do for project without "location"?

I believe this is indeed the cause of the issue. We are validating a potential fix and think we know the cause, but if you want to work around this you can:

  1. Install an old version of the Firebase CLI npm install -g [email protected]. Note you won't be able to deploy scheduled functions this way.
  2. Go to the Database tab in the Firebase console and set up a Firestore database (this will likely create the missing location value).

@mbleigh second option didn't help, will try to install firebase-tools 6.6.0

Updated: yes, after update to firebase-tools 6.6.0 deploy was successfully completed. Thank you for advise!

Hi all, thank you for your patience. We have done some investigating and this is a bug in one of our systems that keeps track of project data and we are following up with the internal teams to resolve this issue (Internal bug reference: 131100956). Meanwhile, we are planning to release a mitigating fix today in https://github.com/firebase/firebase-tools/pull/1211. This fix should unblock all non-scheduled functions deployments. However, you may still experience issues deploying scheduled functions (this is the new feature that was released in 6.7.0). If you experience issues deploying scheduled functions, a workaround would be to create a new project and deploy the functions there. I know this is not ideal but we are working hard to resolve this for all projects! Thanks again everyone.

Version 6.7.1 of the CLI has been released -- please give it a try and let us know if you're still having issues.

worked for me after upgrading to 6.7.1, thank you guys!

Deployed successfully after upgrade to 6.7.1, but Cloud Firestore location still not show in project settings.

Thank you, it worked for me.

Thank you!

thank you.

Was this page helpful?
0 / 5 - 0 ratings