Firebase-tools: Firebase deploy fails with "Error: HTTP Error: 500, Internal error encountered."

Created on 14 Aug 2018  ·  62Comments  ·  Source: firebase/firebase-tools

When deploying our site today on Travis CI, our deployment fails with the following error:

Error: HTTP Error: 500, Internal error encountered.

Version info

[email protected]

Platform Information

Linux on Travis CI

Log is here

Note: The build last night that used v. 4.0.3 worked correctly.

cc: @pbakaus, @crystalfaith

Most helpful comment

This could be useless now, but for anyone who might visit here, in my case the hosting service was down (yea, I didn't believe google services can be brought down either ), you can see what services are down here:

https://status.firebase.google.com/

All 62 comments

We're going to need debug logs to be able to diagnose the problems here -- can you either flip on --debug in the CI build or alternatively make sure it is keeping firebase-debug.log as an artifact during failed builds?

@mbleigh - Please check out the details in https://travis-ci.org/ampproject/docs/jobs/415953980, which I hope provides the details you need.

cc: @rsimha

How (and when) did you generate the auth token that you're using in the CI system? Will it work if you generate a new one with firebase login:ci?

New token generated. Build in progress: https://travis-ci.org/ampproject/docs/builds/415999283

Resolved. Needed new auth token.

Just faced the same issue. Relogin/updating token didn't solve it.

here is the log: firebase-debug.log

It was working yesterday but today we've updated firebase-tools to v4.3.1 (from v3.*). It works for our dev version of the project (basically a separate firebase project) but not for prod.

Please advice on possible solutions.

EDIT
We are able to deploy functions, but not hosting:

firebase deploy --only hosting fails with the attached log and with the "500 internal error" message
firebase deploy --only functions works as expected

Again the same codebase deploys without issues into the alternative dev project.
Reverting to the previously deployed code doesn't solve the problem.

It's difficult to tell for sure from my standpoint, but I suspect that your issue has something to do with nonstandard IAM permissions being set on the user attempting to do the deploy. Try doing the deploy with a user that has the Editor permission on the corresponding Cloud project? If you reach out to Firebase Support and open a case referencing this issue, they'll have the accesses required to help you troubleshoot your IAM permissions in greater detail.

If that doesn't work, as a temporary workaround, you should be able to temporarily downgrade firebase-tools to a 3.x release using npm with npm install -g [email protected] or whatever version you used to be on.

Thanks @Berlioz - downgrading resolved the issue for now!

Though we are looking to use function custom timeout from the code which requires firebase-tool 4+
The permission is set to "Owner" actually. I'll file an issue to support as well.

Thanks again for the quick and helpful reply!

Deploying functions later some time resolved my problem. This may be an internal firebase bug.

Hi, I`m getting the following error while using FirebaseMessaging.sendAsyc

com.google.firebase.messaging.FirebaseMessagingException: Internal error encountered.
at com.google.firebase.messaging.FirebaseMessaging.handleSendHttpError(FirebaseMessaging.java:290)
at com.google.firebase.messaging.FirebaseMessaging.access$600(FirebaseMessaging.java:55)
at com.google.firebase.messaging.FirebaseMessaging$1.execute(FirebaseMessaging.java:259)
at com.google.firebase.messaging.FirebaseMessaging$1.execute(FirebaseMessaging.java:240)
at com.google.firebase.internal.CallableOperation.call(CallableOperation.java:36)
at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:108)
at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:41)
at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:77)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.google.api.client.http.HttpResponseException: 500 Internal Server Error
{
"error": {
"code": 500,
"message": "Internal error encountered.",
"errors": [
{
"message": "Internal error encountered.",
"domain": "global",
"reason": "backendError"
}
],
"status": "INTERNAL"
}
}
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1070)

what could be the issue here, any response will be highly appreciated

@ajayarajan This is not the appropriate venue for that question. You will find StackOverflow or the appropriate channel in the Firebase Community a better place.

This could be useless now, but for anyone who might visit here, in my case the hosting service was down (yea, I didn't believe google services can be brought down either ), you can see what services are down here:

https://status.firebase.google.com/

yes, having same trouble now, looks like firebase is under weather :)

same as you @liron-navon, after trying many things to make it work, I was about to contact the support when I saw on the status page that some services were down.

hosting is down. but if you are deploying only functions using
firebase deploy --only functions will work.

ROFL ! I'm so happy you just posted that! Holy shit I have a beta onboarding this morning! @shavik
Was freaking out because I thought I broke something...

Same as @T-Knott-Mesh I thought I broke something, does firebase have a status page for services?

nm I found it here

Yeap firebase is down. Hard to believe that this happened.

I can't believe it ! Hahahahaha oh well, it happens. I'm sure they are all
freaking out rn hahahaha.

On Wed, Feb 6, 2019, 6:31 AM equidevium <[email protected] wrote:

Yeap firebase is down. Hard to believe that this happened.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/firebase/firebase-tools/issues/865#issuecomment-460991456,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AZTSE_X1pe8gvJrZcmKRM64q5dkHl_yFks5vKr0sgaJpZM4V8aLt
.

Is there anyway I can edit code in the server instead of having to deploy? I need to fix a bug.

Encountering the same problem getting this error

Error: HTTP Error: 500, Internal error encountered.

Error: HTTP Error: 500, Internal error encountered.
Same Problem I'm facing when i hosting my project in firebase server

how soon are they gonna be down????

Thank you for posting that it is down! I have been trying for the last 30 minutes to get this deployed through our CI.

haha i thought it was my network
Good that this site https://status.firebase.google.com/ exists

Haha I thought Iam fired 8-D

Enjoyed reading your comments :smile: :laughing:
You can check the current status here: https://status.firebase.google.com/incident/Hosting/19006

Good to know that they have a status page, hopefully they'll fix it soon :)

https://status.firebase.google.com/incident/Hosting/19006

its very tough time for me :-(

Is there anyway I can edit code in the server instead of having to deploy? I need to fix a bug.

I dont think that you can do something like an ssh in Firebase. And even if we were able to, I don't think that would help at all since in at least in "our" case we are deploying not the raw source code but a built compiled version of our app.

Thank you all for your patience as we are working through this. The status page is indeed the best source of updates when it comes to things like this. This particular incident is being mitigated but takes a bit of time to fully roll out. Keep an eye on that page for further updates.

Mitigation is rolled out! Issue is resolved https://status.firebase.google.com/incident/Hosting/19006

Same error! I have tried with several versions of firebase-tools and same problem.

I tried firebase deploy --only functions and it worked

It hasn't been working for me for the last 20 minutes or so.

I am facing same problem now, even when their website says service is normal.

Thanks for the reports folks. There's a newer issue that's tied to the 500 errors today that I'd like to keep this activity on, so if you're having issues to day (August 19, 2019 - huh, almost exactly a year later for this bug), go to #1609.

We're aware and we're working on it. Sorry for the inconvenience 😕. Stay tuned to #1609 for more updates.

I'm annoyed that the status page doesn't acknowledge the issue. Don't care about the reply here. Update the status page first.

Compounding the issue for me, I deleted my staging site in an effort to fix it (for some reason it worked after I did that, go figure) and it wouldn't let me create a new one with the same name, even in the same project, so now I have to tell everyone to use the new URL.

I am getting the same error when using 'firebase deploy'

`[info] + database: rules syntax for database is valid
[debug] [2019-08-21T14:52:22.716Z] >>> HTTP REQUEST POST https://firebasehosting.googleapis.com/v1beta1/sites//versions

[debug] [2019-08-21T14:52:23.713Z] <<< HTTP RESPONSE 500
[debug] [2019-08-21T14:52:23.714Z] <<< HTTP RESPONSE BODY
[error]
[error] Error: HTTP Error: 500, Internal error encountered.
[debug] [2019-08-21T14:52:23.855Z] Error Context: {
"body": {
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
},
"response": {
"statusCode": 500,
"body": {
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
},
"headers": {
"vary": "X-Origin, Referer, Origin,Accept-Encoding",
"content-type": "application/json; charset=UTF-8",
"date": "Wed, 21 Aug 2019 14:52:23 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": "firebasehosting.googleapis.com",
"port": 443,
"hostname": "firebasehosting.googleapis.com",
"hash": null,
"search": null,
"query": null,
"pathname": "/v1beta1/sites//versions",
"path": "/v1beta1/sites//versions",
"href": "https://firebasehosting.googleapis.com/v1beta1/sites//versions"
},
"method": "POST"
}
}
}`

Same here

I am getting the same error when using 'firebase deploy'

`[info] + database: rules syntax for database is valid
[debug] [2019-08-21T14:52:22.716Z] >>> HTTP REQUEST POST https://firebasehosting.googleapis.com/v1beta1/sites//versions

