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

Uncaught TypeError: Cannot read property 'apply' of undefined on new install #6036

Closed
iainplimmer opened this Issue Apr 22, 2017 · 101 comments

Comments

Projects
None yet
@iainplimmer

iainplimmer commented Apr 22, 2017

Bug Report or Feature Request (mark with an x)

  • bug report -> please search issues before submitting
  • feature request

Versions.

@angular/cli: 1.0.0
node: 6.9.5
os: darwin x64
@angular/common: 4.0.3
@angular/compiler: 4.0.3
@angular/core: 4.0.3
@angular/forms: 4.0.3
@angular/http: 4.0.3
@angular/platform-browser: 4.0.3
@angular/platform-browser-dynamic: 4.0.3
@angular/router: 4.0.3
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.3

Repro steps.

npm install -g @angular/cli
ng new projectname
cd projectname
ng serve
--> Browse to localhost:4200 in Chrome

The log given by the failure.

When you first open the browser you get the following message:
Angular is running in the development mode. Call enableProdMode() to enable the production mode.

Then the error
Uncaught TypeError: Cannot read property 'apply' of undefined
at XMLHttpRequest.desc.get [as ontimeout] (zone.js:1265)
at XHRLocalObject.AbstractXHRObject._cleanup (abstract-xhr.js:149)
at XMLHttpRequest.xhr.onreadystatechange (abstract-xhr.js:125)
at XMLHttpRequest.wrapFn (zone.js:1230)
at ZoneDelegate.invokeTask (zone.js:398)
at Zone.runTask (zone.js:165)
at XMLHttpRequest.ZoneTask.invoke (zone.js:460)

Desired functionality.

Bug fix or the ability to work out why it's not actually working, i've cleaned the NPM cache, reinstalled with -g and still get an error.

Mention any other details that might be useful.

@chusri

This comment has been minimized.

Show comment
Hide comment
@chusri

chusri Apr 22, 2017

I got the same error.

screenshot 2017-04-22 15 51 51

chusri commented Apr 22, 2017

I got the same error.

screenshot 2017-04-22 15 51 51

@ssljivic

This comment has been minimized.

Show comment
Hide comment
@ssljivic

ssljivic Apr 22, 2017

Same issue here.
I tried both node v6.10.2 and node v7.9.0.

ssljivic commented Apr 22, 2017

Same issue here.
I tried both node v6.10.2 and node v7.9.0.

@kHorozhanov

This comment has been minimized.

Show comment
Hide comment
@kHorozhanov

kHorozhanov Apr 22, 2017

in firefox works fine

kHorozhanov commented Apr 22, 2017

in firefox works fine

@mpalourdio

This comment has been minimized.

Show comment
Hide comment
@mpalourdio

mpalourdio Apr 22, 2017

Same here from this morning in chromium. I tried downgrading to angular 4.0.0 but the problem is still here. I can't figure what has changed since yesterday.

mpalourdio commented Apr 22, 2017

Same here from this morning in chromium. I tried downgrading to angular 4.0.0 but the problem is still here. I can't figure what has changed since yesterday.

@iainplimmer

This comment has been minimized.

Show comment
Hide comment
@iainplimmer

iainplimmer Apr 22, 2017

Yup Firefox doesn't give this error as mentioned by kGorozhanov.

iainplimmer commented Apr 22, 2017

Yup Firefox doesn't give this error as mentioned by kGorozhanov.

@larrygeo

This comment has been minimized.

Show comment
Hide comment
@larrygeo

larrygeo Apr 22, 2017

in firefox i got this message originalDescGet is undefined

larrygeo commented Apr 22, 2017

in firefox i got this message originalDescGet is undefined

@mpalourdio

This comment has been minimized.

Show comment
Hide comment
@mpalourdio

mpalourdio Apr 22, 2017

@larrygeo same here, but as I never dev in firefox, I don't know if this error was here before.

mpalourdio commented Apr 22, 2017

