firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

firebase init doesn't run, leaves frozen terminal.

Open ErikBooij opened this issue 9 years ago • 21 comments

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]

ErikBooij avatar Aug 12 '17 13:08 ErikBooij

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.

ErikBooij avatar Aug 12 '17 13:08 ErikBooij

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.

laurenzlong avatar Aug 14 '17 19:08 laurenzlong

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.

moranthomas avatar Feb 27 '18 12:02 moranthomas

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

oksiweb avatar Jun 20 '19 06:06 oksiweb

Have the same on node v12.4.0 on Ubuntu

RobHumphris avatar Jun 20 '19 06:06 RobHumphris

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

ghost avatar Jun 20 '19 07:06 ghost

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

kayzkenny avatar Jun 20 '19 07:06 kayzkenny

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

jackfrost13 avatar Jun 20 '19 08:06 jackfrost13

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

vladmarton avatar Jun 20 '19 09:06 vladmarton

v11.13.0 v10.15.0

kendji avatar Jun 20 '19 09:06 kendji

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

Nalbii avatar Jun 20 '19 09:06 Nalbii

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

alexkasongo avatar Jun 20 '19 09:06 alexkasongo

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 avatar Jun 20 '19 09:06 vladmarton

@vladmarton not working with 6.3.0

divyeshjethwa avatar Jun 20 '19 09:06 divyeshjethwa

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

vladmarton avatar Jun 20 '19 09:06 vladmarton

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!

AhmedVohra avatar Jun 20 '19 10:06 AhmedVohra

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

byte2pixel avatar Jun 20 '19 14:06 byte2pixel

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.

lewisheaton404 avatar Jun 20 '19 15:06 lewisheaton404

6.3.0 works for me, thanks a ton!

Wackytoaster avatar Jun 20 '19 15:06 Wackytoaster

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.

mbleigh avatar Jun 20 '19 15:06 mbleigh