[debug] [2019-08-21T14:52:23.713Z] <<< HTTP RESPONSE 500
[debug] [2019-08-21T14:52:23.714Z] <<< HTTP RESPONSE BODY
[error]
[error] Error: HTTP Error: 500, Internal error encountered.
[debug] [2019-08-21T14:52:23.855Z] Error Context: {
"body": {
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
},
"response": {
"statusCode": 500,
"body": {
"error": {
"code": 500,
"message": "Internal error encountered.",
"status": "INTERNAL"
}
},
"headers": {
"vary": "X-Origin, Referer, Origin,Accept-Encoding",
"content-type": "application/json; charset=UTF-8",
"date": "Wed, 21 Aug 2019 14:52:23 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": "firebasehosting.googleapis.com",
"port": 443,
"hostname": "firebasehosting.googleapis.com",
"hash": null,
"search": null,
"query": null,
"pathname": "/v1beta1/sites//versions",
"path": "/v1beta1/sites//versions",
"href": "https://firebasehosting.googleapis.com/v1beta1/sites//versions"
},
"method": "POST"
}
}
}`

Same here. HTTP Error: 500

Looks like there's a bunch of us getting a 500 in the last 30 minutes. Looks like Firebase is having an issue.

Yes I am also getting a 500 error.

Also see #1609

Brazil is off too. Getting error HTTP 500: Internal error on deploying to firebase hosting. It started by 12:00 PM

Same here

I was getting the same error 5 minutes ago but now it's working fine.

I was getting the same error 5 minutes ago but now it's working fine.

let me try

I have tested again and now I'm getting the same error. What's going on.....

I was getting the same error 5 minutes ago but now it's working fine.

nope same here in argentina

I'm still getting 500 error from Japan

now it's working for me again. I guess the development team is testing the issue by enabling/disabling access to deploy.

Oh, thank you now it's working fine for me as well.

WORKING FINE NOW!

Can confirm working again. Thanks for the fix.

This is happening again!

Same for me, error 500 on several projects

Seems to be back up! It actually did deploy, but I tried again as it appeared to happen way too quickly and it seems to be failing still.

@MrDrummer not for me in France :/

happening again now for me in Italy,
but "--only functions" works well

Seems to be working again now.

Quite ironic, as I was trying to deploy our dependencies status dashboard, which includes GCP and firebase!

Hey everyone just FYI: if you get 500 errors using Firebase services you should always do this:

1) Check the status dashboard and see if it's a known incident.
2) If there's nothing there, write in to Firebase support

500 errors mean that the backend is experiencing an unexpected issue and GitHub is not a great place to get help with urgent issues like that, especially since none of our backend code is on GitHub.

Was this page helpful?
0 / 5 - 0 ratings