@larrygeo same here, but as I never dev in firefox, I don't know if this error was here before.

@mpalourdio

This comment has been minimized.

Show comment
Hide comment
@mpalourdio

mpalourdio Apr 22, 2017

I've reverted my yarn.lock to an old one (mpalourdio/ng2@b49dc1d) and the errors didn't occur neither in firefox, nor in chromium.

mpalourdio commented Apr 22, 2017

I've reverted my yarn.lock to an old one (mpalourdio/ng2@b49dc1d) and the errors didn't occur neither in firefox, nor in chromium.

@pure180

This comment has been minimized.

Show comment
Hide comment
@pure180

pure180 Apr 22, 2017

Same here. Running an app-version from last weck doesn't throw any error.
Diff of package.json:
Old (last weekend)

  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build -prod",
    "test": "ng test --single-run",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "^4.0.0",
    "@angular/compiler": "^4.0.0",
    "@angular/core": "^4.0.0",
    "@angular/forms": "^4.0.0",
    "@angular/http": "^4.0.0",
    "@angular/platform-browser": "^4.0.0",
    "@angular/platform-browser-dynamic": "^4.0.0",
    "@angular/router": "^4.0.0",
    "core-js": "^2.4.1",
    "rxjs": "^5.1.0",
    "zone.js": "^0.8.4"
  },
  "devDependencies": {
    "@angular/cli": "1.0.0",
    "@angular/compiler-cli": "^4.0.0",
    "@types/jasmine": "2.5.38",
    "@types/node": "~6.0.60",
    "codelyzer": "~2.0.0",
    "jasmine-core": "~2.5.2",
    "jasmine-spec-reporter": "~3.2.0",
    "karma": "~1.4.1",
    "karma-chrome-launcher": "~2.0.0",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^0.2.0",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "karma-phantomjs-launcher": "^1.0.4",
    "protractor": "~5.1.0",
    "ts-node": "~2.0.0",
    "tslint": "~4.5.0",
    "typescript": "~2.2.0"
  }

New (today)

  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "^4.0.0",
    "@angular/compiler": "^4.0.0",
    "@angular/core": "^4.0.0",
    "@angular/forms": "^4.0.0",
    "@angular/http": "^4.0.0",
    "@angular/platform-browser": "^4.0.0",
    "@angular/platform-browser-dynamic": "^4.0.0",
    "@angular/router": "^4.0.0",
    "core-js": "^2.4.1",
    "rxjs": "^5.1.0",
    "zone.js": "^0.8.4"
  },
  "devDependencies": {
    "@angular/cli": "1.0.0",
    "@angular/compiler-cli": "^4.0.0",
    "@types/jasmine": "2.5.38",
    "@types/node": "~6.0.60",
    "codelyzer": "~2.0.0",
    "jasmine-core": "~2.5.2",
    "jasmine-spec-reporter": "~3.2.0",
    "karma": "~1.4.1",
    "karma-chrome-launcher": "~2.0.0",
    "karma-cli": "~1.0.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "karma-coverage-istanbul-reporter": "^0.2.0",
    "protractor": "~5.1.0",
    "ts-node": "~2.0.0",
    "tslint": "~4.5.0",
    "typescript": "~2.2.0"
  }

pure180 commented Apr 22, 2017

