algolia / firestore-algolia-search

Apache License 2.0
112 stars 35 forks source link

FirebaseFunctionsError: The principal lacks IAM permission "cloudtasks.tasks.create" #192

Closed dylanrandle closed 9 months ago

dylanrandle commented 11 months ago

After upgrading the Algolia search extension from 0.5.14 to 1.2.0 I found that one of my extension instances was emitting the following error in the executeFullIndexOperation Cloud Functions logs.

Unhandled error FirebaseFunctionsError: The principal (user or service account) lacks IAM permission "cloudtasks.tasks.create" for the resource "projects/{my-project}/locations/{my-location}/queues/ext-firestore-algolia-search-executeFullIndexOperation" (or the resource may not exist).

This seems to be the same/similar issue as here: https://github.com/firebase/extensions/issues/1651. Following the advice in that issue, I was able to solve this issue by uninstalling and reinstalling the extension.

The odd part is that the service account and queue seemed to be correctly created/configured (as far as I can tell).

Note that I have 3 projects, each with 3 instances of the firestore-algolia-search extension, for a total of 9 extensions that I upgraded, and I only observed this on a single one of my instances.

smomin commented 10 months ago

hey @dylanrandle thanks for the observation. The installation and configuration of the extension is handled by the Firebase Extension framework. They would be interested in this observation to see if there is issues in their extension framework. I will also see what I can find on my end.

smomin commented 9 months ago

closing due to inactivity.