mulllhausen
mulllhausen

Reputation: 4435

Firebase fails to repair project permissions

In my Google Firebase project console, when I go to the storage page

https://console.firebase.google.com/u/0/project/my-project-name-here/storage/my-project-name-here.appspot.com/files

I see errors in the console

console errors

Access to XMLHttpRequest at 'https://firebasestorage.clients6.google.com/v0/b/my-project-name-here.appspot.com/o?prefix=&internal_legacy=true&delimiter=%2F&maxResults=100' from origin 'https://console.firebase.google.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.

GET https://firebasestorage.clients6.google.com/v0/b/my-project-name-here.appspot.com/o?prefix=&internal_legacy=true&delimiter=%2F&maxResults=100 net::ERR_FAILED

I also see a warning on the page, which I assume is due to the same error

Due to recent security improvements to Cloud Storage for Firebase, you must update your project settings.

storage page error

I click Fix Issue which brings up the following popup

Repair project permissions popup

Then click Attach Permissions which gives the following error:

Repair project permissions An error occurred updating the project's permissions. Please try again. To allow Cloud Storage for Firebase to function properly, a service account on this project needs to be granted an additional IAM role

An error occurred updating the project's permissions

What is going on here? And how can I fix it to make the error messages go away?

Upvotes: 0

Views: 266

Answers (2)

Andi F.
Andi F.

Reputation: 776

I had the very same issue, and updating the service account didn't work for me.

Fortunately, although the project was old, there was yet no data in the Firebase Storage bucket. I added a new bucket of the same name and the issue disappeared.

I assume that the issue is very specific to projects that were created when Firebase Storage wasn't that mature.

Upvotes: 0

Frank van Puffelen
Frank van Puffelen

Reputation: 599716

firebaser here

The Firebase console is supposed to automatically grant this permission, but it look like that's not working for you at the moment.

If I recall correctly, you need to make sure that the Firebase Storage service account has the Storage Admin IAM permission. If you can't get to work, reach out to Firebase support for personalized help in troubleshooting - as they have playbooks to tell you want to do. Reaching out to them might be a good idea in general, as they'll be able to alert the engineering team to the problem too.

Upvotes: 0

Related Questions