Hi Shopify Community,
We’re encountering an issue with the bulkOperationRunQuery
when trying to fetch products and variations for stores with large catalogs (10,000+ products). Here’s the situation:
- During the previous installation, a bulk operation was performed.
- After reinstalling our app, the store is assigned a new access token.
- To prevent conflicts, we’re attempting to cancel the previous bulk operation using
bulkOperationCancel
.
However, when we try to cancel the bulk query from the previous installation, we receive an error indicating that the “bulk operation is not found.”
It seems the new access token prevents us from accessing or canceling the old bulk operations. Has anyone faced a similar issue? What would be the best approach to handle bulk operations for stores with large product catalogs during app reinstallations?
Thanks in advance for your help!
I don’t think there is much you can do here. If someone uninstalls while your app is processing etc. I think you’d just have to start the job again and let Shopify deal with the old job.
Bulk operations are scoped to your app anyway, which is why you can’t access other apps bulk jobs, but this means you’re safe to create a new job.
However, I am facing an error while running a new bulk operation because the bulk query ran before uninstallation has not yet been completed.
I’m not quite sure I understand.
If someone uninstalls your app before the bulk query is finished, you should be cleaning up the data you store, so that it wouldn’t matter that you don’t get the results from the bulk query.
If someone reinstalls your app you’d just have to start the job again and let Shopify deal with the old job.
Bulk operations are scoped to your app anyway, which is why you can’t access other apps bulk jobs, but this means you’re safe to create a new job.