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
TypeError: Cannot read property 'zone' of null (touch) #7652
Comments
I got a similar error after updating to beta10, app won't bootstrap: |
@biiiipy as a workaround add this to your typings.json and typings install {
"dependencies": {
"zone.js": "github:gdi2290/typed-zone.js/lib/zone.d.ts#225aa313388bdf78b18ed9f0b29f93a395146229"
},
"devDependencies": {},
"ambientDependencies": {
"zone.js": "github:gdi2290/typed-zone.js/lib/zone.d.ts#225aa313388bdf78b18ed9f0b29f93a395146229"
}
} |
@gdi2290, can a typing fix a runtime error? Still having same exception. |
tried this, having same problem, @gdi2290 your fix does not seem to fix the issue. |
It happens with the pre-built packages in the plunkr so I don't think typings are going to have any effect one way or the other. |
Got the same exception when using websockets/socket.io. |
Getting similar error using Ionic 2 beta 3 with Angular 2 beta 11:
Edit: Confirming that downgrading to Beta 9 fixes the issue. |
Same here - beta-11 now gives a similar error in more places and stops the app functioning:
|
Same here, stacktrace:
|
downgrading to beta 9 resolves the issue. not related to typings. Error pointing to angular2-polyfills: 142 source:
|
i confirmed what @manekinekko sees. it works fine with live-server, but not with lite-server (which uses browser-sync). here is what i get with bs |
Oh man, each update a new challenge 😒
Agree with @johnpapa and @manekinekko, seems to be related to BrowserSync EDIT: |
I'm getting the same issue with systemjs-hot-reloader (the error goes away when disabling hot reloading). As far as I know, it is not using BrowserSync, but also provides hot reloading. In case it can help to point the cause. |
Might be useful for those who want to use 2.0.0-beta.11 I am using live-server instead of lite-server/browser-sync for now, until this is resolved. It works well with similar watch files and reload, just like lite-server. |
For me live-server doesn't work. in 2.0.0-beta.11 |
The angular team is aware of the issue and are working on a fix. Keep the reports coming as more and new information is helpful in diagnosing it. For now, you can either use your server of choice with beta 11 and you may see the error in the console or go back to beta 9. I am using beta 11 for now as the error msg doesnt appear to cause any problems with my app at this time. |
Seems angular/zone.js@5783663 fixed this. Temp workaround is patching angular2-polyfills.js the with: var clearNative = utils_1.patchMethod(window, cancelName, function (delegate) { return function (self, args) {
var task = args[0];
if (task && typeof task.type == 'string') {
task.zone.cancelTask(task);
} else {
delegate.apply(window, args);
}
}; }); |
here's the workaround if you build from source |
+1 |
I'm having the same issue, but I'm not running any form of live reload software, think that's just a red herring or linked to how browsersync is doing it's thing! In my case I'm trying to boot intercom.js, I also tried using zone.runOutsideAngular() in an attempt to resolve! The error appears in the console as Intercom drops it's UI overlay on the screen. Also, there's a lovely debugger statement @ line 388 of https://code.angularjs.org/2.0.0-beta.11/angular2-polyfills.js :|
|
same here, updated to latest beta release and getting the same error, im building from npm modules, when getting back to beta 9, it disappears |
Same here with socket.io. Any ideas? |
This issue has also affected I recommend staying on beta 9 if you need this feature until this is resolved cc // @naomiblack @wardbell |
I think the issue of browser syncing while developing is just a symptom - something that happens to trigger the issue. It still also happens with a production build for me. |
yes, the issue is with the new version of zones and the team is working on a fix. |
Even with BrowserSync, it takes forever to recompile if you have made a couple of changes. Might be due to my computer's specs. |
recompiles may be slow on TypeScript 1.7. There was a bug with it. Go to 1.8.x |
@johnpapa It's 10x faster. Thanks! |
@CarlosAmaral i switched off of browsersync this week to nginx to fight some of these perf related issues. |
Browsersync author here, please see my comment: The issue lies with how socket.io is calling clearTimeout - something the zone.js will be intercepting |
Weird fact. I changed lite-server to live-server and the error is gone. Besides, with lite-server updates on the app did not cause page refresh, with live-server page refreshes automatically. |
Including "angular2-polyfills.min.js" breaks browser-sync, so the page could not be auto-reloaded. |
@Yagger |
Does anybody know if this issue resolve on beta.12? |
There's no mention to it. I created a |
I checked right now on our main project and it seems to be resolved with beta.12. |
I believe this was a fix on zone.js, which is why you wouldn't see it in the changelog: angular/zone.js#276 |
Zone doesn't seem to have a changelog, though 😞 |
I just reset my npm install with beta 12 and dependencies, and it works all good ! |
i can confirm that - i had that issue when i was using ng2 beta 11 with browsersync. now everything works fine. big thx |
beta-12 seems to be running well for me 👍 |
Update to Beta 12 and the Zone.js to 0.6.6 |
@cpiock this is not related to ....'zone' of null! i guess your problem is something on path/filesystem! |
Still happens for me, when running a compiled app on a simple node server, using Getting
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
[X] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, see note at the top of this template.
See above
Touch events now function (see: [BETA-6] Gesture (swipeleft) event makes Zone throw Maximum call size exceeded #6993) but also output a number of exceptions:
Uncaught TypeError: Cannot read property 'zone' of null
See http://plnkr.co/edit/53gbav4XuvWrDt6oEiYO?p=preview
Swipe left on title with console open
touch function is called without exceptions
The text was updated successfully, but these errors were encountered: