SUHEL MAKKAD
SUHEL MAKKAD

Reputation: 110

Firebase error.. Error: Failed to make request to https://www.gstatic.com/firebasejs/releases.json

I am deploying my React app to firebase hosting. when I create firebase init and select all options I am getting this error.

C:\Users\user\git\Apps\screem>firebase init

     ######## #### ########  ######## ########     ###     ######  ########
     ##        ##  ##     ## ##       ##     ##  ##   ##  ##       ##
     ######    ##  ########  ######   ########  #########  ######  ######
     ##        ##  ##    ##  ##       ##     ## ##     ##       ## ##
     ##       #### ##     ## ######## ########  ##     ##  ######  ########

You're about to initialize a Firebase project in this directory:

  C:\Users\user\git\Apps\screem

? Are you ready to proceed? Yes
? Which Firebase CLI features do you want to set up for this folder? Press Space to select features, then Enter to confi
rm your choices. Hosting: Configure and deploy Firebase Hosting sites

=== Project Setup

First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add,
but for now we'll just set up a default project.

? Please select an option: Use an existing project
? Select a default Firebase project for this directory: screem-59e13 (screem)
i  Using project screem-59e13 (screem)

=== Hosting Setup

Your public directory is the folder (relative to your project directory) that
will contain Hosting assets to be uploaded with firebase deploy. If you
have a build process for your assets, use your build's output directory.

? What do you want to use as your public directory? build
? Configure as a single-page app (rewrite all urls to /index.html)? Yes
? Set up automatic builds and deploys with GitHub? No

Error: Failed to make request to https://www.gstatic.com/firebasejs/releases.json

Any idea how to fix this?

Upvotes: 8

Views: 7171

Answers (5)

I have tried above all methods but not works for me. But executed below sequence

npm install -g firebase-tools

then

firebase logout

then

firebase login

This would work surly.

Upvotes: 0

RITTIK
RITTIK

Reputation: 906

Try re-login Firebase using the below command:

firebase login --reauth

Upvotes: 0

Rudrankit Sharma
Rudrankit Sharma

Reputation: 31

This worked for me. Run npm install -g firebase-tools before running the command firebase init.

Upvotes: 2

sachin kannaujiya
sachin kannaujiya

Reputation: 193

Error: Failed to make request to https://www.gstatic.com/firebasejs/releases.json

to solve this problem run this command:

firebase init --debug

it will work 100%

Upvotes: 5

chipilov
chipilov

Reputation: 569

In order to understand the root cause of the error, try running the Firebase init command with the debug option:

firebase init --debug

It is possible that the request fails due to a "self-signed certificate in the certificate chain". If so, you will see this error in the debug output and then you can refer to this StackOverflow question for ways to workaround or fix the issue: nodejs - error self signed certificate in certificate chain

Upvotes: 8

Related Questions