-
Notifications
You must be signed in to change notification settings - Fork 407
datacloneerror on postMessage in worker. #979
Comments
@snovos , could you provide more information? or a reproduce repo? |
@JiaLiPassion ,Thi is sample code from PDF.js by Mozilla.
So in reason object I can see some Function type properties, added by zone. When postMessage is called, reason cannot be serialized since Functions and Errors cannot be cloned and throws DATA_CLONE_ERR. Any ideas? |
@snovos , the |
@JiaLiPassion https://github.com/snovos/pdf-zone. Please run "npm start" and observe that if you pass wong url to component, it throws an error I described above. Please let me know if you were able to reproduce |
@snovos, thanks for the reproduce repo, I have made a PR to fix this one. |
@JiaLiPassion Could you please tell me any temporary solution for this case before your fix is merged and released? |
@snovos , I can create a branch and can update your zone.js in |
@JiaLiPassion That would be great. I appreciate it, thanks! |
@snovos, you can use this branch ,https://github.com/JiaLiPassion/zone.js/tree/jsondist |
@JiaLiPassion thanks a lot. That works. |
Zone modifies Promise by adding extra properties to object, so it cannot be serialized. Is there any workaround for this case?
The text was updated successfully, but these errors were encountered: