Firebase-tools: Cant find my project at firebase init

Created on 22 Feb 2019  ·  13Comments  ·  Source: firebase/firebase-tools

Hi,
I try Firebase Init and when i get to the step when i need to select the default Firebase project
i can't see my projects although i have a few...
How can i resolve this?
thanks
pic

bug

Most helpful comment

Still happening on 6.5.0

Running firebase list returns the actual list of my projects, but firebase init only show me the option to don't set up a default project and create a new project.

Temporary workaround

Running firebase init --project [a project id got from firebase list] works fine.

All 13 comments

None of your projects are showing up? Are you logged into the CLI with the same Google account that you're viewing the Firebase Console with?

i'm with cli and can't find my project look at the image

‫בתאריך יום ו׳, 22 בפבר׳ 2019 ב-21:59 מאת ‪Alex Memering‬‏ <‪
[email protected]‬‏>:‬

None of your projects are showing up? Are you logged into the CLI with the
same Google account that you're viewing the Firebase Console with?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/firebase/firebase-tools/issues/1154#issuecomment-466527355,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Akvd_SruJLQSwU-HewSHW_2QSwGt64icks5vQEwYgaJpZM4bJnRJ
.

@alon359 - the question is: are _any_ projects showing up in this list?

Could you also confirm that the account with which you are logged into the CLI (verify using firebase login - it will print the email address) the same as the one you've created the projects with in the Firebase Console?

I'm having the same issue

the question is: are _any_ projects showing up in this list?

Yes, two of my (older) projects show up. My newly created one doesn't when I run firebase init. The newly created one is listed when I run firebase list though.

Could you also confirm that the account with which you are logged into the CLI the same as the one you've created the projects with in the Firebase Console?

It's the same account in my case.
I also did:

$ firebase logout
$ firebase login

to make sure it's not a permission issue.
Also:

$ firebase --version
6.4.0
$ npm -v
6.8.0
$ node -v
v10.15.1

if that helps.

Looks like firebase-tools/src/firebaseApi.js:8 (which is used when running $ firebase init) uses:

`/${API_VERSION}/projects?page_size=100`

with API_VERSION being v1beta1, while firebase-tools/src/api.js:237 (which is used by $ firebase list) uses:

"/v1/projects"

which could mean the issue is in the API version v1beta1, I'm not very familiar with these API versions though.

@alon359 - the question is: are _any_ projects showing up in this list?

Could you also confirm that the account with which you are logged into the CLI (verify using firebase login - it will print the email address) the same as the one you've created the projects with in the Firebase Console?

Yes i use an account with firebase projects...

I have still the some problem...

I'm having the same issue

the question is: are _any_ projects showing up in this list?

Yes, two of my (older) projects show up. My newly created one doesn't when I run firebase init. The newly created one is listed when I run firebase list though.

Could you also confirm that the account with which you are logged into the CLI the same as the one you've created the projects with in the Firebase Console?

It's the same account in my case.
I also did:

$ firebase logout
$ firebase login

to make sure it's not a permission issue.
Also:

$ firebase --version
6.4.0
$ npm -v
6.8.0
$ node -v
v10.15.1

if that helps.

Still have this problem

Seems to work now, was probably fixed in /v1beta1/projects

@nephix I think you're intuition that the two API calls (v1beta1 vs v1) may be causing the difference. I'm going to bring this up with the relevant folks and confirm what this should be.

Still happening on 6.5.0

Running firebase list returns the actual list of my projects, but firebase init only show me the option to don't set up a default project and create a new project.

Temporary workaround

Running firebase init --project [a project id got from firebase list] works fine.

I'm currently having this issue. Yesterday was totally fine. Now, my project is gone.

Me too. Gives an error of lacking authorization.

[debug] [2020-08-03T03:33:35.484Z] > refreshing access token with scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2020-08-03T03:33:35.485Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token  
 <request body omitted>
[debug] [2020-08-03T03:33:35.688Z] <<< HTTP RESPONSE 400 {"content-type":"application/json; charset=utf-8","vary":"X-Origin, Referer, Origin,Accept-Encoding","date":"Mon, 03 Aug 2020 03:33:35 GMT","server":"scaffolding on HTTPServer2","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-29=\":443\"; ma=2592000,h3-27=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[debug] [2020-08-03T03:33:35.689Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects?pageSize=100  

[debug] [2020-08-03T03:33:35.858Z] <<< HTTP RESPONSE 401 {"www-authenticate":"Bearer realm=\"https://accounts.google.com/\", error=\"invalid_token\"","vary":"X-Origin, Referer, Origin,Accept-Encoding","content-type":"application/json; charset=UTF-8","date":"Mon, 03 Aug 2020 03:33:35 GMT","server":"ESF","cache-control":"private","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","alt-svc":"h3-29=\":443\"; ma=2592000,h3-27=\":443\"; ma=2592000,h3-T050=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"","accept-ranges":"none","transfer-encoding":"chunked"}
[debug] [2020-08-03T03:33:35.858Z] <<< HTTP RESPONSE BODY {"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] [2020-08-03T03:33:35.859Z] 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.
[debug] [2020-08-03T03:33:35.973Z] FirebaseError: 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.
    at module.exports (C:\Users\aditm\AppData\Roaming\npm\node_modules\firebase-tools\lib\responseToError.js:38:12)
    at Request._callback (C:\Users\aditm\AppData\Roaming\npm\node_modules\firebase-tools\lib\api.js:41:35)
    at Request.self.callback (C:\Users\aditm\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\request\request.js:185:22)
    at Request.emit (events.js:311:20)
    at Request.EventEmitter.emit (domain.js:482:12)
    at Request.<anonymous> (C:\Users\aditm\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\request\request.js:1154:10)
    at Request.emit (events.js:311:20)
    at Request.EventEmitter.emit (domain.js:482:12)
    at IncomingMessage.<anonymous> (C:\Users\aditm\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\request\request.js:1076:12)
    at Object.onceWrapper (events.js:417:28)
    at IncomingMessage.emit (events.js:323:22)
    at IncomingMessage.EventEmitter.emit (domain.js:482:12)
    at endReadableNT (_stream_readable.js:1204:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
[error] 
[error] Error: Failed to list Firebase projects. See firebase-debug.log for more info.
Was this page helpful?
0 / 5 - 0 ratings