-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#9166 Wrap error reason #9175
#9166 Wrap error reason #9175
Conversation
Thanks for the PR -- it looks reasonable. Can you provide description? I would like to know how particular state is achieved. There are two independent changes and I'm curious if they are both needed. |
@yurydelendik Could you please tell me when this PR will be merged? |
I (obviously) cannot speak for Yury here, but to me it seems like the questions from #9175 (comment) remain unanswered:
The information provided in #9175 (comment) only contains error stacks, but no information about how those errors were actually triggered (which is what was asked above). |
@yurydelendik I updated description as you asked. Is it clear now? |
It appears that this is now in the process of being fixed in Angular, see issue angular/zone.js#979 and PR angular/zone.js#980. |
@uuggene So until fix is merged and new patch will be released, you can point to fix branch in your package.json
|
This is now fixed and released upstream in Angular's Zone.js 0.8.19. External libraries should never modify our objects, so let's close this PR because it's not intended behavior. If we run into this again, we can always revisit it. Thank you. |
It removes not serializable properties from 'reason' object.
They were added by ZoneAwarePromise used in NgZone and Angular 2+
Following object can not be serialized:
reason { message:'Missing PDF "http://localhost:8000/pdf-test2.pdf".', name:'MissingPDFException', __zone_symbol__currentTask:ZoneTask {_zone: Zone, runCount: 0, _zoneDelegates: null, _state: "notScheduled", ... }
By using 'wrapReason' it's converted to:
reason { message:'Missing PDF "http://localhost:8000/pdf-test2.pdf".', name:'MissingPDFException' }
Before these changes we have 2 exceptions:
ERROR Error: Uncaught (in promise): DataCloneError: Failed to execute 'postMessage' on 'Worker': function (delegate, current, target, task, applyThis, applyArgs) { try { onEnter(zo...<omitted>... } could not be cloned. Error: Failed to execute 'postMessage' on 'Worker': function (delegate, current, target, task, applyThis, applyArgs) { try { onEnter(zo...<omitted>... } could not be cloned. at eval (util.js:1309) at ZoneDelegate.invoke (zone.js:392) at Object.onInvoke (ng_zone.ts:296) at ZoneDelegate.invoke (zone.js:391) at Zone.run (zone.js:142) at zone.js:873 at ZoneDelegate.invokeTask (zone.js:425) at Object.onInvokeTask (ng_zone.ts:288) at ZoneDelegate.invokeTask (zone.js:424) at Zone.runTask (zone.js:192) at eval (util.js:1309) at ZoneDelegate.invoke (zone.js:392) at Object.onInvoke (ng_zone.ts:296) at ZoneDelegate.invoke (zone.js:391) at Zone.run (zone.js:142) at zone.js:873 at ZoneDelegate.invokeTask (zone.js:425) at Object.onInvokeTask (ng_zone.ts:288) at ZoneDelegate.invokeTask (zone.js:424) at Zone.runTask (zone.js:192) at resolvePromise (zone.js:824) at zone.js:876 at ZoneDelegate.invokeTask (zone.js:425) at Object.onInvokeTask (ng_zone.ts:288) at ZoneDelegate.invokeTask (zone.js:424) at Zone.runTask (zone.js:192) at drainMicroTaskQueue (zone.js:602) at <anonymous>
ERROR Error: Uncaught (in promise): DataCloneError: Failed to execute 'postMessage' on 'Worker': function (delegate, current, target, task, applyThis, applyArgs) { try { onEnter(zo...<omitted>... } could not be cloned. Error: Failed to execute 'postMessage' on 'Worker': function (delegate, current, target, task, applyThis, applyArgs) { try { onEnter(zo...<omitted>... } could not be cloned. at MessageHandler.postMessage (util.js:1329) at sendStreamRequest (util.js:1457) at Object.error (util.js:1494) at eval (api.js:1573) at ZoneDelegate.invoke (zone.js:392) at Object.onInvoke (ng_zone.ts:296) at ZoneDelegate.invoke (zone.js:391) at Zone.run (zone.js:142) at zone.js:873 at ZoneDelegate.invokeTask (zone.js:425) at MessageHandler.postMessage (util.js:1329) at sendStreamRequest (util.js:1457) at Object.error (util.js:1494) at eval (api.js:1573) at ZoneDelegate.invoke (zone.js:392) at Object.onInvoke (ng_zone.ts:296) at ZoneDelegate.invoke (zone.js:391) at Zone.run (zone.js:142) at zone.js:873 at ZoneDelegate.invokeTask (zone.js:425) at resolvePromise (zone.js:824) at zone.js:876 at ZoneDelegate.invokeTask (zone.js:425) at Object.onInvokeTask (ng_zone.ts:288) at ZoneDelegate.invokeTask (zone.js:424) at Zone.runTask (zone.js:192) at drainMicroTaskQueue (zone.js:602) at <anonymous>