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 david-potgieter opened this issue 7 years ago • 2 comments

[REQUIRED] Environment info

Firebase --version: 6.3.1 node -v: v8.11.2 npm -v: 5.6.0

macOS

[REQUIRED] Test case

Not provided

[REQUIRED] Steps to reproduce

Project stopped deploy today, no code changes

[REQUIRED] Expected behavior

firebase deploy (does not work) firebase deploy --only functions (works) firebase deploy --only hosting (does not work)

We have done firebase login/logout, firebase list and firebase use XXXPROJECTXXX prior to this.

Our external CI environment also fails - so it's not local network changes.

A code version from a week ago that was deployed successfully also fails. Just to stress it's not code related.

[REQUIRED] Actual behavior

[debug] [2019-02-06T10:22:31.365Z] ----------------------------------------------------------------------
[debug] [2019-02-06T10:22:31.367Z] Command:       /Users/david/.nvm/versions/node/v8.11.2/bin/node /Users/david/.nvm/versions/node/v8.11.2/bin/firebase deploy --only hosting
[debug] [2019-02-06T10:22:31.367Z] CLI Version:   6.3.1
[debug] [2019-02-06T10:22:31.367Z] Platform:      darwin
[debug] [2019-02-06T10:22:31.367Z] Node Version:  v8.11.2
[debug] [2019-02-06T10:22:31.367Z] Time:          Wed Feb 06 2019 11:22:31 GMT+0100 (CET)
[debug] [2019-02-06T10:22:31.367Z] ----------------------------------------------------------------------
[debug] 
[debug] [2019-02-06T10:22:31.374Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2019-02-06T10:22:31.374Z] > authorizing via signed-in user
[debug] [2019-02-06T10:22:31.374Z] [iam] checking project XXXPROJECTXXX for permissions ["firebase.projects.get","firebasehosting.sites.update"]
[debug] [2019-02-06T10:22:31.376Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/XXXPROJECTXXX:testIamPermissions  

[debug] [2019-02-06T10:22:32.158Z] <<< HTTP RESPONSE 200
[debug] [2019-02-06T10:22:32.159Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects/XXXPROJECTXXX  
 
[debug] [2019-02-06T10:22:32.393Z] <<< HTTP RESPONSE 200
[info] 
[info] === Deploying to 'XXXPROJECTXXX...
[info] 
[info] i  deploying hosting
[debug] [2019-02-06T10:22:37.696Z] >>> HTTP REQUEST POST https://firebasehosting.googleapis.com/v1beta1/sites/XXXPROJECTXXX/versions  

[debug] [2019-02-06T10:22:38.632Z] <<< HTTP RESPONSE 500
[debug] [2019-02-06T10:22:38.632Z] <<< HTTP RESPONSE BODY
[error] 
[error] Error: HTTP Error: 500, Internal error encountered.
[debug] [2019-02-06T10:22:38.635Z] 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, 06 Feb 2019 10:22:38 GMT",
      "server": "ESF",
      "cache-control": "private",
      "x-xss-protection": "1; mode=block",
      "x-frame-options": "SAMEORIGIN",
      "x-content-type-options": "nosniff",
      "alt-svc": "quic=\":443\"; ma=2592000; v=\"44,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/XXXPROJECTXXX/versions",
        "path": "/v1beta1/sites/XXXPROJECTXXX/versions",
        "href": "https://firebasehosting.googleapis.com/v1beta1/sites/XXXPROJECTXXX/versions"
      },
      "method": "POST"
    }
  }
}

Edit: I get a 200 response following instructions here: https://github.com/firebase/firebase-tools/issues/689#issuecomment-371240373

david-potgieter avatar Feb 06 '19 11:02 david-potgieter

I'm having the same problem. Our CI environment successfully deployed at 8:41:51 CET today but started failing at 10:02:31 CET.

CI runs this Dockerfile:

FROM node:carbon-alpine
RUN npm install -g firebase-tools
ENTRYPOINT ["/usr/local/bin/firebase"]

I also can't deploy from my local machine. Firebase ver. 4.x.x - 6.x.x: 500 internal error Firebase ver. 3.x.x and below: deploy hangs and never finishes OS: macOS Node: 9.10.1 npm: 6.1.0

Debug output v. 3.19.1:

[2019-02-06T12:25:11.361Z] ----------------------------------------------------------------------
[2019-02-06T12:25:11.366Z] Command:       /usr/local/bin/node /usr/local/bin/firebase deploy --debug
[2019-02-06T12:25:11.366Z] CLI Version:   3.19.3
[2019-02-06T12:25:11.366Z] Platform:      darwin
[2019-02-06T12:25:11.366Z] Node Version:  v9.10.1
[2019-02-06T12:25:11.367Z] Time:          Wed Feb 06 2019 13:25:11 GMT+0100 (CET)
[2019-02-06T12:25:11.367Z] ----------------------------------------------------------------------

