OriginProtocol / dshop

Origin Dshop - launch your own decentralized store
https://www.originprotocol.com/dshop
MIT License
138 stars 87 forks source link

Printful sync failures #714

Open franckc opened 3 years ago

franckc commented 3 years ago

We have some failures in the printfulSync queue in production. See https://dshop.originprotocol.com/super-admin/queue There seem to be 2 different types of errors:

    at /app/backend/scripts/printful/writeProductData.js:157:44
    at Array.forEach (<anonymous>)
    at writeProductData (/app/backend/scripts/printful/writeProductData.js:134:31)
    at Queue.processor (/app/backend/queues/printfulSyncProcessor.js:48:9)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

And

Error: ENOENT: no such file or directory, open '/data/dshop-cache/mainnet/gitcoin/printful-products.json'
    at Object.openSync (fs.js:476:3)
    at Object.readFileSync (fs.js:377:35)
    at getProductIds (/app/backend/scripts/printful/getProductIds.js:4:26)
    at downloadProductData (/app/backend/scripts/printful/downloadProductData.js:35:32)
    at Queue.processor (/app/backend/queues/printfulSyncProcessor.js:34:28)
    at handlers.<computed> (/app/node_modules/bull/lib/queue.js:656:42)
    at Queue.processJob (/app/node_modules/bull/lib/queue.js:1087:22)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

I think those started happening because I fixed the webhook for a lot of shops yesterday.

franckc commented 3 years ago

CC @shahthepro in case he knows on top of his head what the root cause is, otherwise I can take a look.

shahthepro commented 3 years ago

I'm not sure either. But let me take a look at this today