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

Firebase login is not working

Open cristiaan05 opened this issue 7 years ago • 62 comments

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

cristiaan05 avatar Jun 26 '19 17:06 cristiaan05

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

google-oss-bot avatar Jun 26 '19 17:06 google-oss-bot

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

samtstern avatar Jun 26 '19 17:06 samtstern

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

C:\Users\chern\OneDrive\Desktop\TournamentControl>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\npm\node_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 avatar Jun 26 '19 17:06 cristiaan05

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

samtstern avatar Jun 26 '19 17:06 samtstern

Sure. image

cristiaan05 avatar Jun 26 '19 17:06 cristiaan05

@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

samtstern avatar Jun 26 '19 17:06 samtstern

It works, so What I have to do ?

cristiaan05 avatar Jun 26 '19 17:06 cristiaan05

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

samtstern avatar Jun 26 '19 17:06 samtstern

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

El mié., 26 jun. 2019 a las 11:38, Sam Stern ([email protected]) 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 .

cristiaan05 avatar Jun 26 '19 17:06 cristiaan05

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.

abeisgoat avatar Jun 26 '19 17:06 abeisgoat

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.

bkendall avatar Jun 27 '19 00:06 bkendall

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\npm\node_modules\firebase-tools\lib\error.js:9:18) at Request._callback (C:\Users\BC1907ZA\AppData\Roaming\npm\node_modules\firebase-tools\lib\api.js:30:31) at self.callback (C:\Users\BC1907ZA\AppData\Roaming\npm\node_modules\firebase-tools\node_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\npm\node_modules\firebase-tools\node_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\npm\node_modules\firebase-tools\node_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

linae42 avatar Jul 24 '19 13:07 linae42

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

bkendall avatar Jul 25 '19 16:07 bkendall

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)

govindrai avatar Jul 30 '19 16:07 govindrai

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.

jackhobbs avatar Aug 08 '19 12:08 jackhobbs

image

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

arifpetok avatar Aug 23 '19 07:08 arifpetok

@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

arifpetok avatar Aug 23 '19 08:08 arifpetok

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?

subhamchand avatar Sep 04 '19 17:09 subhamchand

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

enricribas avatar Sep 05 '19 00:09 enricribas

~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 avatar Jan 21 '20 20:01 Karasuni