Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

zone.js v0.8.13 Produces Extensive Zone errors in Unit tests-- 'Unhandled Promise rejection:', 'Cannot create property '__creationTrace__' #832

Closed
corvinrok opened this issue Jul 12, 2017 · 19 comments · Fixed by #834

Comments

@corvinrok
Copy link

corvinrok commented Jul 12, 2017

Using:

  • zone.js 0.8.13
  • Node 7.10.1
  • Angular 4.2.6
  • rxjs 5.4.2
  • karma 1.7.0
  • Typescript 2.3.4

If I use zone.js 0.8.12 my 111 Client side unit tests work fine. After upgrading to zone.js 0.8.13 I get repeating zone errors as you can see below.

The newest release of zone.js fails extensively on almost all of related Angular unit tests now. I am seeing this throw two errors:

First one:

ERROR: 'Unhandled Promise rejection:', 'Cannot create property '__creationTrace__' on string '__zone_symbol__optimizedZoneEventTask'', '; Zone:', 'ProxyZone', '; Task:', 'Promise.then', '; Value:', TypeError {longStack: 'TypeError: Cannot create property '__creationTrace__' on string '__zone_symbol__optimizedZoneEventTask'
    at Object.onScheduleTask (http://localhost:9876/base/node_modules/zone.js/dist/long-stack-trace-zone.js?76bd579913a209b82c592a4e9924f4696a01ea6f:115:38)
    at ZoneDelegate.scheduleTask (http://localhost:9876/base/node_modules/zone.js/dist/zone.js?88b6003995efe175b0ecfca3880d4b42eebe4e32:404:51)
    at Object.onScheduleTask (http://localhost:9876/base/node_modules/zone.js/dist/zone.js?88b6003995efe175b0ecfca3880d4b42eebe4e32:300:29)
    at ZoneDelegate.scheduleTask (http://localhost:9876/base/node_modules/zone.js/dist/zone.js?88b6003995efe175b0ecfca3880d4b42eebe4e32:404:51)
    at Zone.scheduleTask (http://localhost:9876/base/node_modules/zone.js/dist/zone.js?88b6003995efe175b0ecfca3880d4b42eebe4e32:235:43)
    at Zone.scheduleEventTask (http://localhost:9876/base/node_modules/zone.js/dist/zone.js?88b6003995efe175b0ecfca3880d4b42eebe4e32:261:25)
    at HTMLDivElement.addEventListener (http://localhost:9876/base/node_modules/zone.js/dist/zone.js?88b6003995efe175b0ecfca3880d4b42eebe4e32:1561:29)
    at DomEventsPlugin.19.DomEventsPlugin.addEventListener (http://localhost:9876/base/ClientSide/test/panels/panel-output-window/panel-output-window.component.spec.ts?af87a3836823343a258f1bca0af3058ef4b375a6:35817:17)
    at EventManager.19.EventManager.addEventListener (http://localhost:9876/base/ClientSide/test/panels/panel-output-window/panel-output-window.component.spec.ts?af87a3836823343a258f1bca0af3058ef4b375a6:35155:23)
    at DefaultDomRenderer2.19.DefaultDomRenderer2.listen (http://localhost:9876/base/ClientSide/test/panels/panel-output-window/panel-output-window.component.spec.ts?af87a3836823343a258f1bca0af3058ef4b375a6:35676:36)', ngDebugContext: DebugContext_{view: Object{def: ..., parent: ..., viewContainerParent: ..., parentNodeDef: ..., context: ..., component: ..., nodes: ..., state: ..., root: ..., renderer: ..., oldValues: ..., disposables: ...}, nodeIndex: 0, nodeDef: Object{index: ..., parent: ..., renderParent: ..., bindingIndex: ..., outputIndex: ..., flags: ..., childFlags: ..., directChildFlags: ..., childMatchedQueries: ..., matchedQueries: ..., matchedQueryIds: ..., references: ..., ngContentIndex: ..., childCount: ..., bindings: ..., bindingFlags: ..., outputs: ..., element: ..., provider: ..., text: ..., query:..., ngContent: ...}, elDef: Object{index: ..., parent: ..., renderParent: ..., bindingIndex: ..., outputIndex: ..., flags: ..., childFlags: ..., directChildFlags: ..., childMatchedQueries: ..., matchedQueries: ..., matchedQueryIds: ..., references: ..., ngContentIndex: ..., childCount: ..., bindings: ..., bindingFlags: ..., outputs: ..., element: ..., provider: ..., text: ..., query: ..., ngContent: ...}, elView: Object{def: ..., parent: ..., viewContainerParent: ..., parentNodeDef: ..., context: ..., component: ..., nodes: ..., state: ..., root: ..., renderer: ..., oldValues: ..., disposables: ...}}, ngErrorLogger: function () { ... }, __zone_symbol__currentTask: ZoneTask{_zone: Zone{_properties: ..., _parent: ..., _name: ..., _zoneDelegate: ...}, runCount: 0, _zoneDelegates: null, _state: 'notScheduled', type: 'microTask', source: 'Promise.then', data: undefined, scheduleFn: undefined, cancelFn: null, callback: function () { ... }, invoke: function () { ... }}}, 'TypeError: Cannot create property '__creationTrace__' on string '__zone_symbol__optimizedZoneEventTask'
    at Object.onScheduleTask (http://localhost:9876/base/node_modules/zone.js/dist/long-stack-trace-zone.js?76bd579913a209b82c592a4e9924f4696a01ea6f:115:38)
    at ZoneDelegate.scheduleTask (http://localhost:9876/base/node_modules/zone.js/dist/zone.js?88b6003995efe175b0ecfca3880d4b42eebe4e32:404:51)
    at Object.onScheduleTask (http://localhost:9876/base/node_modules/zone.js/dist/zone.js?88b6003995efe175b0ecfca3880d4b42eebe4e32:300:29)
    at ZoneDelegate.scheduleTask (http://localhost:9876/base/node_modules/zone.js/dist/zone.js?88b6003995efe175b0ecfca3880d4b42eebe4e32:404:51)
    at Zone.scheduleTask (http://localhost:9876/base/node_modules/zone.js/dist/zone.js?88b6003995efe175b0ecfca3880d4b42eebe4e32:235:43)
    at Zone.scheduleEventTask (http://localhost:9876/base/node_modules/zone.js/dist/zone.js?88b6003995efe175b0ecfca3880d4b42eebe4e32:261:25)
    at HTMLDivElement.addEventListener (http://localhost:9876/base/node_modules/zone.js/dist/zone.js?88b6003995efe175b0ecfca3880d4b42eebe4e32:1561:29)
    at DomEventsPlugin.19.DomEventsPlugin.addEventListener (http://localhost:9876/base/ClientSide/test/panels/panel-output-window/panel-output-window.component.spec.ts?af87a3836823343a258f1bca0af3058ef4b375a6:35817:17)
    at EventManager.19.EventManager.addEventListener (http://localhost:9876/base/ClientSide/test/panels/panel-output-window/panel-output-window.component.spec.ts?af87a3836823343a258f1bca0af3058ef4b375a6:35155:23)
    at DefaultDomRenderer2.19.DefaultDomRenderer2.listen (http://localhost:9876/base/ClientSide/test/panels/panel-output-window/panel-output-window.component.spec.ts?af87a3836823343a258f1bca0af3058ef4b375a6:35676:36)'

Second one:

Failed: Cannot create property '__creationTrace__' on string '__zone_symbol__optimizedZoneEventTask'
TypeError: Cannot create property '__creationTrace__' on string '__zone_symbol__optimizedZoneEventTask'
	at Object.onScheduleTask (node_modules/zone.js/dist/long-stack-trace-zone.js:115:38)
	at ZoneDelegate.scheduleTask (node_modules/zone.js/dist/zone.js:404:51)
	at Object.onScheduleTask (node_modules/zone.js/dist/zone.js:300:29)
	at ZoneDelegate.scheduleTask (node_modules/zone.js/dist/zone.js:404:51)
	at Zone.scheduleTask (node_modules/zone.js/dist/zone.js:235:43)
	at Zone.scheduleEventTask (node_modules/zone.js/dist/zone.js:261:25)
	at HTMLDivElement.addEventListener (node_modules/zone.js/dist/zone.js:1561:29)
	at DomEventsPlugin.19.DomEventsPlugin.addEventListener (ClientSide/test/panels/panel-output-window/panel-output-window.component.spec.ts:35817:17)
	at EventManager.19.EventManager.addEventListener (ClientSide/test/panels/panel-output-window/panel-output-window.component.spec.ts:35155:23)
	at DefaultDomRenderer2.19.DefaultDomRenderer2.listen (ClientSide/test/panels/panel-output-window/panel-output-window.component.spec.ts:35676:36)
@Toxicable
Copy link

Can be reproduce in plunkr here: https://plnkr.co/edit/SNR831sznvMsDjdFJ3MN?p=preview
It happens when you do Event binding.
Property binding is fine

@corvinrok corvinrok changed the title 0.8.13 Failing extensively on zone errors in Unit tests 0.8.13 Extensively on Zone errors in Unit tests "'Unhandled Promise rejection:', 'Cannot create property '__creationTrace__'" Jul 12, 2017
@corvinrok corvinrok changed the title 0.8.13 Extensively on Zone errors in Unit tests "'Unhandled Promise rejection:', 'Cannot create property '__creationTrace__'" v0.8.13 Produces Extensive Zone errors in Unit tests "'Unhandled Promise rejection:', 'Cannot create property '__creationTrace__'" Jul 12, 2017
@corvinrok corvinrok changed the title v0.8.13 Produces Extensive Zone errors in Unit tests "'Unhandled Promise rejection:', 'Cannot create property '__creationTrace__'" v0.8.13 Produces Extensive Zone errors in Unit tests-- 'Unhandled Promise rejection:', 'Cannot create property '__creationTrace__' Jul 12, 2017
@corvinrok corvinrok changed the title v0.8.13 Produces Extensive Zone errors in Unit tests-- 'Unhandled Promise rejection:', 'Cannot create property '__creationTrace__' zone.js v0.8.13 Produces Extensive Zone errors in Unit tests-- 'Unhandled Promise rejection:', 'Cannot create property '__creationTrace__' Jul 12, 2017
@ghost
Copy link

ghost commented Jul 12, 2017

I have the same thing when running in Webpack DevServer or unit tests in phantomjs. Works fine when reverting back to 0.8.12 though.

@JiaLiPassion
Copy link
Collaborator

JiaLiPassion commented Jul 12, 2017

Thank you for posting the issue, I have made a PR to fix this one.

@pumano
Copy link

pumano commented Jul 13, 2017

I got same issues in my tests (angular 4.2.6). And for linux only. Windows don't cause that problems.

@guivanrv
Copy link

reverting to 0.8.12 does it for now

@nadavsinai
Copy link
Contributor

@pumano not true unfortunately - I can confirm it does happen on windows

@Biglr
Copy link

Biglr commented Jul 13, 2017

Facing the same issue here as well but on Windows using zone.js 0.8.13
Reverting to 0.8.12 for now as suggested above...

@JiaLiPassion
Copy link
Collaborator

sorry for the breaking error, it has been fixed in #834, please wait for the next version.

@briosheje
Copy link

briosheje commented Jul 13, 2017

I've had a previous project in another machine working perfectly with zone.js 0.8.5.

Replicated the project today in another machine and, by keeping zone.js version 0.8.5 I'm now experiencing this issue in both testing and regular development, not sure how it's possible but it looks like it doesn't only affect the latest version. Maybe it's related to other packages aswell?

I'm experiencing the issue in electron, stacktrace is:

Unhandled Promise rejection: Cannot create property '__creationTrace__' on string '__zone_symbol__optimizedZoneEventTask' ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Cannot create property '__creationTrace__' on string '__zone_symbol__optimizedZoneEventTask'
    at Object.onScheduleTask (polyfills.js:5032)
    at ZoneDelegate.scheduleTask (polyfills.js:5502)
    at Object.onScheduleTask (polyfills.js:5398)
    at ZoneDelegate.scheduleTask (polyfills.js:5502)
    at Zone.scheduleTask (polyfills.js:5333)
    at Zone.scheduleEventTask (polyfills.js:5359)
    at polyfills.js:6659
    at BrowserPlatformLocation.webpackJsonp.27.BrowserPlatformLocation.onPopState (vendor.js:17581)
    at HashLocationStrategy.webpackJsonp.6.HashLocationStrategy.onPopState (vendor.js:27430)
    at new Location (vendor.js:27219) TypeError: Cannot create property '__creationTrace__' on string '__zone_symbol__optimizedZoneEventTask'
    at Object.onScheduleTask

@guivanrv
Copy link

guivanrv commented Jul 13, 2017 via email

@briosheje
Copy link

@guivanrv wops, had ^ indeed! Thanks!

filipesilva added a commit to filipesilva/angular-cli that referenced this issue Jul 13, 2017
`zone.js@0.8.13` has some bugs that break our CI runs. These are being tracked in angular/zone.js#832.

Until a these are fixed and a new versions is released, we should pin to `zone.js@0.8.12`. Another PR should go up then and unpin to `zone.js@^0.8.14`.
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Jul 13, 2017
`zone.js@0.8.13` has some bugs that break our CI runs. These are being tracked in angular/zone.js#832.

Until a these are fixed and a new versions is released, we should pin to `zone.js@0.8.12`. Another PR should go up then and unpin to `zone.js@^0.8.14`.
hansl pushed a commit to angular/angular-cli that referenced this issue Jul 13, 2017
`zone.js@0.8.13` has some bugs that break our CI runs. These are being tracked in angular/zone.js#832.

Until a these are fixed and a new versions is released, we should pin to `zone.js@0.8.12`. Another PR should go up then and unpin to `zone.js@^0.8.14`.
@zskhan
Copy link

zskhan commented Jul 14, 2017

Fixing zone.js to 0.8.12 fixed my issue too, thank you.
The culprit was indeed 0.8.13

textbook added a commit to textbook/salary-stats that referenced this issue Jul 15, 2017
bertdireins added a commit to bertdireins/test-blog-post-reader that referenced this issue Jul 16, 2017
bertdireins referenced this issue in bertdireins/test-blog-post-reader Jul 16, 2017
patrickvaler added a commit to patrickvaler/ng-vote that referenced this issue Jul 16, 2017
Set zone.js to fix version 0.8.12 until
introduced bug is fixed:
angular/zone.js#832
akutch added a commit to akutch/kutch-codes that referenced this issue Jul 16, 2017
- move landing info to LandingComponent
- add PageNotFoundComponent for 404's
- update unit tests
- degrade zone.js version to resolve unit test errors: angular/zone.js#832
- alphabetize styles
kiwikern added a commit to kiwikern/Superfit-Schedule that referenced this issue Jul 17, 2017
@cyrilletuzi
Copy link

When is the new version planned ? As it's a regression, a quick release just for this would be nice.

@emilio-martinez
Copy link

Haven't updated but I believe v0.8.14 was released earlier today with a fix for this via #834

@corvinrok
Copy link
Author

corvinrok commented Jul 19, 2017 via email

@mischah
Copy link

mischah commented Jul 20, 2017

👌
It’s released on npm but I was confused that the tag isn’t published and therefore it isn’t on the GitHub Releases page.

@pumano
Copy link

pumano commented Jul 20, 2017

As I understand it released at npm as same version 0.8.13.

@mischah
Copy link

mischah commented Jul 20, 2017

Nope. npm has 0.8.14. See https://www.npmjs.com/package/zone.js

@agriboz
Copy link

agriboz commented Jul 20, 2017

the latest version of zone.js handled it perfectly thanks

dond2clouds pushed a commit to d2clouds/speedray-cli that referenced this issue Apr 23, 2018
`zone.js@0.8.13` has some bugs that break our CI runs. These are being tracked in angular/zone.js#832.

Until a these are fixed and a new versions is released, we should pin to `zone.js@0.8.12`. Another PR should go up then and unpin to `zone.js@^0.8.14`.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.