cypress-firebase icon indicating copy to clipboard operation
cypress-firebase copied to clipboard

callFirestore task fails when running in the CI with message "PERMISSION_DENIED: Missing or insufficient permissions."

Open ComradeAERGO opened this issue 1 year ago • 1 comments

Thanks for setting up this great library.

Everything seems to work fine when running my tests locally on the Emulator.

However, when running in the CI (Github Action), even though I can successfully login my users, my attempts to call cy.callFirestore throw the following error

cy.task('callFirestore') failed with the following error:

> 7 PERMISSION_DENIED: Missing or insufficient permissions.

I've set the SERVICE_ACCOUNT environment variable into my CI workflow

And since the login is correctly going through and authenticating in my environment's Firestore, I don't see what could be causing this.

ComradeAERGO avatar Mar 07 '23 17:03 ComradeAERGO

What about your firestore rules?

This in your firestore.rules file would whitelist all requests (not suitable for production):

match /{document=**} {
  allow create, read, update, delete;
}

michaeldawson avatar Jul 28 '23 17:07 michaeldawson