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.

Firebase CLI deploy doesn't work behind a proxy (regression)

See original GitHub issue

The firebase deploy hosting was working perfectly before. But now it produces the error:

My firebase --version is 8.19.0

i  deploying hosting
i  hosting[my-main-website]: beginning deploy...
i  hosting[my-main-website]: found 1462 files in public
⠋  hosting: adding files to version [0/1462] (0%)(node:4195) UnhandledPromiseRejectionWarning: FirebaseError: Failed to make request to https://firebase-public.firebaseio.com/cli.json
    at Client.<anonymous> (/usr/local/lib/node_modules/firebase-tools/lib/apiv2.js:177:23)
    at Generator.throw (<anonymous>)
    at rejected (/usr/local/lib/node_modules/firebase-tools/lib/apiv2.js:6:65)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
(node:4195) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:4195) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
⠴  hosting: adding files to version [0/1462] (0%)
Error: Task index 0 failed: retries exhausted after 4 attempts
(node:4195) UnhandledPromiseRejectionWarning: FirebaseError: Task index 0 failed: retries exhausted after 4 attempts
    at Queue.<anonymous> (/usr/local/lib/node_modules/firebase-tools/lib/throttler/throttler.js:191:27)
    at Generator.throw (<anonymous>)
    at rejected (/usr/local/lib/node_modules/firebase-tools/lib/throttler/throttler.js:6:65)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
(node:4195) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:23 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
mbleighcommented, Dec 21, 2020

TL;DR: Downgrade to 8.15.0 as a workaround for the time being

Hi folks,

I think there is indeed a regression here. We have been migrating to a new HTTP library for core CLI functionality, and it looks like it might not support the HTTP_PROXY environment variable by default. Since it’s around the holidays we are currently reducing our release schedule and might not be able to get this fixed until early January. However, you should be able to downgrade your CLI to v8.15.0 to get around the issue until then.

npm i -g firebase-tool@8.15.0

Sorry for the inconvenience, and happy holidays! ❄️

4reactions
hanguokaicommented, Dec 20, 2020

I also encountered hosting deployment issue. In my test, I go back to the v8.16.2 version and there is no problem, but from v8.17.0 version, it has this issue. This issue may be related to network proxy.

Below is error details:

hosting: adding files to version [0/52] (0%)(node:50485) UnhandledPromiseRejectionWarning: FirebaseError: Failed to make request to https://firebase-public.firebaseio.com/cli.json
    at Client.<anonymous> (/Users/xxx/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/apiv2.js:174:23)
    at Generator.throw (<anonymous>)
    at rejected (/Users/xxx/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/apiv2.js:6:65)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:50485) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:50485) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
⠹  hosting: adding files to version [0/52] (0%)
Error: Task index 0 failed: retries exhausted after 4 attempts
(node:50485) UnhandledPromiseRejectionWarning: FirebaseError: Task index 0 failed: retries exhausted after 4 attempts
    at Queue.<anonymous> (/Users/xxx/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/throttler/throttler.js:191:27)
    at Generator.throw (<anonymous>)
    at rejected (/Users/xxx/.cache/firebase/tools/lib/node_modules/firebase-tools/lib/throttler/throttler.js:6:65)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:50485) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure Hosting behavior | Firebase Hosting - Google
Specify which files in your local project directory you want to deploy to Firebase Hosting. Learn how. Serve a customized 404/Not Found page....
Read more >
firebase deploy is slow and not responding - Stack Overflow
Open the firebase-debug.log file it contains the logs you may find an error in there. logs similar to this
Read more >
How to distribute your application with Firebase App Distribution
When you finish developing an application on Android or iOS, you need to send an installer to the test team. How do you...
Read more >
Release Notes | Google Cloud CLI Documentation
Added --robo-script flag to gcloud firebase test ios run to customize an iOS ... gcloud command-line tool does not currently support connecting to...
Read more >
How to deploy behind a proxy - Google Groups
Command: node /Users/ymainier/.nvm/versions/node/v0.12.1/bin/firebase deploy --debug. CLI Version: 3.0.0. Platform: darwin.
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