[2019-02-06T12:25:11.384Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2019-02-06T12:25:11.385Z] > authorizing via signed-in user
[2019-02-06T12:25:11.387Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/XXXPROJECTXXX
  
 Wed Feb 06 2019 13:25:11 GMT+0100 (CET)
[2019-02-06T12:25:12.126Z] <<< HTTP RESPONSE 200 server=nginx, date=Wed, 06 Feb 2019 12:25:12 GMT, content-type=application/json; charset=utf-8, content-length=135, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store
[2019-02-06T12:25:12.128Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/XXXPROJECTXXX/tokens  
  
 Wed Feb 06 2019 13:25:12 GMT+0100 (CET)
[2019-02-06T12:25:13.019Z] <<< HTTP RESPONSE 200 server=nginx, date=Wed, 06 Feb 2019 12:25:12 GMT, content-type=application/json; charset=utf-8, content-length=271, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store

=== Deploying to 'XXXPROJECTXXX'...

i  deploying hosting
i  hosting: preparing html directory for upload...
⚠  Warning: Public directory does not contain index.html
[2019-02-06T12:26:01.148Z] >>> HTTP REQUEST PUT https://deploy.firebase.com/v1/hosting/XXXPROJECTXXX/uploads/-LY1lEAsFGeNCs-DCh8H?fileCount=10031&message=  
  
 Wed Feb 06 2019 13:26:01 GMT+0100 (CET)

Debug output v. 6.3.1:

[2019-02-06T12:18:23.184Z] ----------------------------------------------------------------------
[2019-02-06T12:18:23.188Z] Command:       /usr/local/bin/node /usr/local/bin/firebase deploy --debug
[2019-02-06T12:18:23.188Z] CLI Version:   6.3.1
[2019-02-06T12:18:23.188Z] Platform:      darwin
[2019-02-06T12:18:23.189Z] Node Version:  v9.10.1
[2019-02-06T12:18:23.189Z] Time:          Wed Feb 06 2019 13:18:23 GMT+0100 (CET)
[2019-02-06T12:18:23.189Z] ----------------------------------------------------------------------

[2019-02-06T12:18:23.202Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2019-02-06T12:18:23.203Z] > authorizing via signed-in user
[2019-02-06T12:18:23.203Z] [iam] checking project XXXPROJECTXXX for permissions ["firebase.projects.get","firebasehosting.sites.update"]
[2019-02-06T12:18:23.205Z] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"]
[2019-02-06T12:18:23.205Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token  
 <request body omitted>
[2019-02-06T12:18:23.485Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=utf-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Wed, 06 Feb 2019 12:18:23 GMT, server=ESF, cache-control=private, x-xss-protection=1; mode=block, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, alt-svc=quic=":443"; ma=2592000; v="44,43,39", accept-ranges=none, transfer-encoding=chunked
[2019-02-06T12:18:23.524Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/XXXPROJECTXXX:testIamPermissions  
 permissions=[firebase.projects.get, firebasehosting.sites.update]
[2019-02-06T12:18:24.398Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Wed, 06 Feb 2019 12:18:24 GMT, server=ESF, cache-control=private, x-xss-protection=1; mode=block, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, alt-svc=quic=":443"; ma=2592000; v="44,43,39", accept-ranges=none, transfer-encoding=chunked
[2019-02-06T12:18:24.401Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects/XXXPROJECTXXX
 
[2019-02-06T12:18:24.735Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Wed, 06 Feb 2019 12:18:24 GMT, server=ESF, cache-control=private, x-xss-protection=1; mode=block, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, alt-svc=quic=":443"; ma=2592000; v="44,43,39", accept-ranges=none, transfer-encoding=chunked

=== Deploying to 'XXXPROJECTXXX'...

i  deploying hosting
[2019-02-06T12:18:24.741Z] >>> HTTP REQUEST POST https://firebasehosting.googleapis.com/v1beta1/sites/XXXPROJECTXXX/versions  
 headers=[glob=/**, Cache-Control=no-cache, max-age=0, glob=**/*.@(ttf|ttc|otf|eot|woff|woff2), Access-Control-Allow-Origin=*, Cache-Control=public, max-age=31536000, glob=**/*.@(js|css|jpg|jpeg|gif|png|bmp|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc), Cache-Control=public, max-age=31536000, glob=404.html, Cache-Control=public, max-age=300], deployment-tool=cli-firebase
[2019-02-06T12:18:25.737Z] <<< HTTP RESPONSE 500 vary=X-Origin, Referer, Origin,Accept-Encoding, content-type=application/json; charset=UTF-8, date=Wed, 06 Feb 2019 12:18:25 GMT, server=ESF, cache-control=private, x-xss-protection=1; mode=block, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, alt-svc=quic=":443"; ma=2592000; v="44,43,39", accept-ranges=none, transfer-encoding=chunked
[2019-02-06T12:18:25.737Z] <<< HTTP RESPONSE BODY code=500, message=Internal error encountered., status=INTERNAL

Error: HTTP Error: 500, Internal error encountered.
[2019-02-06T12:18:25.887Z] 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, 06 Feb 2019 12:18:25 GMT",
      "server": "ESF",
      "cache-control": "private",
      "x-xss-protection": "1; mode=block",
      "x-frame-options": "SAMEORIGIN",
      "x-content-type-options": "nosniff",
      "alt-svc": "quic=\":443\"; ma=2592000; v=\"44,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/XXXPROJECTXXX/versions",
        "path": "/v1beta1/sites/XXXPROJECTXXX/versions",
        "href": "https://firebasehosting.googleapis.com/v1beta1/sites/XXXPROJECTXXX/versions"
      },
      "method": "POST"
    }
  }
}

pederkronsgaard avatar Feb 06 '19 12:02 pederkronsgaard

Ok, seems they are aware of the issue: https://status.firebase.google.com/incident/Hosting/19006

david-potgieter avatar Feb 06 '19 12:02 david-potgieter