Firebase-tools: Firebase login is not working

Created on 26 Jun 2019  Â·  33Comments  Â·  Source: firebase/firebase-tools

I´ve been trying to login in with firebase command and doesn´t work. I tried with firebase login --no-localhost and firebase login --reauth. I´m very stressed about this. Please Help Me

bug

Most helpful comment

Solved !
I was getting the same problem and faced almost same issues.
After I started the CMD with administrative privilage, the login was done.

Hope your work also.

All 33 comments

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@cristiaan05 can you please tell us what part of the command doesn't work and also run the commands with --debug and paste the output here?

I'll send you a screenshot of my problem and my firebase debug.
image

C:\Users\chern\OneDrive\DesktopTournamentControl>firebase --debug
[2019-06-26T17:19:00.320Z] ----------------------------------------------------------------------
[2019-06-26T17:19:00.324Z] Command: C:\Program Files\nodejs\node.exe C:\Users\chern\AppData\Roaming\npmnode_modules\firebase-tools\lib\bin\firebase.js --debug
[2019-06-26T17:19:00.325Z] CLI Version: 7.0.2
[2019-06-26T17:19:00.325Z] Platform: win32
[2019-06-26T17:19:00.325Z] Node Version: v10.16.0
[2019-06-26T17:19:00.328Z] Time: Wed Jun 26 2019 11:19:00 GMT-0600 (GMT-06:00)
[2019-06-26T17:19:00.328Z] ----------------------------------------------------------------------

@cristiaan05 sorry I should have been more clear. Run firebase --debug login

Sure.
image

@cristiaan05 can you see if this works?

PATH=%PATH%;C:\Windows\System32 firebase --debug login

@bkendall I have seen two copies of this exact issue lately and I think it's related to this commit:
https://github.com/firebase/firebase-tools/commit/82bae0adc86f1d6b1562a69a174f81e3188cd42c#diff-3bbf637d3a6fe8e950d469c35444acda

It works, so What I have to do ?

@cristiaan05 well really what we need to do is fix our code :-)

But in the meantime what you can do is change your PATH variable. If you don't know how to do that, see this article:
https://www.computerhope.com/issues/ch000549.htm

You want to append ;C:\Windows\System32 to the end of your PATH variable.

firebase login command works, so thank you for your help.

El mié., 26 jun. 2019 a las 11:38, Sam Stern (notifications@github.com)
escribió:

@cristiaan05 https://github.com/cristiaan05 well really what we need to
do is fix our code :-)

But in the meantime what you can do is change your PATH variable. If you
don't know how to do that, see this article:
https://www.computerhope.com/issues/ch000549.htm

You want to append ;C:\Windows\System32 to the end of your PATH variable.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/firebase/firebase-tools/issues/1442?email_source=notifications&email_token=AIXT2HOHSULDRN6BFG6IM5TP4OSQHA5CNFSM4H3ULF5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYUI3YY#issuecomment-505974243,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIXT2HNOUOHKOTUMGYJPPL3P4OSQHANCNFSM4H3ULF5A
.

I'm not able to repro this (in a Firepit build), sadly. I'll try again later, but seems like the open module acts as expected for me.

That's interesting. I'm away from my windows machine (actually, Abe has it) so I'm not able to take a look now, but I can try to circle back and repro this if Abe doesn't get to it.

Hi, i have been trying to login with firebase for hours and it won't work, whatever i try.
I'm behind a corporate proxy but my HTTP_PROXY and HTTPS_PROXY environment variables are set properly.
I always end up with this page :
image

I also tried:
firebase login --no-localhost
But it won't work either and i get this with --debug option:

? Paste authorization code here: [I PASTE THE CODE]
[2019-07-24T13:36:21.430Z] >>> HTTP REQUEST POST https://accounts.google.com/o/oauth2/token
code=4/jwFkjt3AE6E2fvqg8OfeWCgkdV57RugNkRfCQAX8WjJO2AwoZmQreq8, client_id=[clientID].apps.googleusercontent.com, client_secret=[clientSecret], redirect_uri=urn:ietf:wg:oauth:2.0:oob, grant_type=authorization_code
[2019-07-24T13:36:21.452Z] Token Fetch Error: Error
at new FirebaseError (C:\Users\BC1907ZA\AppData\Roaming\npmnode_modules\firebase-tools\lib\error.js:9:18)
at Request._callback (C:\Users\BC1907ZA\AppData\Roaming\npmnode_modules\firebase-tools\lib\api.js:30:31)
at self.callback (C:\Users\BC1907ZA\AppData\Roaming\npmnode_modules\firebase-toolsnode_modules\request\request.js:185:22)
at Request.emit (events.js:198:13)
at Request.EventEmitter.emit (domain.js:448:20)
at Request.onRequestError (C:\Users\BC1907ZA\AppData\Roaming\npmnode_modules\firebase-toolsnode_modules\request\request.js:881:8)
at ClientRequest.emit (events.js:198:13)
at ClientRequest.EventEmitter.emit (domain.js:448:20)
at ClientRequest.onError (C:\Users\BC1907ZA\AppData\Roaming\npmnode_modules\firebase-toolsnode_modules\tunnel-agent\index.js:179:21)
at Object.onceWrapper (events.js:286:20)

Error: Authentication Error: Your credentials are no longer valid. Please run firebase login --reauth

For CI servers and headless environments, generate a new token with firebase login:ci

Thanks for your help

I'm going to assign this to @abeisgoat - he can take a look if he has a moment :)

I am experiencing this same issue. --no-localhost and --reauth both lead to login failures. I am NOT behind a proxy either.

Debug log:

 $ firebase --debug login
[2019-07-30T16:48:49.525Z] ----------------------------------------------------------------------
[2019-07-30T16:48:49.527Z] Command:       /usr/local/bin/node /Users/govindrai/Projects/beautifulai/node_modules/.bin/firebase --debug login
[2019-07-30T16:48:49.528Z] CLI Version:   7.2.1
[2019-07-30T16:48:49.528Z] Platform:      darwin
[2019-07-30T16:48:49.528Z] Node Version:  v10.15.3
[2019-07-30T16:48:49.528Z] Time:          Tue Jul 30 2019 09:48:49 GMT-0700 (Pacific Daylight Time)
[2019-07-30T16:48:49.529Z] Env Overrides: FIREBASE_CLIENT_SECRET
[2019-07-30T16:48:49.529Z] ----------------------------------------------------------------------

? Allow Firebase to collect anonymous CLI usage and error reporting information? Yes

Visit this URL on any device to log in:
https://accounts.google.com/o/oauth2/auth?client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com&scope=email%20openid%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloudplatformprojects.readonly%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffirebase%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform&response_type=code&state=344699157&redirect_uri=http%3A%2F%2Flocalhost%3A9005

Waiting for authentication...
[2019-07-30T16:48:57.585Z] >>> HTTP REQUEST POST https://accounts.google.com/o/oauth2/token  
 code=4/lgHHaCy4pTJS78JiYW-PLF9CJpyleGXKdRejlz9GG4kvEtc3fg8Aw9oKrEJ4_eILGbLMGw886fLyvc-KKTHPbPQ, client_id=563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com, client_secret=s8GZc38mvDo2-OxYAtuXV4Fe, redirect_uri=http://localhost:9005, grant_type=authorization_code
[2019-07-30T16:48:57.811Z] <<< HTTP RESPONSE 401 content-type=application/json; charset=utf-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Tue, 30 Jul 2019 16:48:57 GMT, server=ESF, cache-control=private, x-xss-protection=0, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, alt-svc=quic=":443"; ma=2592000; v="46,43,39", accept-ranges=none, transfer-encoding=chunked
[2019-07-30T16:48:57.811Z] <<< HTTP RESPONSE BODY error=invalid_client, error_description=Unauthorized
[2019-07-30T16:48:57.813Z] Token Fetch Error: FirebaseError: HTTP Error: 401, invalid_client
    at module.exports (/Users/govindrai/Projects/beautifulai/node_modules/firebase-tools/lib/responseToError.js:38:12)
    at Request._callback (/Users/govindrai/Projects/beautifulai/node_modules/firebase-tools/lib/api.js:39:35)
    at Request.self.callback (/Users/govindrai/Projects/beautifulai/node_modules/request/request.js:185:22)
    at Request.emit (events.js:189:13)
    at Request.EventEmitter.emit (domain.js:441:20)
    at Request.<anonymous> (/Users/govindrai/Projects/beautifulai/node_modules/request/request.js:1161:10)
    at Request.emit (events.js:189:13)
    at Request.EventEmitter.emit (domain.js:441:20)
    at IncomingMessage.<anonymous> (/Users/govindrai/Projects/beautifulai/node_modules/request/request.js:1083:12)
    at Object.onceWrapper (events.js:277:13)

Solved !
I was getting the same problem and faced almost same issues.
After I started the CMD with administrative privilage, the login was done.

Hope your work also.

image

I have the same error but I cannot paste authorixation code?

@cristiaan05 well really what we need to do is fix our code :-)

But in the meantime what you can do is change your PATH variable. If you don't know how to do that, see this article:
https://www.computerhope.com/issues/ch000549.htm

