question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error in deploying hosting

See original GitHub issue

[REQUIRED] Environment info

firebase-tools: 9.0.1

Platform: macOS

[REQUIRED] Test case

Deploy firebase hosting

[REQUIRED] Steps to reproduce

firebase deploy --only hosting

Adding settings for CloudRun to the rewrite configuration will result in an error.

firebase.json:

        {
          "source": "/**",
          "run": {
            "region": "asia-northeast1",
            "serviceId": "xxx-api"
          }
        }

[REQUIRED] Expected behavior

Deploy completed without errors.

[REQUIRED] Actual behavior

i  deploying hosting

Error: HTTP Error: 400, Precondition check failed.

end of firebase-debug.log:

[debug] [2020-12-17T06:32:50.423Z] <<< HTTP RESPONSE 400 {"vary":"X-Origin, Referer, Origin,Accept-Encoding","content-type":"application/json; charset=UTF-8","date":"Thu, 17 Dec 2020 06:32:50 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[debug] [2020-12-17T06:32:50.423Z] <<< HTTP RESPONSE BODY {"error":{"code":400,"message":"Precondition check failed.","status":"FAILED_PRECONDITION"}}
[error] 
[error] Error: HTTP Error: 400, Precondition check failed.
[debug] [2020-12-17T06:32:50.663Z] Error Context: {
  "body": {
    "error": {
      "code": 400,
      "message": "Precondition check failed.",
      "status": "FAILED_PRECONDITION"
    }
  },
  "response": {
    "statusCode": 400,
    "body": {
      "error": {
        "code": 400,
        "message": "Precondition check failed.",
        "status": "FAILED_PRECONDITION"
      }
    },
    "headers": {
      "vary": "X-Origin, Referer, Origin,Accept-Encoding",
      "content-type": "application/json; charset=UTF-8",
      "date": "Thu, 17 Dec 2020 06:32:50 GMT",
      "server": "ESF",
      "cache-control": "private",
      "x-xss-protection": "0",
      "x-frame-options": "SAMEORIGIN",
      "x-content-type-options": "nosniff",
      "alt-svc": "h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"",
      "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/xxxxx/versions",
        "path": "/v1beta1/sites/xxxxx/versions",
        "href": "https://firebasehosting.googleapis.com/v1beta1/sites/xxxxx/versions"
      },
      "method": "POST"
    }
  }
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:17
  • Comments:22 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
mbleighcommented, Dec 17, 2020

This should be fully mitigated within the next 10 minutes or so. Sorry for the inconvenience, folks. If you’re having issues after that, please comment!

5reactions
mbleighcommented, Dec 17, 2020

Hey folks, we’re seeing an issue specifically with deploying Cloud Run rewrites to Firebase Hosting at the moment. I’m working on getting something posted to the Firebase status dashboard (I’ll link when it’s there) but just acknowledging a problem that we’re looking into.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to deploy to hosting with 'Failed to list functions ... - GitHub
I just updated firebase-tools from 11.13.0 to 11.14.0 and exec deploy command. Then following error occurred. $ firebase deploy === Deploying to ...
Read more >
firebase deploy error, Error: Failed to list functions for (project ...
I am hosting my web application in Firebase and ...
Read more >
Error deploying to hosting - Frontity Community Forum
My build look like this: When i deploy build to hosting i get this error Forbidden You don't have permission to access this...
Read more >
Get started with Firebase Hosting - Google
Firebase Hosting gives you a fast, secure, and reliable way to host your app's static assets (HTML, CSS, JavaScript, ... firebase deploy --only...
Read more >
Error on firebase deploy - Google Groups
[info] i deploying database, functions, hosting. [info] i functions: running predeploy script. [debug] [2018-06-11T18:27:56.375Z] TypeError: "file" argument ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found