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

Chrome 66 angular v. 5-6 JIT not compile: Unhandled Promise rejection: Can't resolve all parameters for #23958

Closed
KrakenTyio opened this issue May 17, 2018 · 10 comments

Comments

@KrakenTyio
Copy link

I'm submitting a...


[x] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:

Current behavior

When i come to work and run building project for develop(JIT) with webpack 4, ng-router-loader/ts-loader/angular2-template-loader always get this error.

Tested with and without happypack.

Aot works correctly.

In FF is open project correctly as before.
Chrome raisethis error. version on bottom.

Unhandled Promise rejection: Can't resolve all parameters for PeriodService: (?, ?, ?, ?). ; Zone: angular ; Task: Promise.then ; Value: Error: Can't resolve all parameters for PeriodService: (?, ?, ?, ?).
    at syntaxError (compiler.js:486)
    at CompileMetadataResolver../node_modules/@angular/compiler/esm5/compiler.js.CompileMetadataResolver._getDependenciesMetadata (compiler.js:15706)
    at CompileMetadataResolver../node_modules/@angular/compiler/esm5/compiler.js.CompileMetadataResolver._getTypeMetadata (compiler.js:15541)
    at CompileMetadataResolver../node_modules/@angular/compiler/esm5/compiler.js.CompileMetadataResolver._getInjectableMetadata (compiler.js:15521)
    at CompileMetadataResolver../node_modules/@angular/compiler/esm5/compiler.js.CompileMetadataResolver.getProviderMetadata (compiler.js:15881)
    at compiler.js:15792
    at Array.forEach (<anonymous>)
    at CompileMetadataResolver../node_modules/@angular/compiler/esm5/compiler.js.CompileMetadataResolver._getProvidersMetadata (compiler.js:15752)
    at CompileMetadataResolver../node_modules/@angular/compiler/esm5/compiler.js.CompileMetadataResolver.getNgModuleMetadata (compiler.js:15320)
    at CompileMetadataResolver../node_modules/@angular/compiler/esm5/compiler.js.CompileMetadataResolver.getNgModuleSummary (compiler.js:15139)
    at compiler.js:15237
    at Array.forEach (<anonymous>)
    at CompileMetadataResolver../node_modules/@angular/compiler/esm5/compiler.js.CompileMetadataResolver.getNgModuleMetadata (compiler.js:15215)
    at JitCompiler../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._loadModules (compiler.js:34413)
    at JitCompiler../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileModuleAndComponents (compiler.js:34374)
    at JitCompiler../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler.compileModuleAsync (compiler.js:34268)
    at CompilerImpl../node_modules/@angular/platform-browser-dynamic/esm5/platform-browser-dynamic.js.CompilerImpl.compileModuleAsync (platform-browser-dynamic.js:239)
    at MergeMapSubscriber.project (router.js:4603)
    at MergeMapSubscriber../node_modules/rxjs/operators/mergeMap.js.MergeMapSubscriber._tryNext (mergeMap.js:122)
    at MergeMapSubscriber../node_modules/rxjs/operators/mergeMap.js.MergeMapSubscriber._next (mergeMap.js:112)
    at MergeMapSubscriber../node_modules/rxjs/Subscriber.js.Subscriber.next (Subscriber.js:93)
    at PromiseObservable.js:66
    at ZoneDelegate../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:388)
    at Object.onInvoke (core.js:4760)
    at ZoneDelegate../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:387)
    at Zone../node_modules/zone.js/dist/zone.js.Zone.run (zone.js:138)
    at zone.js:872
    at ZoneDelegate../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
    at Object.onInvokeTask (core.js:4751)
    at ZoneDelegate../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
    at Zone../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
    at drainMicroTaskQueue (zone.js:595) Error: Can't resolve all parameters for PeriodService: (?, ?, ?, ?).
    at syntaxError (http://localhost:8080/public/cng2/app.js:18227:34)
    at CompileMetadataResolver../node_modules/@angular/compiler/esm5/compiler.js.CompileMetadataResolver._getDependenciesMetadata (http://localhost:8080/public/cng2/app.js:33447:35)
    at CompileMetadataResolver../node_modules/@angular/compiler/esm5/compiler.js.CompileMetadataResolver._getTypeMetadata (http://localhost:8080/public/cng2/app.js:33282:26)
    at CompileMetadataResolver../node_modules/@angular/compiler/esm5/compiler.js.CompileMetadataResolver._getInjectableMetadata (http://localhost:8080/public/cng2/app.js:33262:21)
    at CompileMetadataResolver../node_modules/@angular/compiler/esm5/compiler.js.CompileMetadataResolver.getProviderMetadata (http://localhost:8080/public/cng2/app.js:33622:40)
    at http://localhost:8080/public/cng2/app.js:33533:49
    at Array.forEach (<anonymous>)
    at CompileMetadataResolver../node_modules/@angular/compiler/esm5/compiler.js.CompileMetadataResolver._getProvidersMetadata (http://localhost:8080/public/cng2/app.js:33493:19)
    at CompileMetadataResolver../node_modules/@angular/compiler/esm5/compiler.js.CompileMetadataResolver.getNgModuleMetadata (http://localhost:8080/public/cng2/app.js:33061:50)
    at CompileMetadataResolver../node_modules/@angular/compiler/esm5/compiler.js.CompileMetadataResolver.getNgModuleSummary (http://localhost:8080/public/cng2/app.js:32880:52)
    at http://localhost:8080/public/cng2/app.js:32978:72
    at Array.forEach (<anonymous>)
    at CompileMetadataResolver../node_modules/@angular/compiler/esm5/compiler.js.CompileMetadataResolver.getNgModuleMetadata (http://localhost:8080/public/cng2/app.js:32956:49)
    at JitCompiler../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._loadModules (http://localhost:8080/public/cng2/app.js:52154:87)
    at JitCompiler../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler._compileModuleAndComponents (http://localhost:8080/public/cng2/app.js:52115:36)
    at JitCompiler../node_modules/@angular/compiler/esm5/compiler.js.JitCompiler.compileModuleAsync (http://localhost:8080/public/cng2/app.js:52009:37)
    at CompilerImpl../node_modules/@angular/platform-browser-dynamic/esm5/platform-browser-dynamic.js.CompilerImpl.compileModuleAsync (http://localhost:8080/public/cng2/app.js:72841:49)
    at MergeMapSubscriber.project (http://localhost:8080/public/cng2/app.js:84417:124)
    at MergeMapSubscriber../node_modules/rxjs/operators/mergeMap.js.MergeMapSubscriber._tryNext (http://localhost:8080/public/cng2/app.js:131136:27)
    at MergeMapSubscriber../node_modules/rxjs/operators/mergeMap.js.MergeMapSubscriber._next (http://localhost:8080/public/cng2/app.js:131126:18)
    at MergeMapSubscriber../node_modules/rxjs/Subscriber.js.Subscriber.next (http://localhost:8080/public/cng2/app.js:113434:18)
    at http://localhost:8080/public/cng2/app.js:118556:36
    at ZoneDelegate../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (http://localhost:8080/public/cng2/polyfills.js:18449:26)
    at Object.onInvoke (http://localhost:8080/public/cng2/app.js:57997:33)
    at ZoneDelegate../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (http://localhost:8080/public/cng2/polyfills.js:18448:32)
    at Zone../node_modules/zone.js/dist/zone.js.Zone.run (http://localhost:8080/public/cng2/polyfills.js:18199:43)
    at http://localhost:8080/public/cng2/polyfills.js:18933:34
    at ZoneDelegate../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (http://localhost:8080/public/cng2/polyfills.js:18482:31)
    at Object.onInvokeTask (http://localhost:8080/public/cng2/app.js:57988:33)
    at ZoneDelegate../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (http://localhost:8080/public/cng2/polyfills.js:18481:36)
    at Zone../node_modules/zone.js/dist/zone.js.Zone.runTask (http://localhost:8080/public/cng2/polyfills.js:18249:47)
    at drainMicroTaskQueue (http://localhost:8080/public/cng2/polyfills.js:18656:35)

Expected behavior

JIT compilation should work with custom services

Minimal reproduction of the problem with instructions

demo is now not present, but later i can create
Its happening on custom services.
Modules are lazy loaded.
This _getDependenciesMetadata resolving custom services as undefined

Environment


Angular version: 5.2.10 also 6.0.x


Browser:
- [x] Chrome (desktop) version 66.0.3359.139 64bit
 
For Tooling issues:
- Node version: 9.x and 10.x
- NPM version: 5.x and 6.x
- Platform:  Arch linux, gnome latest, 

core dependenices


"@angular-devkit/build-optimizer": "0.5.10",
"@angular/animations": "5.2.10",
"@angular/common": "5.2.10",
"@angular/compiler": "5.2.10",
"@angular/compiler-cli": "5.2.10",
"@angular/core": "5.2.10",
"@angular/forms": "5.2.10",
"@angular/http": "5.2.10",
"@angular/language-service": "5.2.10",
"@angular/platform-browser": "5.2.10",
"@angular/platform-browser-dynamic": "5.2.10",
"@angular/router": "5.2.10",
"@ngrx/store": "5.2.0",
"angular-router-loader": "0.8.5",
"ckeditor": "4.9.2",
"core-js": "2.5.5",
"croppie": "2.6.2",
"moment": "2.22.1",
"reflect-metadata": "0.1.12",
"rxjs": "5.5.10",
"sortablejs": "1.7.0",
"xlsx": "0.12.11",
"zone.js": "0.8.26",
"base64-js": "1.3.0",
"codelyzer": "4.3.0",
"copy-webpack-plugin": "4.5.1",
"css-loader": "0.28.11",
"detectizr": "2.2.0",
"es6-promise-loader": "1.0.2",
"extract-text-webpack-plugin": "3.0.2",
"file-loader": "1.1.11",
"file-saver": "1.3.8",
"fork-ts-checker-webpack-plugin": "0.4.1",
"happypack": "5.0.0",
"html-loader": "0.5.5",
"html-webpack-plugin": "3.2.0",
"ignore-loader": "0.1.2",
"imports-loader": "0.8.0",
"lodash": "4.17.10",
"modernizr": "3.6.0",
"ng-router-loader": "2.1.0",
"ngc-webpack": "4.1.2",
"ngx-i18nsupport": "0.15.0",
"node-normalize-scss": "3.0.0",
"node-sass": "4.9.0",
"node-sass-tilde-importer": "1.0.2",
"null-loader": "0.1.1",
"promise-loader": "1.0.0",
"raw-loader": "0.5.1",
"rimraf": "2.6.2",
"sass-loader": "7.0.1",
"style-loader": "0.21.0",
"to-string-loader": "1.1.5",
"ts-loader": "4.2.0",
"tslint": "5.10.0",
"tslint-loader": "3.6.0",
"typescript": "2.7.2",
"webpack": "4.6.0",
"webpack-bundle-analyzer": "2.11.1",
"webpack-cli": "2.0.15",
"webpack-dev-server": "3.1.3",
"webpack-merge": "4.1.2",
"webrtc-adapter": "6.1.5",
"yargs": "11.0.0"

@Boboss74
Copy link

Boboss74 commented May 17, 2018

same since this morning, but i update my chrome ~ a week ago

this is weird, because my previous build that use to work some days ago, only work in aot now

@Boboss74
Copy link

I found it!!!

It's from Augury, it's working when i disable the plugin

@KrakenTyio
Copy link
Author

KrakenTyio commented May 17, 2018

I found issue with lazy loaded module, Im gona try disable this augury

Yes augury broke this
Thx @Boboss74

@tinh1115
Copy link

yes, disabled Augury works. thanks @Boboss74

@Da13Harris
Copy link
Contributor

Same issue: Lazy loaded modules fail with "Can't resolve all parameters for ..." error.
Same fix: Turn off Augury plugin for Chrome.

Thanks to @Boboss74 for getting me out of the endless rabbit hole of tinkering with imports/exports.

@Boboss74
Copy link

Boboss74 commented May 17, 2018

Thanks to @KrakenTyio too!
I didn't think to try with Firefox. It was the clue I needed.

@santiago-elustondo
Copy link

santiago-elustondo commented May 17, 2018

@Da13Harris, @KrakenTyio, @Boboss74, I'm trying to replicate this issue.
My lazy module seems to load fine, even with DI-dependent services.

How are you providing the services / dependencies in question?

@rsksmiles
Copy link

Thanks to @KrakenTyio too!
Life Saver.... it worked on the latest edge but not in chrome! searched for "at syntaxError (compiler.js:486)" and found this thread.

@lewisames
Copy link

THANK YOU! I was having quite a morning.

@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 13, 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

7 participants