Repository navigation
Closed
Description
[REQUIRED] Environment info
13.13.1
firebase-tools:
Platform:
windows
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
Well i have finaly re-install the 13.13.1 firebase-tools package and it's all.
I seen it's an authentication issue.
all commande fails:
- firebase emulators:start
- firebase use
[REQUIRED] Expected behavior
Get project information
[REQUIRED] Actual behavior
{"error":{"code":401,"message":"Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.","status":"UNAUTHENTICATED"}}Debug log
[debug] [2024-07-10T19:28:20.764Z] ----------------------------------------------------------------------
[debug] [2024-07-10T19:28:20.766Z] Command: C:\Program Files\nodejs\node.exe C:\Users\pierr\AppData\Roaming\npm\node_modules\firebase-tools\lib\bin\firebase.js use dev --debug
[debug] [2024-07-10T19:28:20.766Z] CLI Version: 13.13.1
[debug] [2024-07-10T19:28:20.767Z] Platform: win32
[debug] [2024-07-10T19:28:20.767Z] Node Version: v20.11.0
[debug] [2024-07-10T19:28:20.767Z] Time: Wed Jul 10 2024 21:28:20 GMT+0200 (heure d’été d’Europe centrale)
[debug] [2024-07-10T19:28:20.767Z] ----------------------------------------------------------------------
[debug]
[debug] [2024-07-10T19:28:20.823Z] > 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] [2024-07-10T19:28:20.824Z] > authorizing via signed-in user ([email protected])
[debug] [2024-07-10T19:28:20.829Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/neosilver-back-dev [none]
[debug] [2024-07-10T19:28:20.958Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/neosilver-back-dev 401
[debug] [2024-07-10T19:28:20.958Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/neosilver-back-dev {"error":{"code":401,"message":"Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.","status":"UNAUTHENTICATED"}}
[debug] [2024-07-10T19:28:20.959Z] HTTP Error: 401, Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
[error]
[error] Error: Invalid project selection, please verify project dev exists and you have access.
Activity
google-oss-bot commentedon Jul 10, 2024
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.
aalej commentedon Jul 10, 2024
Hey @solarpush. I think you meant to run the
firebase projects:listcommand. I tried runningfirebase projects:listusing firebase-tools v13.3.1 and no errors were raised.If you’re still encountering issues, could you try running
firebase projects:list --debugand share thefirebase-debug.logwith us? Passing the--debugflag provides a more detailed log that we can use to check what caused the error.solarpush commentedon Jul 10, 2024
Hello, I'm sorry for this empty issue, this morning I worked and it happened when I had no time to explain.
So I tried again and everything's fine...
I think it's because I have a script that updates firebase-tools every time I launch the emulator and maybe npm i -g firebase-tools got an error.
I remember to --debug for last issue and add directly in Issue.
Thanks for you time.
solarpush commentedon Jul 10, 2024
@aalej I reopen finally I have a time now to help you to reproduce if you have time too.
[-]firebase project:list not working in 13.13.1[/-][+]firebase CLI auth error in 13.13.1[/+]joehan commentedon Jul 10, 2024
Hi @solarpush - can you try running
firebase login --reauthand then retrying the failing commands?solarpush commentedon Jul 11, 2024
Yes i have try to :
Login:use ... and not working
Login:ci not working
But login --reauth have worked
solarpush commentedon Jul 11, 2024
@joehan @aalej thanks you
The command :
'Firebase login --reauth' solve the problem for the moment i try this morning all use cases i need but the project switching work properly now with the 13.13.1 version
solarpush commentedon Jul 11, 2024
Informations for reproduce it :
npm i -g [email protected]
firebase use "project-name" (work)
npm i -g [email protected]
firebase use "project-name" (not work )
firebase login --reauth
firebase use "poject-name" (work)
if-fi commentedon Jul 11, 2024
I'm running into the same problem. We use
firebase-tools appdistributionin our CI.Our CI jobs started failing with
HTTP Error: 401, Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.on [email protected].We pinned the version to @13.13.0 and everything works fine.
klausmyrseth commentedon Jul 11, 2024
Just to verify, the version upgrade give me just short time on the token for every reauth so I am downgrading myself to previous version which worked flawlessly.
After the downgrade it works without even reauthenticating, so there is something fishy going on.
Gbuomprisco commentedon Jul 11, 2024
Also running into the same issue. It works after re-authenticating, and then it does not.
joehan commentedon Jul 11, 2024
Hey all, we made some changes in this past release to better support auth on idx.google.com that I suspect are the cause of this issue. I'm actively working on a fix for this to go out ASAP - in the interim, please either downgrade to 13.13.0 or run
firebase login --reauthSorry for the inconvience!
joehan commentedon Jul 11, 2024
We've just released 13.13.2, which should fix this issue. If you continue to see problems, please open a new issue to let us know.
solarpush commentedon Jul 11, 2024
Re @joehan , I worked today on the 13.13.1 package and experienced several disconnections when launching the emulator or other operations.
It's possible that I'm using firebase use "project" in different folders and subfolders from the terminal.
This wasn't a problem before, but I have the impression that the context is lost when changing path when starting the emulator.
If that can help you.
thanks
dmiedev commentedon Nov 19, 2024
I had the same issue:
firebase login --reauthfixed this!