firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

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

Open ghost opened this issue 8 years ago • 62 comments

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

ghost avatar Aug 14 '18 13:08 ghost

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 avatar Aug 14 '18 14:08 mbleigh

@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

ghost avatar Aug 14 '18 15:08 ghost

Here are the failure logs: https://travis-ci.org/ampproject/docs/jobs/415953980#L7375-L7424

rsimha avatar Aug 14 '18 15:08 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?

mbleigh avatar Aug 14 '18 15:08 mbleigh

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

rsimha avatar Aug 14 '18 16:08 rsimha

Resolved. Needed new auth token.

ghost avatar Aug 14 '18 16:08 ghost

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.

arthabus avatar Sep 17 '18 21:09 arthabus

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.

Berlioz avatar Sep 17 '18 22:09 Berlioz

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!

arthabus avatar Sep 17 '18 22:09 arthabus

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

neer17 avatar Oct 01 '18 07:10 neer17

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-quotient avatar Nov 29 '18 07:11 ajayarajan-quotient

@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.

bkendall avatar Nov 29 '18 18:11 bkendall

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/

liron-navon avatar Feb 06 '19 10:02 liron-navon

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

echofrost38 avatar Feb 06 '19 10:02 echofrost38

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.

robjr avatar Feb 06 '19 10:02 robjr

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

shavik avatar Feb 06 '19 11:02 shavik

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...

tsavo-vdb-knott avatar Feb 06 '19 11:02 tsavo-vdb-knott

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

nm I found it here

StickNitro avatar Feb 06 '19 11:02 StickNitro

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

equidevium avatar Feb 06 '19 11:02 equidevium

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 .

tsavo-vdb-knott avatar Feb 06 '19 11:02 tsavo-vdb-knott