Change8
Error1 reports

Fix DataCloneError

in Cloudflare Workers

Solution

The DataCloneError in Cloudflare Workers usually arises when attempting to pass non-cloneable objects (like functions, class instances with methods, or certain DOM nodes) across the Worker's boundaries via message passing or durable objects. To fix this, ensure you only send plain JavaScript objects and primitive data types between Workers. If you need to transfer complex data, serialize it into a JSON string before sending, and then deserialize it on the receiving end, or redesign your code to avoid sending such data in the first place.

Related Issues

Real GitHub issues where developers encountered this error:

Timeline

First reported:Nov 23, 2025
Last reported:Nov 23, 2025

Need More Help?

View the full changelog and migration guides for Cloudflare Workers

View Cloudflare Workers Changelog