Same here. Running an app-version from last weck doesn't throw any error.
Diff of package.json:
Old (last weekend)

  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build -prod",
    "test": "ng test --single-run",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "^4.0.0",
    "@angular/compiler": "^4.0.0",
    "@angular/core": "^4.0.0",
    "@angular/forms": "^4.0.0",
    "@angular/http": "^4.0.0",
    "@angular/platform-browser": "^4.0.0",
    "@angular/platform-browser-dynamic": "^4.0.0",
    "@angular/router": "^4.0.0",
    "core-js": "^2.4.1",
    "rxjs": "^5.1.0",
    "zone.js": "^0.8.4"
  },
  "devDependencies": {
    "@angular/cli": "1.0.0",
    "@angular/compiler-cli": "^4.0.0",
    "@types/jasmine": "2.5.38",
    "@types/node": "~6.0.60",
    "codelyzer": "~2.0.0",
    "jasmine-core": "~2.5.2",
    "jasmine-spec-reporter": "~3.2.0",
    "karma": "~1.4.1",
    "karma-chrome-launcher": "~2.0.0",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^0.2.0",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "karma-phantomjs-launcher": "^1.0.4",
    "protractor": "~5.1.0",
    "ts-node": "~2.0.0",
    "tslint": "~4.5.0",
    "typescript": "~2.2.0"
  }

New (today)

  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "^4.0.0",
    "@angular/compiler": "^4.0.0",
    "@angular/core": "^4.0.0",
    "@angular/forms": "^4.0.0",
    "@angular/http": "^4.0.0",
    "@angular/platform-browser": "^4.0.0",
    "@angular/platform-browser-dynamic": "^4.0.0",
    "@angular/router": "^4.0.0",
    "core-js": "^2.4.1",
    "rxjs": "^5.1.0",
    "zone.js": "^0.8.4"
  },
  "devDependencies": {
    "@angular/cli": "1.0.0",
    "@angular/compiler-cli": "^4.0.0",
    "@types/jasmine": "2.5.38",
    "@types/node": "~6.0.60",
    "codelyzer": "~2.0.0",
    "jasmine-core": "~2.5.2",
    "jasmine-spec-reporter": "~3.2.0",
    "karma": "~1.4.1",
    "karma-chrome-launcher": "~2.0.0",
    "karma-cli": "~1.0.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "karma-coverage-istanbul-reporter": "^0.2.0",
    "protractor": "~5.1.0",
    "ts-node": "~2.0.0",
    "tslint": "~4.5.0",
    "typescript": "~2.2.0"
  }
@chusri

This comment has been minimized.

Show comment
Hide comment
@chusri

chusri Apr 22, 2017

i changed the yarn.lock to old one last week, i didn't see the error again.

chusri commented Apr 22, 2017

i changed the yarn.lock to old one last week, i didn't see the error again.

@larrygeo

This comment has been minimized.

Show comment
Hide comment
@larrygeo

larrygeo Apr 22, 2017

Im not js developer, but this line of code looks weird
in function patchProperty(obj, prop)

delete desc.value;
var originalDescGet = desc.get;

if you delete desc.value the getter will return null?

larrygeo commented Apr 22, 2017

Im not js developer, but this line of code looks weird
in function patchProperty(obj, prop)

delete desc.value;
var originalDescGet = desc.get;

if you delete desc.value the getter will return null?

@filflora

This comment has been minimized.

Show comment
Hide comment
@filflora

filflora Apr 22, 2017

Same issue here. Seems to be a Chromium bug only as Firefox is working fine for me.
If I make a production build the error message is gone.
Must be something with sockjs-node as the error comes when the xhr request is responding to this call: http://localhost:4200/sockjs-node/info?t=1492854252110

Update:
Is this maybe the BrowserSync module? I'm not using sockjs-node in my project.

Update:
zone.js want's to get the property __zone_symbol___ontimeout of an xhr object and this property does not exists.

Update:
M'kay, I've got something. Maybe. I'm not quite sure though. There is a property getter inside zone.js/dist/zone.js at line 1245. It says that this getter would return null, if the property is unassigned. Well, the timeout property is unassigned in the xhrobject and tries to get it with hasOwnProperty. As this fails it tries to fallback on the originalDescGet-ter. This is however undefined for some reason. (I guess this is the real issue here). If just simply put the originalDescGet in an if statement and return null otherwise, the error message is gone. I'm not posting code for a reason. It would be a bad-bad practice to change a node_module file locally...

Still looking for an easy fix... XD

filflora commented Apr 22, 2017

Same issue here. Seems to be a Chromium bug only as Firefox is working fine for me.
If I make a production build the error message is gone.
Must be something with sockjs-node as the error comes when the xhr request is responding to this call: http://localhost:4200/sockjs-node/info?t=1492854252110

Update:
Is this maybe the BrowserSync module? I'm not using sockjs-node in my project.

Update:
zone.js want's to get the property __zone_symbol___ontimeout of an xhr object and this property does not exists.

Update:
M'kay, I've got something. Maybe. I'm not quite sure though. There is a property getter inside zone.js/dist/zone.js at line 1245. It says that this getter would return null, if the property is unassigned. Well, the timeout property is unassigned in the xhrobject and tries to get it with hasOwnProperty. As this fails it tries to fallback on the originalDescGet-ter. This is however undefined for some reason. (I guess this is the real issue here). If just simply put the originalDescGet in an if statement and return null otherwise, the error message is gone. I'm not posting code for a reason. It would be a bad-bad practice to change a node_module file locally...

Still looking for an easy fix... XD

@admiralicic

This comment has been minimized.

Show comment
Hide comment
@admiralicic

admiralicic Apr 22, 2017

Same problem here.

admiralicic commented Apr 22, 2017

Same problem here.

@rilwans

This comment has been minimized.

Show comment
Hide comment
@rilwans

rilwans Apr 22, 2017

Same Problem here.

rilwans commented Apr 22, 2017

Same Problem here.

@lightheaded

This comment has been minimized.

Show comment
Hide comment
@lightheaded

lightheaded Apr 22, 2017

Having the same issue with a fresh project started this morning

lightheaded commented Apr 22, 2017

Having the same issue with a fresh project started this morning

@NicoTuxx

This comment has been minimized.

Show comment
Hide comment
@NicoTuxx

NicoTuxx Apr 22, 2017

Having the same problem till yesterday night, glad to see I'm not alone...

NicoTuxx commented Apr 22, 2017

Having the same problem till yesterday night, glad to see I'm not alone...

@laiseng

This comment has been minimized.

Show comment
Hide comment
@laiseng

laiseng Apr 22, 2017

i think there is a mixup with npm verisons for zone.js
my package.json shows dependencies
"zone.js": "^0.8.4"

but inspecting
node_modules\zone.js\package.json
shows that it's having different version downloaded by

ng new

"_id": "zone.js@0.8.8",

uninstall zone.js and reinstall zone.js using npm will upgrade it to 0.8.8 instead of 0.8.4
so angular/cli 1.0.0 is pointing to wrong version

laiseng commented Apr 22, 2017

i think there is a mixup with npm verisons for zone.js
my package.json shows dependencies
"zone.js": "^0.8.4"

but inspecting
node_modules\zone.js\package.json
shows that it's having different version downloaded by

ng new

"_id": "zone.js@0.8.8",

uninstall zone.js and reinstall zone.js using npm will upgrade it to 0.8.8 instead of 0.8.4
so angular/cli 1.0.0 is pointing to wrong version

@filflora

This comment has been minimized.

Show comment
Hide comment
@filflora

filflora Apr 22, 2017

I upgraded to zone.js@0.8.8 but the error is still present. @laiseng Had you have luck with the update?

filflora commented Apr 22, 2017

I upgraded to zone.js@0.8.8 but the error is still present. @laiseng Had you have luck with the update?

@hravnx

This comment has been minimized.

Show comment
Hide comment
@hravnx

hravnx Apr 22, 2017

Downgraded to zone.js@0.8.5 and the problem disappeared.

hravnx commented Apr 22, 2017

Downgraded to zone.js@0.8.5 and the problem disappeared.

@NicoTuxx

This comment has been minimized.

Show comment
Hide comment
@NicoTuxx

NicoTuxx Apr 22, 2017

Downgraded to zone.js@0.8.5 and the problem disappeared.

Works for me on both Chrome (58.0.3029.81) and Firefox (53.0).

NicoTuxx commented Apr 22, 2017

Downgraded to zone.js@0.8.5 and the problem disappeared.

Works for me on both Chrome (58.0.3029.81) and Firefox (53.0).

@moeinpaki

This comment has been minimized.

Show comment
Hide comment
@moeinpaki

moeinpaki Apr 22, 2017

Same Problem here.

moeinpaki commented Apr 22, 2017

Same Problem here.

@laiseng

This comment has been minimized.

Show comment
Hide comment
@laiseng

laiseng Apr 22, 2017

yeah.. have to downgrade to zone.js@0.8.5 fix this problem
it's issue with zone.js@0.8.8.

laiseng commented Apr 22, 2017

yeah.. have to downgrade to zone.js@0.8.5 fix this problem
it's issue with zone.js@0.8.8.

@fifths

This comment has been minimized.

Show comment
Hide comment
@fifths

fifths Apr 22, 2017

Same Problem here.

fifths commented Apr 22, 2017

Same Problem here.

@axtho

This comment has been minimized.

Show comment
Hide comment
@axtho

axtho Apr 22, 2017

Downgrading to zone.js@0.8.5 works

axtho commented Apr 22, 2017

Downgrading to zone.js@0.8.5 works

@mpalourdio

This comment has been minimized.

Show comment
Hide comment
@mpalourdio

mpalourdio commented Apr 22, 2017

Issues tracked here angular/zone.js#746 and angular/zone.js#747

@mpalourdio

This comment has been minimized.

Show comment
Hide comment
@mpalourdio

mpalourdio Apr 22, 2017

uninstall zone.js and reinstall zone.js using npm will upgrade it to 0.8.8 instead of 0.8.4
so angular/cli 1.0.0 is pointing to wrong version

@laiseng the caret (^) is here to automatically pick safe upgrades in a semver way. Just remove the caret if you want to stick this dependency to a specific version.

mpalourdio commented Apr 22, 2017

uninstall zone.js and reinstall zone.js using npm will upgrade it to 0.8.8 instead of 0.8.4
so angular/cli 1.0.0 is pointing to wrong version

@laiseng the caret (^) is here to automatically pick safe upgrades in a semver way. Just remove the caret if you want to stick this dependency to a specific version.

@admiralicic

This comment has been minimized.

Show comment
Hide comment
@admiralicic

admiralicic Apr 22, 2017

I have "zone.js": "^0.8.5" but problem still persists.

admiralicic commented Apr 22, 2017

I have "zone.js": "^0.8.5" but problem still persists.

@mpalourdio

This comment has been minimized.

Show comment
Hide comment
@mpalourdio

mpalourdio Apr 22, 2017

I have "zone.js": "^0.8.5" but problem still persists.

remove the caret, and rm -rf node_modules && rm yarn.lock && yarn

mpalourdio commented Apr 22, 2017

I have "zone.js": "^0.8.5" but problem still persists.

remove the caret, and rm -rf node_modules && rm yarn.lock && yarn

@avalero85

This comment has been minimized.

Show comment
Hide comment
@avalero85

avalero85 Apr 22, 2017

Remove caret (^) and downgrade to 0.8.4. This works for me.

"zone.js": "0.8.4"

avalero85 commented Apr 22, 2017

Remove caret (^) and downgrade to 0.8.4. This works for me.

"zone.js": "0.8.4"

@vyava

This comment has been minimized.

Show comment
Hide comment
@vyava

vyava Apr 22, 2017

You have to restart your server after downgrade to zone.js@0.8.4 .

vyava commented Apr 22, 2017

You have to restart your server after downgrade to zone.js@0.8.4 .

@kleber-swf

This comment has been minimized.

Show comment
Hide comment
@kleber-swf

kleber-swf Apr 25, 2017

I had the same issue, downgraded to zone.js to 0.8.7 and it worked.
I just upgraded to 0.8.8 again (actually ^0.8.7) to test and still works!
I've tested on Chrome, Firefox and Edge.
Go figure...

kleber-swf commented Apr 25, 2017

I had the same issue, downgraded to zone.js to 0.8.7 and it worked.
I just upgraded to 0.8.8 again (actually ^0.8.7) to test and still works!
I've tested on Chrome, Firefox and Edge.
Go figure...

@fmorriso

This comment has been minimized.

Show comment
Hide comment
@fmorriso

fmorriso Apr 25, 2017

kleber-swf: Verify that you really did re-upgrade to zone.js@0.8.8 by checking your equivalent to C:\projects\APM-Start-CLI\node_modules\zone.js\package.json and verify that the 5th line (might be higher or lower) shows the following:

"raw": "zone.js@^0.8.8",

In your case, the "magic recovery to using zone.js@0.8.8" may in fact be using an older edition of zone.js.

To be really certain that zone.js 0.8.8 works, you should delete directory C:\projects\APM-Start-CLI\node_modules\zone.js and then go back and npm install -S zone.js@0.8.8 to verify it has had the miraculous recovery that you mentioned earlier.

fmorriso commented Apr 25, 2017

kleber-swf: Verify that you really did re-upgrade to zone.js@0.8.8 by checking your equivalent to C:\projects\APM-Start-CLI\node_modules\zone.js\package.json and verify that the 5th line (might be higher or lower) shows the following:

"raw": "zone.js@^0.8.8",

In your case, the "magic recovery to using zone.js@0.8.8" may in fact be using an older edition of zone.js.

To be really certain that zone.js 0.8.8 works, you should delete directory C:\projects\APM-Start-CLI\node_modules\zone.js and then go back and npm install -S zone.js@0.8.8 to verify it has had the miraculous recovery that you mentioned earlier.

@MohammedEssehemy

This comment has been minimized.

Show comment
Hide comment
@MohammedEssehemy

MohammedEssehemy Apr 25, 2017

zone.js 0.8.5 solved the problem. Thanks.

MohammedEssehemy commented Apr 25, 2017

zone.js 0.8.5 solved the problem. Thanks.

@willyhakim

This comment has been minimized.

Show comment
Hide comment
@willyhakim

willyhakim Apr 25, 2017

zone.js 0.8.9 solved the problem

willyhakim commented Apr 25, 2017

zone.js 0.8.9 solved the problem

@mpalourdio

This comment has been minimized.

Show comment
Hide comment
@mpalourdio

mpalourdio Apr 25, 2017

+1 zone.js 0.8.9 is ok here. @iainplimmer this issue can be closed IMO.

mpalourdio commented Apr 25, 2017

+1 zone.js 0.8.9 is ok here. @iainplimmer this issue can be closed IMO.

@kleber-swf

This comment has been minimized.

Show comment
Hide comment
@kleber-swf

kleber-swf Apr 25, 2017

@fmorriso you are right! The version in the file is different from the version shown by npm view zone.js version (thanks).
I deleted the folder, run npm update and the version now is 0.8.9, which solves the problem.

kleber-swf commented Apr 25, 2017

@fmorriso you are right! The version in the file is different from the version shown by npm view zone.js version (thanks).
I deleted the folder, run npm update and the version now is 0.8.9, which solves the problem.

@bezerrath

This comment has been minimized.

Show comment
Hide comment
@bezerrath

bezerrath Apr 25, 2017

Upgrade @angular/core from ^4.0.0 to ^4.0.3 and then upgrade zone.js to ^0.8.5.

bezerrath commented Apr 25, 2017

Upgrade @angular/core from ^4.0.0 to ^4.0.3 and then upgrade zone.js to ^0.8.5.

@sangecz

This comment has been minimized.

Show comment
Hide comment
@sangecz

sangecz Apr 25, 2017

I tried to install @angular/cli on my debian server (no prev angular, angular/cli or whatever installed).
I generated test app with ng new zonetest and run it with ng build. Then I hosted the dist/ dir with python -m SimpleHTTPServer. And in chrome, firefox and safari its working fine. But in chromium I get this error (same as on my machine):
screen shot 2017-04-25 at 23 38 04

screen shot 2017-04-25 at 23 38 39

I think that this error has nothing to do with zone.js. I don't know what to do, I really need this working in that damn chromium, and I know it worked...

sangecz commented Apr 25, 2017

I tried to install @angular/cli on my debian server (no prev angular, angular/cli or whatever installed).
I generated test app with ng new zonetest and run it with ng build. Then I hosted the dist/ dir with python -m SimpleHTTPServer. And in chrome, firefox and safari its working fine. But in chromium I get this error (same as on my machine):
screen shot 2017-04-25 at 23 38 04

screen shot 2017-04-25 at 23 38 39

I think that this error has nothing to do with zone.js. I don't know what to do, I really need this working in that damn chromium, and I know it worked...

@sangecz

This comment has been minimized.

Show comment
Hide comment
@sangecz

sangecz Apr 25, 2017

Ok, I solved it, new projects comes with switched off importing polyfills for IE9, IE10 and IE11 (polyfills.ts), uncommenting to actually import them solved my issue with chromium.

sangecz commented Apr 25, 2017

Ok, I solved it, new projects comes with switched off importing polyfills for IE9, IE10 and IE11 (polyfills.ts), uncommenting to actually import them solved my issue with chromium.

@gueroverde

This comment has been minimized.

Show comment
Hide comment
@gueroverde

gueroverde Apr 26, 2017

I solved with this:

npm install zone.js@0.8.7 --save

is the rigth way?

gueroverde commented Apr 26, 2017

I solved with this:

npm install zone.js@0.8.7 --save

is the rigth way?

@M-R-Bishop

This comment has been minimized.

Show comment
Hide comment
@M-R-Bishop

M-R-Bishop Apr 26, 2017

@gueroverde It looks like this is fixed in the latest release (0.8.9) too

M-R-Bishop commented Apr 26, 2017

@gueroverde It looks like this is fixed in the latest release (0.8.9) too

bkbooth added a commit to loveisourweapon/liow2-client that referenced this issue Apr 26, 2017

Lock zone.js version to 0.8.5 temporarily
* Fixes console error caused by zone.js@0.8.8
* angular/angular-cli#6036
* angular/zone.js#747
@hexagon6

This comment has been minimized.

Show comment
Hide comment
@hexagon6

hexagon6 Apr 26, 2017

@gueroverde I had the same issue, can confirm upgrading zone.js to 0.8.9 fixes it.

hexagon6 commented Apr 26, 2017

@gueroverde I had the same issue, can confirm upgrading zone.js to 0.8.9 fixes it.

@anatoly314

This comment has been minimized.

Show comment
Hide comment
@anatoly314

anatoly314 Apr 26, 2017

Angular@4.0.3 together with zone@0.8.9, the issue is still here. Checked in Chrome Version 57.0.2987.133 (64-bit) on OSX Sierra 10.12.4

When downgraded zone to 0.8.7 the issue has gone.

screen shot 2017-04-26 at 15 46 59
screen shot 2017-04-26 at 15 47 13
screen shot 2017-04-26 at 15 47 36

anatoly314 commented Apr 26, 2017

Angular@4.0.3 together with zone@0.8.9, the issue is still here. Checked in Chrome Version 57.0.2987.133 (64-bit) on OSX Sierra 10.12.4

When downgraded zone to 0.8.7 the issue has gone.

screen shot 2017-04-26 at 15 46 59
screen shot 2017-04-26 at 15 47 13
screen shot 2017-04-26 at 15 47 36

@Tyrix

This comment has been minimized.

Show comment
Hide comment
@Tyrix

Tyrix Apr 26, 2017

