Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to create a new project #2028

Closed
arshul opened this issue Mar 16, 2020 · 18 comments
Closed

Not able to create a new project #2028

arshul opened this issue Mar 16, 2020 · 18 comments

Comments

@arshul
Copy link

arshul commented Mar 16, 2020

[REQUIRED] Environment info

firebase-tools: 7.15.0

Platform: linux

[REQUIRED] Test case

$ firebase projects:create
? Please specify a unique project id (warning: cannot be modified afterward) [6-30 characters]:
 bird-test
? What would you like to call your project? (defaults to your project ID) Bird Com
✖ Creating Google Cloud Platform project

Error: Failed to create Google Cloud project. See firebase-debug.log for more info.

[REQUIRED] Steps to reproduce

firebase projects:create

[REQUIRED] Expected behavior

Create new firebase project

[REQUIRED] Actual behavior

Showing Error:

✖ Creating Google Cloud Platform project

Error: Failed to create Google Cloud project. See firebase-debug.log for more info.
[2020-03-16T13:06:26.340Z] ----------------------------------------------------------------------
[2020-03-16T13:06:26.342Z] Command:       /usr/bin/node /usr/bin/firebase projects:create --debug
[2020-03-16T13:06:26.343Z] CLI Version:   7.15.0
[2020-03-16T13:06:26.343Z] Platform:      linux
[2020-03-16T13:06:26.343Z] Node Version:  v10.16.0
[2020-03-16T13:06:26.343Z] Time:          Mon Mar 16 2020 18:36:26 GMT+0530 (India Standard Time)
[2020-03-16T13:06:26.343Z] ----------------------------------------------------------------------
[2020-03-16T13:06:26.343Z] 
[2020-03-16T13:06:26.347Z] > 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"]
[2020-03-16T13:06:26.347Z] > authorizing via signed-in user
? Please specify a unique project id (warning: cannot be modified afterward) [6-30 characters]:
 bird-test
? What would you like to call your project? (defaults to your project ID) 
⠋ Creating Google Cloud Platform project[2020-03-16T13:06:33.371Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects  
 projectId=bird-test, name=bird-test, parent=undefined
⠧ Creating Google Cloud Platform project[2020-03-16T13:06:35.604Z] <<< HTTP RESPONSE 409 vary=X-Origin, Referer, Origin,Accept-Encoding, content-type=application/json; charset=UTF-8, date=Mon, 16 Mar 2020 13:06:35 GMT, server=ESF, cache-control=private, x-xss-protection=0, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, server-timing=gfet4t7; dur=1658, alt-svc=quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000, accept-ranges=none, transfer-encoding=chunked
[2020-03-16T13:06:35.605Z] <<< HTTP RESPONSE BODY code=409, message=Requested entity already exists, status=ALREADY_EXISTS
[2020-03-16T13:06:35.613Z] HTTP Error: 409, Requested entity already exists
✖ Creating Google Cloud Platform project
[2020-03-16T13:06:36.512Z] FirebaseError: HTTP Error: 409, Requested entity already exists
    at module.exports (/usr/lib/node_modules/firebase-tools/lib/responseToError.js:38:12)
    at Request._callback (/usr/lib/node_modules/firebase-tools/lib/api.js:39:35)
    at Request.self.callback (/usr/lib/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.<anonymous> (/usr/lib/node_modules/firebase-tools/node_modules/request/request.js:1154:10)
    at Request.emit (events.js:198:13)
    at Request.EventEmitter.emit (domain.js:448:20)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/firebase-tools/node_modules/request/request.js:1076:12)
    at Object.onceWrapper (events.js:286:20)
    at IncomingMessage.emit (events.js:203:15)
    at IncomingMessage.EventEmitter.emit (domain.js:448:20)
    at endReadableNT (_stream_readable.js:1129:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Error: Failed to create Google Cloud project. See firebase-debug.log for more info.

Output of firebase projects:list

✔ Preparing the list of your Firebase projects
No projects found.
@samtstern
Copy link
Contributor

samtstern commented Mar 16, 2020 via email

@arshul
Copy link
Author

arshul commented Mar 16, 2020

@samtstern No there's no project named bird-test, also I tried other names as well but faced the same issue.
Is it like we have to provide the project id globally unique? I mean, that has not been taken by any of the firebase projects?

@bkendall
Copy link
Contributor

It looks like bird-test is a project that already exists (and that error message doesn't make it to the output of the command). A more unique name needs to be provided.

As an action that could be taken: that error message should be output in the command.

@arshul
Copy link
Author

arshul commented Mar 16, 2020

@bkendall yeah, perhaps it exists for some other user somewhere in google, but not for my account.
Is it like we have to provide a unique id that is not taken by any other project in firebase at all? In that case, is there any way to automatically generate the unique project ID on the go via CLI?

@bkendall
Copy link
Contributor

Yes, they have to be globally unique across google (cloud platform).

We could have some unique ID generation a loop if a 409 comes back, sure. :)

In the meantime, the console does do some random generating if there's a conflict, if it's convenient for you to create the projects there.

@arshul
Copy link
Author

arshul commented Mar 17, 2020

No, actually I am trying to create a script to set up a firebase project, I'll try to provide the unique ID as of now but it may not be a foolproof approach. It would be really helpful if the unique ID is generated automatically by CLI.
Thanks.

@samtstern
Copy link
Contributor

@arshul thanks for the feedback! Right now it's not feasible for the CLI to check/generate unique IDs so I am going to close this. If you ever get stuck here, the Firebase console does this automatically during project creation so it's better to create projects there and then use them through the CLI.

@monticp
Copy link

monticp commented Jun 3, 2020

Same error, but I've tried several id's and doesn't work. Maybe a connection problem?

@samtstern
Copy link
Contributor

@monticp could be! I would suggest creating your project in the Firebase console in that case.

@monticp

This comment has been minimized.

@monticp

This comment has been minimized.

@HeinB007
Copy link

I had the same issue , I disconnected my vpn and it worked right away

@monticp
Copy link

monticp commented Jul 25, 2020

It was a credential problem. Nothing about Firebase at the end.

@guptaji048
Copy link

It was a credential problem. Nothing about Firebase at the end.

I logged in successfully using firebase login, but it still showing the same error

@SmartDevStar
Copy link

I've faced same issues!
? Please specify a unique project id (warning: cannot be modified afterward) [6-30 characters]:
RNTStudentsWeb
? What would you like to call your project? (defaults to your project ID)
× Creating Google Cloud Platform project

Error: Failed to create project. See firebase-debug.log for more info.

@samarth-sxngh
Copy link

im facing the same issue,
Failed to create project. See firebase-debug.log for more info.

i tried, firebase login --reauth yet it doesnt work tried 5-10 unique project names still not happeining.

@sunilsharmapoudel
Copy link

I solved this issue. I was using the random identifier '0000001' as a unique identifier, but it was not working and always gave the same error: 'Failed to create project. See firebase-debug.log for more info.' However, when I logged in and used the unique identifier provided by the Google Console, it worked right away in the CLI. I think there was a problem with my initial unique identifier. Hope this helps.

image

@raffscardoso
Copy link

raffscardoso commented May 29, 2024

Hey, I was having the same issue. What worked for me was creating my project on the Firebase Console website https://console.firebase.google.com
So after I created my project there, I just used the terminal with the init command and synced my workspace with the Firebase project.

firebase init

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants