Firebase-tools: firebase init doesn't run, leaves frozen terminal.

Created on 12 Aug 2017  ยท  21Comments  ยท  Source: firebase/firebase-tools

Version info

3.9.2

Steps to reproduce

  • Run firebase init
  • Select any option

Expected behavior

I should then be able to select a Firebase project

Actual behavior

My entire terminal freezes. Can't use arrow keys to select, can't Ctrl + C to cancel, there's nothing the terminal window responds to anymore.

Logs

โ–ถ firebase init --debug
[2017-08-12T13:37:10.262Z] ----------------------------------------------------------------------
[2017-08-12T13:37:10.265Z] Command:       /usr/local/Cellar/node/8.1.0/bin/node /usr/local/bin/firebase init --debug
[2017-08-12T13:37:10.265Z] CLI Version:   3.9.2
[2017-08-12T13:37:10.265Z] Platform:      darwin
[2017-08-12T13:37:10.265Z] Node Version:  v8.1.0
[2017-08-12T13:37:10.266Z] Time:          Sat Aug 12 2017 15:37:10 GMT+0200 (CEST)
[2017-08-12T13:37:10.266Z] ----------------------------------------------------------------------

[2017-08-12T13:37:10.273Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase"]
[2017-08-12T13:37:10.273Z] > authorizing via signed-in user

     ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ  ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ     ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ     ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ  ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ
     ๐Ÿ”ฅ๐Ÿ”ฅ        ๐Ÿ”ฅ๐Ÿ”ฅ  ๐Ÿ”ฅ๐Ÿ”ฅ     ๐Ÿ”ฅ๐Ÿ”ฅ ๐Ÿ”ฅ๐Ÿ”ฅ       ๐Ÿ”ฅ๐Ÿ”ฅ     ๐Ÿ”ฅ๐Ÿ”ฅ  ๐Ÿ”ฅ๐Ÿ”ฅ   ๐Ÿ”ฅ๐Ÿ”ฅ  ๐Ÿ”ฅ๐Ÿ”ฅ       ๐Ÿ”ฅ๐Ÿ”ฅ
     ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ    ๐Ÿ”ฅ๐Ÿ”ฅ  ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ  ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ   ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ  ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ  ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ  ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ
     ๐Ÿ”ฅ๐Ÿ”ฅ        ๐Ÿ”ฅ๐Ÿ”ฅ  ๐Ÿ”ฅ๐Ÿ”ฅ    ๐Ÿ”ฅ๐Ÿ”ฅ  ๐Ÿ”ฅ๐Ÿ”ฅ       ๐Ÿ”ฅ๐Ÿ”ฅ     ๐Ÿ”ฅ๐Ÿ”ฅ ๐Ÿ”ฅ๐Ÿ”ฅ     ๐Ÿ”ฅ๐Ÿ”ฅ       ๐Ÿ”ฅ๐Ÿ”ฅ ๐Ÿ”ฅ๐Ÿ”ฅ
     ๐Ÿ”ฅ๐Ÿ”ฅ       ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ ๐Ÿ”ฅ๐Ÿ”ฅ     ๐Ÿ”ฅ๐Ÿ”ฅ ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ  ๐Ÿ”ฅ๐Ÿ”ฅ     ๐Ÿ”ฅ๐Ÿ”ฅ  ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ  ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ

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

  /Users/erikbooij/Dropbox/Projects

? Which Firebase CLI features do you want to setup for this folder? Press Space to select features, then Enter to confirm your choices. Functions: Configure and deploy C
loud Functions

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

[2017-08-12T13:37:18.198Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects
 Sat Aug 12 2017 15:37:18 GMT+0200 (CEST)
[2017-08-12T13:37:19.099Z] <<< HTTP RESPONSE 200 server=nginx, date=Sat, 12 Aug 2017 13:37:19 GMT, content-type=application/json; charset=utf-8, content-length=203, connection=close, x-content-type-options=nosniff, strict-transport-security=max-age=31536000; includeSubdomains, cache-control=no-cache, no-store
? Select a default Firebase project for this directory: (Use arrow keys)
โฏ [don't setup a default project]
  Name of project I have already set up
  [create a new project]

Most helpful comment

Temporary solution

Older versions of firebase-tools work fine. Until this problem is fixed, try:
npm remove -g firebase-tools && npm install -g [email protected]

More info here (tab Versions): https://www.npmjs.com/package/firebase-tools

As soon as the problem is fixed, you can upgrade to the newest version. If someone wants to try, maybe even never versions (>6.3.0) are "bug-less". I only tried with 6.8.0 and 6.3.0, but the bug was still present in 6.8.0.

All 21 comments

Update: It works on Node 8.3.0, just not on 8.1.0. If it's not something you think should be fixed, go ahead and close this issue.

Hey @ErikBooij Thanks for filing, this is a known issue and it's due to a bug in Node 8.1.0, unfortunately there's not much we can do to fix it.

Hi. I got the same issue on windows using cygwin and git bash and although not ideal the workaround was to init the firebase project in windows command shell and then switch back to git bash.

Have the same on node v10.15.3 (npm v6.4.1) on mac

Have the same on node v12.4.0 on Ubuntu

Having the same issue using Node v11.14.0, and npm v6.9.0 on Windows 10

Having the same issue using Node v10.16.0, and npm v6.9.0 on Windows 10

Having the same issue using Node v12.4.0 and npm v6.9.0 on Linux Ubuntu 19.04
Here is the debug log after which the terminal gets stuck

[debug] [2019-06-20T08:37:10.953Z] ----------------------------------------------------------------------
[debug] [2019-06-20T08:37:10.956Z] Command: /home/jackfrost/.nvm/versions/node/v12.4.0/bin/node /home/jackfrost/.nvm/versions/node/v12.4.0/bin/firebase init
[debug] [2019-06-20T08:37:10.956Z] CLI Version: 7.0.0
[debug] [2019-06-20T08:37:10.956Z] Platform: linux
[debug] [2019-06-20T08:37:10.956Z] Node Version: v12.4.0
[debug] [2019-06-20T08:37:10.957Z] Time: Thu Jun 20 2019 14:07:10 GMT+0530 (India Standard Time)
[debug] [2019-06-20T08:37:10.957Z] ----------------------------------------------------------------------
[debug]
[debug] [2019-06-20T08:37:10.963Z] > 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-06-20T08:37:10.964Z] > authorizing via signed-in user
[info]
######## #### ######## ######## ######## ### ###### ########
## ## ## ## ## ## ## ## ## ## ##
###### ## ######## ###### ######## ######### ###### ######
## ## ## ## ## ## ## ## ## ## ##
## #### ## ## ######## ######## ## ## ###### ########

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

/home/jackfrost/cloud-functions

[info]
=== Project Setup
[info]
[info] First, let's associate this project directory with a Firebase project.
[info] You can create multiple project aliases by running firebase use --add,
[info] but for now we'll just set up a default project.
[info]
[debug] [2019-06-20T08:37:24.426Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects?page_size=100

[debug] [2019-06-20T08:37:25.314Z] <<< HTTP RESPONSE 200

Is anyone looking at this?
I tried node versions:

  • 8.1
  • 8.3
  • 8.9.4
  • 10.16
  • 12.4

and had the same problem on all of them. I'm running Ubuntu and i tried to install them with both distributions and nvm.

@laurenzlong you claim that it's a node-related issue, but it seems like the problem is at your end, considering all the input from other people

v11.13.0
v10.15.0

Same issue here.
node v10.15.1
npm v6.9.0

just ran into that isue
node v10.15.3
npm v6.9.0

Temporary solution

Older versions of firebase-tools work fine. Until this problem is fixed, try:
npm remove -g firebase-tools && npm install -g [email protected]

More info here (tab Versions): https://www.npmjs.com/package/firebase-tools

As soon as the problem is fixed, you can upgrade to the newest version. If someone wants to try, maybe even never versions (>6.3.0) are "bug-less". I only tried with 6.8.0 and 6.3.0, but the bug was still present in 6.8.0.

@vladmarton not working with 6.3.0

@vladmarton not working with 6.3.0

Try older versions then, or try versions that are between 6.8.0 and 6.3.0, maybe one of them will work.

Temporary solution

Older versions of firebase-tools work fine. Until this problem is fixed, try:
npm remove -g firebase-tools && npm install -g [email protected]

More info here (tab Versions): https://www.npmjs.com/package/firebase-tools

As soon as the problem is fixed, you can upgrade to the newest version. If someone wants to try, maybe even never versions (>6.3.0) are "bug-less". I only tried with 6.8.0 and 6.3.0, but the bug was still present in 6.8.0.

Working with 6.3.0
Thanks a lot!

I'm having this problem with my terminals freezing too. I tried cmd.exe and VS Code terminal all have the same problem. I do firebase init in my project directory answer Yes and then when it asks which CLI features I want I cannot select anything the terminal is frozen. It shows Database, Firestore, Functions, Hosting, and Storage. Ctrl+C doesn't do anything etc.

node: 10.16.0
npm: 6.1.0
firebase: 7.0.0

Was having the same issue, just ran npm remove -g firebase-tools && npm install -g [email protected] and all was solved, then once installed upgraded to the latest version again.

6.3.0 works for me, thanks a ton!

This seems to be a problem with the backend project listing API. 6.3.0 works because it uses a legacy API that may not be affected by the problem. We're investigating.

You can track the status of this issue with #1420

Was this page helpful?
0 / 5 - 0 ratings

Related issues

FluorescentHallucinogen picture FluorescentHallucinogen  ยท  3Comments

hmazter picture hmazter  ยท  4Comments

satishverma143 picture satishverma143  ยท  4Comments

francisrod01 picture francisrod01  ยท  3Comments

laurenzlong picture laurenzlong  ยท  4Comments