You want to append ;C:\Windows\System32 to the end of your PATH variable.

finally thanks you guys

Hi,
I am facing this same issue. I am not working on my local system , I am working on Gitpod extension. is it something related to it? Can anyone help me in this?

On linux, experiencing the exact same issue. Do not close.
7.3.0 (and 7.1.1)

[solved] you have ,use only 'Command Prompt windows' [CMD Admin]

~Still experiencing this issue on WSL, please reopen.~

Waiting for authentication...

Error: spawn cmd.exe EACCES
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)

Issue was on my end. WSL was configurered with incorrect permissions.

@Karasuni please open a new issue if you're still having problems and give us all the information you are able to!

there is any solution for this issue ?

The problem still exists (macOS)! And it's been long time for me. I tried sudo firebase login too (as someone suggested above), but not working at all.

Screen Shot 2020-07-01 at 12 23 37 PM

The problem still exists (macOS)! And it's been long time for me. I tried sudo firebase login too (as someone suggested above), but not working at all.

Screen Shot 2020-07-01 at 12 23 37 PM

Once my Mac was in a Sleep mode I got the same error, but after a Restart it worked fine again.

The problem still exists (macOS)! And it's been long time for me. I tried sudo firebase login too (as someone suggested above), but not working at all.

Screen Shot 2020-07-01 at 12 23 37 PM

Did you manage to solve it? I also have the same issue on Mac.

The problem still exists (macOS)! And it's been long time for me. I tried sudo firebase login too (as someone suggested above), but not working at all.
Screen Shot 2020-07-01 at 12 23 37 PM

Did you manage to solve it? I also have the same issue on Mac.

Unfortunately, never and not interested to waste anymore time for it.

I re install my OS Windows then work properly

On Thu, Aug 6, 2020 at 6:02 PM Duzy Chan notifications@github.com wrote:

The problem still exists (macOS)! And it's been long time for me. I tried sudo
firebase login too (as someone suggested above), but not working at all.
[image: Screen Shot 2020-07-01 at 12 23 37 PM]
https://user-images.githubusercontent.com/25271/86202769-ca7e0880-bb95-11ea-87d5-bff16ce1dea0.png

Did you manage to solve it? I also have the same issue on Mac.

Unfortunately, never and not interested to waste anymore time for it.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/firebase/firebase-tools/issues/1442#issuecomment-670019694,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AM6RWMVSG7P7RHZHIZUAVNDR7LHXRANCNFSM4H3ULF5A
.

@cristiaan05 can you see if this works?

PATH=%PATH%;C:\Windows\System32 firebase --debug login

@bkendall I have seen two copies of this exact issue lately and I think it's related to this commit:
82bae0a#diff-3bbf637d3a6fe8e950d469c35444acda

Thanks buddy

I re install my OS Windows then work properly
…
On Thu, Aug 6, 2020 at 6:02 PM Duzy Chan @.*> wrote: The problem still exists (macOS)! And it's been long time for me. I tried sudo firebase login too (as someone suggested above), but not working at all. [image: Screen Shot 2020-07-01 at 12 23 37 PM] https://user-images.githubusercontent.com/25271/86202769-ca7e0880-bb95-11ea-87d5-bff16ce1dea0.png Did you manage to solve it? I also have the same issue on Mac. Unfortunately, never and not interested to waste anymore time for it. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#1442 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM6RWMVSG7P7RHZHIZUAVNDR7LHXRANCNFSM4H3ULF5A .

My guess is that firebase login uses different proxy settings in different stages of login. Your proxy or networks changed after reinstall.

Untitled

I've tried firebase login
Firebase --debug login
And this
Nothing has worked
Pls help me
I've started learning react.js just now and I'm tired of this

errr
i am face the problem of forebase login kindly snd the solution of this problem
error: moudle not found

Ok I’ll get on it in next few minutes

On Wed, Oct 7, 2020 at 3:52 AM Ahmedkhan90 notifications@github.com wrote:

[image: errr]
https://user-images.githubusercontent.com/72353349/95302685-b4ba6680-089b-11eb-8293-6289e0e5e331.jpg
i am face the problem of forebase login kindly snd the solution of this
problem
error: moudle not found

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/firebase/firebase-tools/issues/1442#issuecomment-704761876,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AORRNBEVN5PLFBFKRIXR7CDSJQM4PANCNFSM4H3ULF5A
.

>

Henry P. Briffel

This message and any attachment are confidential. If you are not the
intended recipient, please telephone or email the sender and delete the
message and any attachment from your system. If you are not the intended
recipient you must not copy this message or attachment or disclose the
contents to any other person.

Was this page helpful?
0 / 5 - 0 ratings