Its my first time working with Firebase CLI. I have created an account, registered etc.
I also have logged on to https://console.cloud.google.com/ and accepted the terms and conditions (which was an initial error i faced)
Im using the command:
flutterfire configure
As shown in a tutorial im following to create the project but i get the error 403. I have looked around stack and found others with the same issue regarding firebase but all solutions have been suggesting asking the admin to give you a role.
In my case, im the owner of the project and im just trying to create a new one and still get the error. Also after i use flutterfire configure and i enter the name, it gives me the 403 error in CLI but the project is present in https://console.cloud.google.com/.
[debug] [2022-06-02T06:28:10.130Z] <<< [apiv2][status] POST https://firebase.googleapis.com/v1beta1/projects/xnotes26657:addFirebase 403
[debug] [2022-06-02T06:28:10.130Z] <<< [apiv2][body] POST https://firebase.googleapis.com/v1beta1/projects/xnotes26657:addFirebase {"error":{"code":403,"message":"The caller does not have permission","status":"PERMISSION_DENIED"}}
Here is the whole CLI interaction
PS D:\Flutter apps\notesapp> flutterfire configure
i Found 0 Firebase projects.
✔ Enter a project id for your new Firebase project (e.g. my-cool-project) · xnotes26657
i New Firebase project xnotes26657 created succesfully.
FirebaseCommandException: An error occured on the Firebase CLI when attempting to run a command.
COMMAND: firebase projects:create xnotes26657 --json
ERROR: Failed to add Firebase to Google Cloud Platform project. See firebase-debug.log for more info.
Full debug log
[debug] [2022-06-02T06:28:03.862Z] ----------------------------------------------------------------------
[debug] [2022-06-02T06:28:03.868Z] Command: C:\Program Files\nodejs\node.exe C:\Users\Asus\AppData\Roaming\npm\node_modules\firebase-tools\lib\bin\firebase.js projects:create xnotes26657 --json
[debug] [2022-06-02T06:28:03.869Z] CLI Version: 11.0.1
[debug] [2022-06-02T06:28:03.869Z] Platform: win32
[debug] [2022-06-02T06:28:03.870Z] Node Version: v16.15.0
[debug] [2022-06-02T06:28:03.872Z] Time: Thu Jun 02 2022 11:28:03 GMT+0500 (Pakistan Standard Time)
[debug] [2022-06-02T06:28:03.873Z] ----------------------------------------------------------------------
[debug]
[debug] [2022-06-02T06:28:03.890Z] > 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] [2022-06-02T06:28:03.891Z] > authorizing via signed-in user ([email protected])
[debug] [2022-06-02T06:28:03.901Z] >>> [apiv2][query] POST https://cloudresourcemanager.googleapis.com/v1/projects [none]
[debug] [2022-06-02T06:28:03.902Z] >>> [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects {"projectId":"xnotes26657","name":"xnotes26657"}
[debug] [2022-06-02T06:28:05.565Z] <<< [apiv2][status] POST https://cloudresourcemanager.googleapis.com/v1/projects 200
[debug] [2022-06-02T06:28:05.565Z] <<< [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects {"name":"operations/cp.7839592421547640207"}
[debug] [2022-06-02T06:28:05.567Z] >>> [apiv2][query] GET https://cloudresourcemanager.googleapis.com/v1/operations/cp.7839592421547640207 [none]
[debug] [2022-06-02T06:28:07.148Z] <<< [apiv2][status] GET https://cloudresourcemanager.googleapis.com/v1/operations/cp.7839592421547640207 200
[debug] [2022-06-02T06:28:07.148Z] <<< [apiv2][body] GET https://cloudresourcemanager.googleapis.com/v1/operations/cp.7839592421547640207 {"name":"operations/cp.7839592421547640207"}
[debug] [2022-06-02T06:28:07.662Z] [Project Creation Poller] Retrying task index 0
[debug] [2022-06-02T06:28:07.664Z] >>> [apiv2][query] GET https://cloudresourcemanager.googleapis.com/v1/operations/cp.7839592421547640207 [none]
[debug] [2022-06-02T06:28:09.260Z] <<< [apiv2][status] GET https://cloudresourcemanager.googleapis.com/v1/operations/cp.7839592421547640207 200
[debug] [2022-06-02T06:28:09.260Z] <<< [apiv2][body] GET https://cloudresourcemanager.googleapis.com/v1/operations/cp.7839592421547640207 {"name":"operations/cp.7839592421547640207","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":"658074243279","projectId":"xnotes26657","lifecycleState":"ACTIVE","name":"xnotes26657","createTime":"2022-06-02T06:28:04.010Z"}}
[debug] [2022-06-02T06:28:09.262Z] >>> [apiv2][query] POST https://firebase.googleapis.com/v1beta1/projects/xnotes26657:addFirebase [none]
[debug] [2022-06-02T06:28:10.130Z] <<< [apiv2][status] POST https://firebase.googleapis.com/v1beta1/projects/xnotes26657:addFirebase 403
[debug] [2022-06-02T06:28:10.130Z] <<< [apiv2][body] POST https://firebase.googleapis.com/v1beta1/projects/xnotes26657:addFirebase {"error":{"code":403,"message":"The caller does not have permission","status":"PERMISSION_DENIED"}}
[debug] [2022-06-02T06:28:10.132Z] HTTP Error: 403, The caller does not have permission
[debug] [2022-06-02T06:28:10.291Z] FirebaseError: HTTP Error: 403, The caller does not have permission
at module.exports (C:\Users\Asus\AppData\Roaming\npm\node_modules\firebase-tools\lib\responseToError.js:47:12)
at RetryOperation._fn (C:\Users\Asus\AppData\Roaming\npm\node_modules\firebase-tools\lib\apiv2.js:286:39)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[error]
[error] Error: Failed to add Firebase to Google Cloud Platform project. See firebase-debug.log for more info.
Hey man sorry for the late reply. I had the same exact issue and was able to resolve it by doing the following:
Steps to Follow
Screenshots
Firebase Console Create Project Button
Naming Project
flutterfire configure command in Android Studio terminal
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With