While writing a "cloud function" on Firebase, my computer couldn't write to firestore while my co-worker's computer could. No matter how many times I logged out and logged in, I got this error:
error: { Error: Missing or insufficient permissions.
at /.../functions/node_modules/grpc/src/client.js:554:15 code: 7, metadata: Metadata { _internal_repr: {} } }
The problem turned out to be related to using firebase logout
and firebase login
again. This reply to the GitHub issue provides a workaround:
https://github.com/firebase/firebase-tools/issues/344#issuecomment-303848830
Specifically:
- Install and initialize gcloud:
- https://cloud.google.com/sdk/downloads#interactive
- Run gcloud auth application-default login in any directory
- Run firebase serve --only functions
Top comments (0)