DataCloneError: Failed to execute 'postMessage' on 'Window': ErrorEvent object could not be cloned.

See original GitHub issue

I’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:closed
  • Created 3 years ago
  • Comments:25 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
Christilutcommented, May 1, 2020

Thanks! I’ll report back in a few days with news

0reactions
Christilutcommented, May 28, 2020

Still haven’t figured this one out… My sentry now looks like this: image

And there doesn’t appear to be an underlying error anymore: image

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found