The latest zone.js@0.8.9 with @angular/cli@1.0.1 and @angular/...@4.1.0 fixes everything for me

Tyrix commented Apr 26, 2017

The latest zone.js@0.8.9 with @angular/cli@1.0.1 and @angular/...@4.1.0 fixes everything for me

@aguacongas

This comment has been minimized.

Show comment
Hide comment
@aguacongas

aguacongas Apr 27, 2017

I confirm, I cannot reproduce with zone.js@0.8.9, @angular/cli@1.0.1 and @angular/...@4.1.0

aguacongas commented Apr 27, 2017

I confirm, I cannot reproduce with zone.js@0.8.9, @angular/cli@1.0.1 and @angular/...@4.1.0

@sumitarora

This comment has been minimized.

Show comment
Hide comment
@sumitarora

sumitarora Apr 27, 2017

Contributor

Closing Fixed by Zonejs Update.

Contributor

sumitarora commented Apr 27, 2017

Closing Fixed by Zonejs Update.

@sumitarora sumitarora closed this Apr 27, 2017

chase2981 added a commit to chase2981/angular4-lib-starter that referenced this issue May 1, 2017

build(zone.js): hard wired zone.js version
angular/angular-cli#6036 states that the latest versions of zone.js might
be the source of the issue

lnardai added a commit to lnardai/ng2-auto-save that referenced this issue May 2, 2017

@dfanica

This comment has been minimized.

Show comment
Hide comment
@dfanica

dfanica May 31, 2017

I've tried all node.js versions and I'm still getting a similar error.
I'm now on the latest 0.8.11, and everything else is pretty much the latest version.

ERROR TypeError: Cannot read property 'apply' of undefined
    at Up (ima3.js:687)
    at Sp.L (ima3.js:688)
    at Ig (ima3.js:470)
    at R (ima3.js:468)
    at Ep.B (ima3.js:678)
    at Fg (ima3.js:465)
    at Bg (ima3.js:466)
    at ima3.js:464
    at ZoneDelegate.invokeTask (zone.js:424)
    at Object.onInvokeTask (core.es5.js:4140)

So it seems to be an issue on here:

        ZoneDelegate.prototype.invokeTask = function (targetZone, task, applyThis, applyArgs) {
            return this._invokeTaskZS ?
                this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) :
                task.callback.apply(applyThis, applyArgs);
        };

Anyone has any ideas?

dfanica commented May 31, 2017

I've tried all node.js versions and I'm still getting a similar error.
I'm now on the latest 0.8.11, and everything else is pretty much the latest version.

ERROR TypeError: Cannot read property 'apply' of undefined
    at Up (ima3.js:687)
    at Sp.L (ima3.js:688)
    at Ig (ima3.js:470)
    at R (ima3.js:468)
    at Ep.B (ima3.js:678)
    at Fg (ima3.js:465)
    at Bg (ima3.js:466)
    at ima3.js:464
    at ZoneDelegate.invokeTask (zone.js:424)
    at Object.onInvokeTask (core.es5.js:4140)

So it seems to be an issue on here:

        ZoneDelegate.prototype.invokeTask = function (targetZone, task, applyThis, applyArgs) {
            return this._invokeTaskZS ?
                this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs) :
                task.callback.apply(applyThis, applyArgs);
        };

Anyone has any ideas?

@ZhiliangGong

This comment has been minimized.

Show comment
Hide comment
@ZhiliangGong

ZhiliangGong Jul 11, 2017

down graded to zone.js@0.8.4 and issue fixed.

ZhiliangGong commented Jul 11, 2017

down graded to zone.js@0.8.4 and issue fixed.

webcrazyman added a commit to webcrazyman/Angular-Express-starter that referenced this issue Jan 19, 2018

HighQualityCode added a commit to HighQualityCode/Angular-Express-Starter that referenced this issue Jan 22, 2018

dragonboy612 pushed a commit to dragonboy612/Angular_Express_Starter that referenced this issue Sep 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment