Skip to content
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

Cannot set property 'stack' of undefined #3975

Closed
sprider opened this issue Jan 12, 2017 · 25 comments
Closed

Cannot set property 'stack' of undefined #3975

sprider opened this issue Jan 12, 2017 · 25 comments

Comments

@sprider
Copy link

sprider commented Jan 12, 2017

OS?

Windows 7

Versions.

v6.9.2

Repro steps.

Yes, Auth0 implementation

Hi,

I am new to angularjs 2. Any idea about this error?

error

@beeman
Copy link
Contributor

beeman commented Jan 12, 2017

@sprider can you please give some more information about the version you are using and the repro steps? For instance which steps you took to implement Auth0?

@deebloo
Copy link
Contributor

deebloo commented Jan 12, 2017

@sprider so there seems to be a bug in zone.js. Try fixing the version to 0.7.2 and see if the error message is more explicit

@scttcper
Copy link
Contributor

@deebloo thanks thats working for me.

@beeman
Copy link
Contributor

beeman commented Jan 13, 2017

I can confirm that I have the issue too on 1.0.0-beta.25, freshly installed app with ng new.

Downgrading zone.js one minor version seems to fix it: npm install --save zone.js@0.7.4

@sprider
Copy link
Author

sprider commented Jan 13, 2017

npm install --save zone.js@0.7.4 fixed the problem for me

Thank you guys

@sprider sprider closed this as completed Jan 13, 2017
@goto1
Copy link

goto1 commented Jan 13, 2017

I can also confirm that zone.js@0.7.4 fixed the problem

OS?

macOS Sierra 10.12.2

Versions.

angular-cli: 1.0.0-beta.24
node: 6.9.1
os: darwin x64
@angular/common: 2.4.3
@angular/compiler: 2.4.3
@angular/core: 2.4.3
@angular/forms: 2.4.3
@angular/http: 2.4.3
@angular/platform-browser: 2.4.3
@angular/platform-browser-dynamic: 2.4.3
@angular/router: 3.4.3
@angular/compiler-cli: 2.4.3

The log given by the failure.

TypeError: Cannot set property 'stack' of undefined
at SyntaxError.set [as stack] (webpack:////@angular/compiler/src/facade/errors.js:64:31 <- src/test.ts:55573:61)
at assignAll (webpack:///
/zone.js/dist/zone.js:704:0 <- src/test.ts:71100:29)
at SyntaxError.ZoneAwareError (webpack:////zone.js/dist/zone.js:775:0 <- src/test.ts:71171:16)
at SyntaxError.BaseError [as constructor] (webpack:///
/@angular/compiler/src/facade/errors.js:26:0 <- src/test.ts:55535:16)
at new SyntaxError (webpack:////@angular/compiler/src/util.js:151:0 <- src/test.ts:5508:16)
at DirectiveNormalizer.normalizeLoadedTemplate (webpack:///
/@angular/compiler/src/directive_normalizer.js:127:0 <- src/test.ts:13379:19)
at DirectiveNormalizer.normalizeTemplateSync (webpack:////@angular/compiler/src/directive_normalizer.js:104:0 <- src/test.ts:13356:21)
at DirectiveNormalizer.normalizeTemplate (webpack:///
/@angular/compiler/src/directive_normalizer.js:81:0 <- src/test.ts:13333:43)
at CompileMetadataResolver._loadDirectiveMetadata (webpack:////@angular/compiler/src/metadata_resolver.js:207:29 <- src/test.ts:14575:75)
at webpack:///
/@angular/compiler/src/metadata_resolver.js:383:33 <- src/test.ts:14751:54
at Array.forEach (native)
at CompileMetadataResolver.loadNgModuleDirectiveAndPipeMetadata (webpack:////@angular/compiler/src/metadata_resolver.js:382:0 <- src/test.ts:14750:41)
at webpack:///
/@angular/compiler/src/jit/compiler.js:170:0 <- src/test.ts:39012:58
at Array.forEach (native)
at JitCompiler._loadModules (webpack:////@angular/compiler/src/jit/compiler.js:169:0 <- src/test.ts:39011:43)
TypeError: Cannot read property 'detectChanges' of undefined
at Object. (webpack:///src/app/banner/banner-inline.component.spec.ts:28:12 <- src/test.ts:72233:16)
at ZoneDelegate.invoke (webpack:///
/zone.js/dist/zone.js:242:0 <- src/test.ts:70638:26)
at ProxyZoneSpec.onInvoke (webpack:////zone.js/dist/proxy.js:79:0 <- src/test.ts:51715:39)
at ZoneDelegate.invoke (webpack:///
/zone.js/dist/zone.js:241:0 <- src/test.ts:70637:32)
at Zone.run (webpack:////zone.js/dist/zone.js:113:0 <- src/test.ts:70509:43)
at Object. (webpack:///
/zone.js/dist/jasmine-patch.js:102:0 <- src/test.ts:51430:34)
at ZoneQueueRunner.jasmine.QueueRunner.ZoneQueueRunner.execute (webpack:///~/zone.js/dist/jasmine-patch.js:132:0 <- src/test.ts:51460:42)

@snarun
Copy link

snarun commented Jan 14, 2017

Reverting to zone.js@0.7.4 fixed this problem (^0.7.4)
Zone.js was referred earlier in package.json as ~0.7.4.

@luozt
Copy link

luozt commented Jan 15, 2017

zone.js@0.7.5 really prevents Angular to display error message. Downgrading zone.js to version 0.7.4 helps.

@guneybilen
Copy link

Downgrading advice to 0.7.2 helped me. Thanks!

@elvisbegovic
Copy link
Contributor

same error ü

@rodneyjoyce
Copy link

Downgrading to 0.7.4 helped - 0.7.5 obscured it

@MatGhp
Copy link

MatGhp commented Jan 17, 2017

Same error.

Downgrading to 0.7.2 caused :
'Uncaught TypeError: Cannot set property stack of [object Object] which has only a getter' with Angular #427
zone.js issue

My packages :

  • "dependencies": {
  • "@angular/common": "^2.4.3",
  • "@angular/compiler": "^2.4.3",
  • "@angular/core": "^2.4.3",
  • "@angular/forms": "^2.4.3",
  • "@angular/http": "^2.4.3",
  • "@angular/platform-browser": "^2.4.3",
  • "@angular/platform-browser-dynamic": "^2.4.3",
  • "@angular/router": "^3.4.3",
  • "core-js": "^2.4.1",
  • "rxjs": "^5.0.1",
  • "ts-helpers": "^1.1.1",
  • "zone.js": "^0.7.4"
  • },
  • "devDependencies": {
  • "@angular/compiler-cli": "^2.4.3",

@aatinubu
Copy link

I got the same error earlier today.

It was generated because I failed to import a module (ReactiveFormsModule) in my app.module file.

Ensure you import every dependency in your app.module.

Cheers!

clubnick pushed a commit to clubnick/NG2_TypeScript-myapp that referenced this issue Jan 17, 2017
* starting with repair karma tests
  app.components.spec.ts, test true is true
  zonejs@0.7.4 needed (not zonejs@0.7.5) ...angular/angular-cli#3975
@beeman
Copy link
Contributor

beeman commented Jan 18, 2017

The issue has been fixed in zone.js version 0.7.6.

npm install --save zone.js@0.7.6 should fix this, and new apps created with ng new or ng init are now work out of the box again :)

@snarun
Copy link

snarun commented Jan 18, 2017

Upgrading to ^0.7.6 worked !! Thank you!

@bluehenry
Copy link

npm install --save zone.js@0.7.4 fixed the problem for me

Thank you guys!

@Germcguire87
Copy link

I feel like this needs to be reopened. Certain errors are still obscured. I am getting an error that reads when using ^0.7.6

Error: Uncaught (in promise): Error: DI Error

when using zone.js@0.7.4 is reads

Error: Uncaught (in promise): Error: No provider for RouterExtendedService!

which of course is much more helpful

@beeman
Copy link
Contributor

beeman commented Jan 19, 2017

@Germcguire87 I actually think that is an issue that should be opened here https://github.com/angular/zone.js as angular-cli can not change that behavior.

@bardiarastin
Copy link

switching to zone.js 0.7.4 solved my problem
thank you @sprider

mrahbar pushed a commit to kubermatic/dashboard that referenced this issue Jan 23, 2017
@CaliThemanDC
Copy link

You guys rock. This worked for me

@jrood
Copy link

jrood commented Jan 30, 2017

reverting to 0.7.4 seems to have fixed this issue for me too

@beeman
Copy link
Contributor

beeman commented Jan 30, 2017

Please note that the most recent version of zone.js is 0.7.6 and that one fixes the issue too.

@jrood
Copy link

jrood commented Jan 30, 2017

@beeman ah yes thanks, 0.7.6 works for me too

beeman added a commit to beeman/wt-angular2-boilerplate that referenced this issue Jan 31, 2017
@damirkusar
Copy link

damirkusar commented Feb 16, 2017

For me 0.7.7 worked as well. But I had a problem with the webpack generated files, so I had to delete them and regenerate them. Just regenerating did not solve the problem. Deletion did.

psilospore pushed a commit to psilospore/ng-next-select that referenced this issue Apr 5, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests