useWorker icon indicating copy to clipboard operation
useWorker copied to clipboard

Uncaught DOMException: Failed to execute 'postMessage' on 'Worker': An object could not be cloned

Open sulhadin opened this issue 4 years ago • 9 comments

A clear and concise description of what the bug is.

Uncaught (in promise) DOMException: Failed to execute 'postMessage' on 'Worker': capacityList => { console.log(capacityList); const capacityMap = { Total: {} }; let i = 0;

for (...... } could not be cloned. at http://localhost:8089/js/modules/npm.koale.bundle-1600196980210.js:16:3150 at new Promise () at http://localhost:8089/js/modules/npm.koale.bundle-1600196980210.js:16:2782 at http://localhost:8089/js/modules/npm.koale.bundle-1600196980210.js:16:3619 at runReport (http://localhost:8089/js/app.bundle-1600196980210.js:54075:26) at http://localhost:8089/js/app.bundle-1600196980210.js:54105:5 at commitHookEffectListMount (http://localhost:8089/js/modules/npm.react-dom.bundle-1600196980210.js:23796:26) at commitPassiveHookEffects (http://localhost:8089/js/modules/npm.react-dom.bundle-1600196980210.js:23834:11) at HTMLUnknownElement.callCallback (http://localhost:8089/js/modules/npm.react-dom.bundle-1600196980210.js:4253:14) at Object.invokeGuardedCallbackDev (http://localhost:8089/js/modules/npm.react-dom.bundle-1600196980210.js:4302:16) at invokeGuardedCallback (http://localhost:8089/js/modules/npm.react-dom.bundle-1600196980210.js:4357:31) at flushPassiveEffectsImpl (http://localhost:8089/js/modules/npm.react-dom.bundle-1600196980210.js:26918:9) at unstable_runWithPriority (http://localhost:8089/js/modules/npm.scheduler.bundle-1600196980210.js:1024:12) at runWithPriority$1 (http://localhost:8089/js/modules/npm.react-dom.bundle-1600196980210.js:15104:10) at flushPassiveEffects (http://localhost:8089/js/modules/npm.react-dom.bundle-1600196980210.js:26885:12) at performSyncWorkOnRoot (http://localhost:8089/js/modules/npm.react-dom.bundle-1600196980210.js:25802:3)

sulhadin avatar Sep 15 '20 19:09 sulhadin

Hi! Thanks for reporting.

Can you share your code or a minimal reproduction in a CodeSandbox or repo for us to take a look?

zant avatar Sep 27 '20 16:09 zant

@zant Any update on this?

kvpasupuleti avatar May 25 '21 16:05 kvpasupuleti

Facing same issue

gondar00 avatar Feb 24 '22 11:02 gondar00

any news?

laphilosophia avatar Mar 03 '22 12:03 laphilosophia

Hitting the same thing

willh33 avatar Mar 15 '22 17:03 willh33

I have same problem

QC2168 avatar Aug 07 '22 11:08 QC2168

Same issue

aurelien-boubennec avatar Sep 17 '22 03:09 aurelien-boubennec

Experiencing same issue, this happens when passing a function to the worker

menasheh avatar Jul 31 '23 19:07 menasheh

Same issue here

Reg011 avatar Mar 01 '24 21:03 Reg011