DataCloneError: Failed to execute 'postMessage' on 'Window': ErrorEvent object could not be cloned.
See original GitHub issueI’m getting this error reported in Sentry:
Timeout: Did not receive an init message from worker after 10000ms. Make sure the worker calls expose().
With another error:
Not reporting uncaught error back to master thread as it occured while reporting an uncaught error already. Latest error: DataCloneError: Failed to execute 'postMessage' on 'Window': ErrorEvent object could not be cloned.
The second error might be unrelated, it’s hard to see in Sentry. But it seems to happen 9 or 10 seconds before the timeout error so that matches up.
Seems to happen to both Chrome 80 and Safari 13 users.
Any idea what might be causing this? My workers all call expose():
import { expose } from 'threads/worker'
...
expose({
getCommonLocations
})
Issue Analytics
- State:
- Created 3 years ago
- Comments:25 (11 by maintainers)
Top Results From Across the Web
Failed to execute 'postMessage' on 'Window': An object could ...
This happens all the time, if something can not be duplicated by the structured clone algorithm. This algorithm is used by window.postMessage ....
Read more >DOMException: Failed to execute 'postMessage' on 'Window'
`Uncaught (in promise) DOMException: Failed to execute 'postMessage' on 'Window': Response object could not be cloned.`.
Read more >postMessage throws DataCloneError: The object could not be ...
Actual results: An error is returned : DataCloneError: The object could not be cloned. Expected results: The object should have been transferred without...
Read more ><Promise> could not be cloned. | Velo by Wix
Failed to execute 'postMessage' on 'DedicatedWorkerGlobalScope': #<Promise> could not be cloned. Hello i am trying to generate a csv file ...
Read more >LWC Designer throws an error while selecting a LWC ...
"Get Bundles Error: DataCloneError: Failed to execute 'postMessage' on 'Window': [object Object] could not be cloned." LWC Designer - Error Snapshot.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks! I’ll report back in a few days with news
Still haven’t figured this one out… My sentry now looks like this:
And there doesn’t appear to be an underlying error anymore:
I can’t reproduce it and I can’t tell if this is actually bothering users or not… No one has complained yet but they rarely do.
Any ideas to track this down?