Cannot create property '__creationTrace__'

2019-04-03 08:55发布

This is a bad thursday. It is the 13th. And yesterday I explained to my collegues how lucky we were about the 13th falling on a thursday, not on a friday.

Well, that was yesterday, and today I woke up with angular's fist in my face:

Cannot create property 'creationTrace' on string '__zone_symbol__optimizedZoneEventTask'

Well it might also be zone.js, or maybe even something else deeper down that dark abyss called development stack. Can anybody help me?

Sorry for my attitude, it's just that working with angular since its early alpha-stages has finally taken its toll on me.

PS: Suffice it to say, I did not change anything since the working version yesterday. So I am completely lost as to why and how and where this bug came from...

8条回答
欢心
2楼-- · 2019-04-03 09:16

I am getting this issue with 'zone.js':"0.8.11"

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 (long-stack-trace-zone.js:115)
    at ZoneDelegate.scheduleTask (zone.js:404)
    at Object.onScheduleTask (zone.js:300)
    at ZoneDelegate.scheduleTask (zone.js:404)
    at Zone.scheduleTask (zone.js:235)
    at Zone.scheduleEventTask (zone.js:261)
    at zone.js:1561
    at BrowserPlatformLocation.onPopState (platform-browser.es5.js:1922)
    at PathLocationStrategy.onPopState (common.es5.js:592)
    at new Location (common.es5.js:256)
    at AppBrowserModuleInjector.createInternal (module.ngfactory.js [sm]:1)
    at AppBrowserModuleInjector.NgModuleInjector.create (core.es5.js:3558)
    at NgModuleFactory.create (core.es5.js:3531)
    at core.es5.js:4772
    at ZoneDelegate.invoke (zone.js:391)
    at Object.onInvoke (core.es5.js:4149)
    at ZoneDelegate.invoke (zone.js:390)
    at Zone.run (zone.js:141)
    at NgZone.run (core.es5.js:4017)
    at PlatformRef_._bootstrapModuleFactoryWithZone (core.es5.js:4770)
    at core.es5.js:4812
    at ZoneDelegate.invoke (zone.js:391)
    at Zone.run (zone.js:141)
    at zone.js:832
    at ZoneDelegate.invokeTask (zone.js:424)
    at Zone.runTask (zone.js:191)
    at drainMicroTaskQueue (zone.js:596) TypeError: Cannot create property '__creationTrace__' on string '__zone_symbol__optimizedZoneEventTask'
    at Object.onScheduleTask .........
查看更多
Viruses.
3楼-- · 2019-04-03 09:18

This issue have been fixed in zone.js, please updated to the latest version of zone.js

查看更多
看我几分像从前
4楼-- · 2019-04-03 09:19

Think I found something:

fixing "zone.js" to version "0.8.12" in the package.json solved the issue for me.

查看更多
【Aperson】
5楼-- · 2019-04-03 09:25

I ran into this same problem last night and the following entry for zone.js in my package.json file worked for me:

"zone.js": "0.8.4"

查看更多
Emotional °昔
6楼-- · 2019-04-03 09:30

As mentioned in https://github.com/angular/zone.js/issues/832 the error happens only in zone.js version 0.8.13 and it is related to event binding.

The bug has been fixed already but for now in order to fix an application you need to downgrade to previous version of zone.js.

"zone.js": "0.8.12" in package.json should do the trick.

查看更多
▲ chillily
7楼-- · 2019-04-03 09:30

This error fired to me on plunker with lastest version Angular. I changed the index.html file to get version "0.8.12" (from unpkg.com/zone.js/dist/zone.js to unpkg.com/zone.js@0.8.12/dist/zone.js) and worked.

查看更多
登录 后发表回答