algolia / firestore-algolia-search

Apache License 2.0
112 stars 35 forks source link

Issue with executeFullIndexOperation #160

Closed alfjesus closed 1 year ago

alfjesus commented 1 year ago

Hello!

Tried to install the extension via Firebase console. My Firestore db is residing in region europe-west1, hence I also configured the extension in europe-west1 region. The install seems to go well but after the installation has completed it get stuck in Processing state when trying to rebuild the full index.

After looking in the cloud function logs I found this:

Unhandled error FirebaseFunctionsError: The principal (user or service account) lacks IAM permission "cloudtasks.tasks.create" for the resource "projects/[project-id]/locations/us-central1/queues/ext-firestore-algolia-search-sowcal-executeFullIndexOperation" (or the resource may not exist).

It is trying to access the extension in us-central region but since the I have deployed this extension in europe-west1, it can't be found.

Tried to reinstall several times but same error happens every time.

Please let me know if you need any more information from my side.

Thanks!

smomin commented 1 year ago

hey @alfjesus just to be clear, the extension installs fine, but reindexing fails because the indexing is running in a different region. Is this only an issue when full indexing? Have you made a change to a document to see if real time indexing works?

Also, I am checking with the Google Firebase team on this as well.

alfjesus commented 1 year ago

Hi @smomin ! Yes I have tried to change an existing document but it will not index that document unfortunately. One thing I have also noticed now is that the full indexing is actually indexing 250 records to Algolia (see attached screenshot) but then stops with the error mention before. The total number of records in the underlying firestore collection is approx 2000 documents.

image

JFGHT commented 1 year ago

Just noticed that this is the very same as my issue:

https://github.com/algolia/firestore-algolia-search/issues/161

alfjesus commented 1 year ago

@smomin #162 definitely looks like it's going to fix my issue 👏

Now just waiting for the PR to be merged and a new release 🙂

smomin commented 1 year ago

hey @alfjesus

I have created a RC https://console.firebase.google.com/project/_/extensions/install?ref=algolia/firestore-algolia-search@1.1.1-rc.0. Use this RC version while the final build is going through the Firebase Approval process. Let me know if you encounter any issues here.