omi icon indicating copy to clipboard operation
omi copied to clipboard

`403 PermissionDenied` Errors on Firestore Calls Across Multiple Routes

Open neooriginal opened this issue 7 months ago • 1 comments

Description:

I'm encountering 403 PermissionDenied errors when calling Firestore in multiple API routes. Here's an example from the /v1/users/language route:

PATCH /v1/users/language -> 500 Internal Server Error
google.api_core.exceptions.PermissionDenied: 403 Missing or insufficient permissions.

The error trace confirms the failure happens during a .set() call on a Firestore document reference.

Relevant code snippet:

user_ref.set({'language': language}, merge=True)

This happens across most Firestore operations, not just the language update route, suggesting a global permission issue with Firebase/Firestore setup.

Likely Cause

The backend likely lacks the necessary authentication or permissions to write to Firestore. It's possibly misconfigured Firebase service account credentials or missing Firestore IAM roles.

Help Needed

What exactly am i doing wrong?

neooriginal avatar May 20 '25 12:05 neooriginal

Image my service account has "owner" role

neooriginal avatar May 20 '25 12:05 neooriginal