-
Notifications
You must be signed in to change notification settings - Fork 53
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
[bug]: project configuration failing using flutterfire #363
Comments
@Fintal78 - if the entity already exists and you're not seeing it. I would look at who you're logged in as on the Firebase CLI, perhaps you have more than one email/gmail account which has Firebase setup and it is creating Firebase projects on a different account. |
thanks for your quick reply. When I execute the command firebase login it confirms that this account is used. |
Could you please provide some help here. One single account is being used as mentioned above. |
@Fintal78 - Is it something to do with this?
Under the hood, we are using Firebase CLI to create the project. If you enable the scope mentioned above, does FFCLI work? |
Somehow the issue got solved. I got a notification that there was a new version of Flutter available so I installed the last version. Then dependency issues appeared that I managed to solve. Then I ran "flutter configure" again but this time I got another error saying that I didn't have the rights... So I created the project directly via https://console.firebase.google.com/ and then chose that project after running "flutter configure". It went well after that. |
Thank you for the update. Seems like an edge case as I haven't seen this before. Closing for now, but let us know if you see it again 🙏 |
OK thanks, will do. |
Is there an existing issue for this?
CLI Version
1.0.1-dev.4
Firebase Tools version
13.29.1
Flutter Doctor Output
[√] Flutter (Channel stable, 3.27.1, on Microsoft Windows [Version 10.0.22631.4751], locale fr-FR)
• Flutter version 3.27.1 on channel stable at C:\dev\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 17025dd882 (4 weeks ago), 2024-12-17 03:23:09 +0900
• Engine revision cb4b5fff73
• Dart version 3.6.0
• DevTools version 2.40.2
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
• Android SDK at C:\Users\Ion\AppData\Local\Android\sdk
• Platform android-35, build-tools 35.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[X] Visual Studio - develop Windows apps
X Visual Studio not installed; this is necessary to develop Windows apps.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2024.2)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.3+-12282718-b509.11)
[√] VS Code (version 1.70.0)
• VS Code at C:\Users\Ion\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.60.0
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22631.4751]
• Chrome (web) • chrome • web-javascript • Google Chrome 131.0.6778.265
• Edge (web) • edge • web-javascript • Microsoft Edge 131.0.2903.146
[√] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.
Description
See the description of the issue below. I created an issue on the flutterfire Github but I was said to create an issue here.
Here is the link to that initial issue that redirected me here:
firebase/flutterfire#16963 (comment)
Description of the issue:
I am trying to create a new flutter/firebase project using the command "flutterfire configure"
I am getting the following error message: "Failed to create project because there is already a project with ID project-network-new. Please try again with a unique project ID."
I tried several project names and it still doesn't work. Looking into the debug file it seems like the requests are done twice, which could explain a fail after the second attempt since the project name would already have been taken after the first attempt. But I looked into https://console.firebase.google.com/ and there was no project to be found for my account ([email protected])
Here is the firebase-debug.log:
[debug] [2025-01-12T09:51:59.827Z] > 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] [2025-01-12T09:51:59.828Z] > authorizing via signed-in user ([email protected])
[debug] [2025-01-12T09:51:59.830Z] Checked if tokens are valid: true, expires at: 1736677518503
[debug] [2025-01-12T09:51:59.831Z] Checked if tokens are valid: true, expires at: 1736677518503
[debug] [2025-01-12T09:51:59.832Z] >>> [apiv2][query] POST https://cloudresourcemanager.googleapis.com/v1/projects [none]
[debug] [2025-01-12T09:51:59.832Z] >>> [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects {"projectId":"project-network-new","name":"project-network-new"}
[debug] [2025-01-12T09:52:00.934Z] <<< [apiv2][status] POST https://cloudresourcemanager.googleapis.com/v1/projects 409
[debug] [2025-01-12T09:52:00.934Z] <<< [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects {"error":{"code":409,"message":"Requested entity already exists","status":"ALREADY_EXISTS"}}
[debug] [2025-01-12T09:52:01.051Z] FirebaseError: Request to https://cloudresourcemanager.googleapis.com/v1/projects had HTTP Error: 409, Requested entity already exists
at responseToError (C:\Users\Ion\AppData\Roaming\npm\node_modules\firebase-tools\lib\responseToError.js:52:12)
at RetryOperation._fn (C:\Users\Ion\AppData\Roaming\npm\node_modules\firebase-tools\lib\apiv2.js:312:77)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[error]
[error] Error: Failed to create project because there is already a project with ID project-network-new. Please try again with a unique project ID.
Then I also tried to create the project using the command "firebase projects:create ...." and it still failed.
According to the firebase-debug.log I do not have permission:
[debug] [2025-01-12T10:04:31.048Z] > 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] [2025-01-12T10:04:31.049Z] > authorizing via signed-in user ([email protected])
[debug] [2025-01-12T10:04:38.076Z] Checked if tokens are valid: true, expires at: 1736677518503
[debug] [2025-01-12T10:04:38.077Z] Checked if tokens are valid: true, expires at: 1736677518503
[debug] [2025-01-12T10:04:38.078Z] >>> [apiv2][query] POST https://cloudresourcemanager.googleapis.com/v1/projects [none]
[debug] [2025-01-12T10:04:38.079Z] >>> [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects {"projectId":"project-network-new2","name":"project-network-new2"}
[debug] [2025-01-12T10:04:39.109Z] <<< [apiv2][status] POST https://cloudresourcemanager.googleapis.com/v1/projects 200
[debug] [2025-01-12T10:04:39.109Z] <<< [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects {"name":"operations/cp.8073184260479737807"}
[debug] [2025-01-12T10:04:39.110Z] Checked if tokens are valid: true, expires at: 1736677518503
[debug] [2025-01-12T10:04:39.110Z] Checked if tokens are valid: true, expires at: 1736677518503
[debug] [2025-01-12T10:04:39.110Z] >>> [apiv2][query] GET https://cloudresourcemanager.googleapis.com/v1/operations/cp.8073184260479737807 [none]
[debug] [2025-01-12T10:04:39.991Z] <<< [apiv2][status] GET https://cloudresourcemanager.googleapis.com/v1/operations/cp.8073184260479737807 200
[debug] [2025-01-12T10:04:39.991Z] <<< [apiv2][body] GET https://cloudresourcemanager.googleapis.com/v1/operations/cp.8073184260479737807 {"name":"operations/cp.8073184260479737807"}
[debug] [2025-01-12T10:04:40.502Z] [Project Creation Poller] Retrying task index 0
[debug] [2025-01-12T10:04:40.504Z] Checked if tokens are valid: true, expires at: 1736677518503
[debug] [2025-01-12T10:04:40.504Z] Checked if tokens are valid: true, expires at: 1736677518503
[debug] [2025-01-12T10:04:40.504Z] >>> [apiv2][query] GET https://cloudresourcemanager.googleapis.com/v1/operations/cp.8073184260479737807 [none]
[debug] [2025-01-12T10:04:40.828Z] <<< [apiv2][status] GET https://cloudresourcemanager.googleapis.com/v1/operations/cp.8073184260479737807 200
[debug] [2025-01-12T10:04:40.828Z] <<< [apiv2][body] GET https://cloudresourcemanager.googleapis.com/v1/operations/cp.8073184260479737807 {"name":"operations/cp.8073184260479737807"}
[debug] [2025-01-12T10:04:41.835Z] [Project Creation Poller] Retrying task index 0
[debug] [2025-01-12T10:04:41.836Z] Checked if tokens are valid: true, expires at: 1736677518503
[debug] [2025-01-12T10:04:41.837Z] Checked if tokens are valid: true, expires at: 1736677518503
[debug] [2025-01-12T10:04:41.837Z] >>> [apiv2][query] GET https://cloudresourcemanager.googleapis.com/v1/operations/cp.8073184260479737807 [none]
[debug] [2025-01-12T10:04:42.180Z] <<< [apiv2][status] GET https://cloudresourcemanager.googleapis.com/v1/operations/cp.8073184260479737807 200
[debug] [2025-01-12T10:04:42.180Z] <<< [apiv2][body] GET https://cloudresourcemanager.googleapis.com/v1/operations/cp.8073184260479737807 {"name":"operations/cp.8073184260479737807","metadata":{"@type":"type.googleapis.com/google.cloudresourcemanager.v1.ProjectCreationStatus","gettable":true}}
[debug] [2025-01-12T10:04:44.184Z] [Project Creation Poller] Retrying task index 0
[debug] [2025-01-12T10:04:44.185Z] Checked if tokens are valid: true, expires at: 1736677518503
[debug] [2025-01-12T10:04:44.185Z] Checked if tokens are valid: true, expires at: 1736677518503
[debug] [2025-01-12T10:04:44.185Z] >>> [apiv2][query] GET https://cloudresourcemanager.googleapis.com/v1/operations/cp.8073184260479737807 [none]
[debug] [2025-01-12T10:04:44.537Z] <<< [apiv2][status] GET https://cloudresourcemanager.googleapis.com/v1/operations/cp.8073184260479737807 200
[debug] [2025-01-12T10:04:44.537Z] <<< [apiv2][body] GET https://cloudresourcemanager.googleapis.com/v1/operations/cp.8073184260479737807 {"name":"operations/cp.8073184260479737807","metadata":{"@type":"type.googleapis.com/google.cloudresourcemanager.v1.ProjectCreationStatus","gettable":true,"ready":true},"done":true,"response":{"@type":"type.googleapis.com/google.cloudresourcemanager.v1.Project","projectNumber":"897163563423","projectId":"project-network-new2","lifecycleState":"ACTIVE","name":"project-network-new2","createTime":"2025-01-12T10:04:39.609811Z"}}
[debug] [2025-01-12T10:04:44.538Z] Checked if tokens are valid: true, expires at: 1736677518503
[debug] [2025-01-12T10:04:44.538Z] Checked if tokens are valid: true, expires at: 1736677518503
[debug] [2025-01-12T10:04:44.538Z] >>> [apiv2][query] POST https://firebase.googleapis.com/v1beta1/projects/project-network-new2:addFirebase [none]
[debug] [2025-01-12T10:04:45.761Z] <<< [apiv2][status] POST https://firebase.googleapis.com/v1beta1/projects/project-network-new2:addFirebase 403
[debug] [2025-01-12T10:04:45.762Z] <<< [apiv2][body] POST https://firebase.googleapis.com/v1beta1/projects/project-network-new2:addFirebase {"error":{"code":403,"message":"The caller does not have permission","status":"PERMISSION_DENIED"}}
[debug] [2025-01-12T10:04:45.762Z] Request to https://firebase.googleapis.com/v1beta1/projects/project-network-new2:addFirebase had HTTP Error: 403, The caller does not have permission
[debug] [2025-01-12T10:04:45.977Z] FirebaseError: Request to https://firebase.googleapis.com/v1beta1/projects/project-network-new2:addFirebase had HTTP Error: 403, The caller does not have permission
at responseToError (C:\Users\Ion\AppData\Roaming\npm\node_modules\firebase-tools\lib\responseToError.js:52:12)
at RetryOperation._fn (C:\Users\Ion\AppData\Roaming\npm\node_modules\firebase-tools\lib\apiv2.js:312:77)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[error]
[error] Error: Failed to add Firebase to Google Cloud Platform project. See firebase-debug.log for more info.
Thanks for your help!
Steps to reproduce
steps provided above
Expected behavior
to not have an error using flutterfire configure
Screenshots
No response
Additional context and comments
No response
The text was updated successfully, but these errors were encountered: