Firebase-tools: Firebase-tools init commands fails on the second step on Windows and Linux platform. Terminal Freezes.

Created on 20 Jun 2019  ยท  15Comments  ยท  Source: firebase/firebase-tools

[REQUIRED] Environment info


firebase-tools: firebase-tools version 7.0.0 ($ firebase -v, 7.0.0.)
Node.js : v12.4.0
npm : v6.9.0


Platform: Windows 10 Build 1903. Ubuntu 19.04 Linux Kernel 5+.

[REQUIRED] Test case

Failure on second step of sudo firebase init.
Install Command sudo npm -g firebase-tools followed by sudo firebase login.

Fails on sudo firebase init.

? Select a default Firebase project for this directory: (Use arrow keys)
โฏ [don't setup a default project] 
  fir-demo-project (Firebase Demo Project) 
  [create a new project] 

[REQUIRED] Steps to reproduce

$ sudo firebase login
$ sudo firebase init

[REQUIRED] Expected behavior

Proceeds to making third step with creation of .firebaserc or firebase.json file settings. But the terminal windows freezes after the above step as shown on Steps to reproduce.

[REQUIRED] Actual behavior

[debug] [2019-06-20T12:36:38.041Z] ----------------------------------------------------------------------
[debug] [2019-06-20T12:36:38.043Z] Command:       /usr/bin/node /usr/bin/firebase init
[debug] [2019-06-20T12:36:38.043Z] CLI Version:   7.0.0
[debug] [2019-06-20T12:36:38.043Z] Platform:      linux
[debug] [2019-06-20T12:36:38.043Z] Node Version:  v12.4.0
[debug] [2019-06-20T12:36:38.043Z] Time:          Thu Jun 20 2019 05:36:38 GMT-0700 (Pacific Daylight Time)
[debug] [2019-06-20T12:36:38.043Z] ----------------------------------------------------------------------
[debug] 
[debug] [2019-06-20T12:36:38.046Z] > 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-20T12:36:38.047Z] > authorizing via signed-in user
[info] 
     ######## #### ########  ######## ########     ###     ######  ########
     ##        ##  ##     ## ##       ##     ##  ##   ##  ##       ##
     ######    ##  ########  ######   ########  #########  ######  ######
     ##        ##  ##    ##  ##       ##     ## ##     ##       ## ##
     ##       #### ##     ## ######## ########  ##     ##  ######  ########

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

  /home/ubuntu-server/firebase

[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-20T12:36:47.846Z] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"]
[debug] [2019-06-20T12:36:47.847Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token  
 <request body omitted>
[debug] [2019-06-20T12:36:48.258Z] <<< HTTP RESPONSE 200
[debug] [2019-06-20T12:36:48.260Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects?page_size=100  

[debug] [2019-06-20T12:36:49.179Z] <<< HTTP RESPONSE 200
[debug] [2019-06-20T12:40:48.359Z] Error: setRawMode EIO
    at ReadStream.setRawMode (tty.js:73:31)
    at Interface._setRawMode (readline.js:275:16)
    at Interface.close (readline.js:398:10)
    at ReadStream.ontermend (readline.js:185:10)
    at ReadStream.emit (events.js:200:13)
    at ReadStream.EventEmitter.emit (domain.js:471:20)
    at endReadableNT (_stream_readable.js:1154:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:9)
bug

Most helpful comment

Thank you for all your patience. The fix has been made and released in v7.0.1, please upgrade to it (npm i -g firebase-tools@latest). If you're still seeing the issue on that new version, please let us know.

All 15 comments

This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.

Is it a problem with Node.js v12.04 or npm itself? I need to get firebase up and running.
Please mail me on [email protected] or comment below.

Can you please elaborate on what is to be done?

I am ready to help out in all possible ways.

Same here under OSX 10.14.5 (18F132).

$ firebase init hosting

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

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

  /Users/xxx


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

? Select a default Firebase project for this directory: xxx (xxx)
i  Using project xxx (xxx)

=== 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? (public) 

or while asked to choose a project when not inited with hosting directly after choosing hosting.

So in both cases the second step.

I'm facing the same problem,
I'm using,
macOS, nodejs : v12.4.0, npm: 6.9.0, firebase: 7.0.0,
on the option > Select a default Firebase project for this directory: (Use arrow keys)
the terminal freezes,

I'm facing the same problem too. The terminal is taking in the command on the first try but then when the next input request comes in it fails.

The following is how I configured my project:

I init firebase functions with the project name using the following command

firebase init functions -P ***ProjectName***

Then the following request Javascript or Typescript


` ######## #### ######## ######## ######## ### ###### ########
## ## ## ## ## ## ## ## ## ## ##
###### ## ######## ###### ######## ######### ###### ######
## ## ## ## ## ## ## ## ## ## ##
## #### ## ## ######## ######## ## ## ###### ########

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

/Users/Prado/Documents/Sticks&Bricks/Backend

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

i Using project ProjectName

=== Functions Setup

A functions directory will be created in your project with a Node.js
package pre-configured. Functions can be deployed with firebase deploy.

? What language would you like to use to write Cloud Functions? (Use arrow keys)

โฏ JavaScript
TypeScript

`

At this point, I'm able to select JavaScript or TypeScript. After selecting, the following:


? Do you want to use ESLint to catch probable bugs and enforce style? (y/N)


At the above request, I'm not able to enter anything. No input is taken in.

The same happens when I just enter
firebase init
and go through the whole process of selecting functions, but fails at selecting a project.

The first input is taken in, but the second input is not. Terminal becomes unresponsive.

Request a quick resolve or fix.

In https://github.com/firebase/firebase-tools/issues/1418 we have some reports that CLI verion 6.11.0 works but 7.0.0+ does not.

A couple questions:

  1. Can you please try again and see if it's still not working?
  2. If not, where (geographically) are you trying to run the command?

We believe this is an issue with the project listing API that may only be affecting certain customers in Europe. We're still investigating.

A couple questions:

  1. Can you please try again and see if it's still not working?
  2. If not, where (geographically) are you trying to run the command?

We believe this is an issue with the project listing API that may only be affecting certain customers in Europe. We're still investigating.

My project is configured to Indian Servers.

@rkpradeep20 thanks! Our new theory is that this is caused by a possibly buggy update to the library we use for local prompts. If that's it, we can get an update out very soon.

A couple questions:

  1. Can you please try again and see if it's still not working?
  2. If not, where (geographically) are you trying to run the command?

We believe this is an issue with the project listing API that may only be affecting certain customers in Europe. We're still investigating.

My project is configured to Indian Servers.

@rkpradeep20 thanks! Our new theory is that this is caused by a possibly buggy update to the library we use for local prompts. If that's it, we can get an update out very soon.

Thank you.

Thank you for all your patience. The fix has been made and released in v7.0.1, please upgrade to it (npm i -g firebase-tools@latest). If you're still seeing the issue on that new version, please let us know.

Works for me, thanks for the quick fix!

Thank you @bkendall , it worked for me in different issue "cursor is not moving while selecting firebase CLI feature" .

Thanks

Was this page helpful?
0 / 5 - 0 ratings