You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Uncaught Error: ASSERTION ERROR: NodeInjector must have some connection to the module injector tree #55137
Please provide the steps to reproduce the issue [Bug Report only]
Install Angular 17.3.2
Create minimal app example provided below
Run dev instance ('ng serve')
Open Angular Devtool + dev console
Refresh the app page and see runtime exception + missing components in 'Components' tab of Angular devtool
Two conditions need to be met for error to happen - child component need to import CommonModule and ChildComponent needs to be used inside @defer block.
This example throws runtime exception. If we remove CommonModule import from ChildComponent there is no runtime exceptions and everything is working as expected.
Please provide the expected behavior vs the actual behavior you encountered [Bug Report only]
No runtime exception
Please provide a screenshot if possible [Bug Report only]
No response
Please provide the exception or error you saw [Bug Report only]
Uncaught Error: ASSERTION ERROR: NodeInjector must have some connection to the module injector tree
at throwError2 (core.mjs:537:11)
at getModuleInjectorOfNodeInjector (core.mjs:30638:9)
at getInjectorResolutionPathHelper (core.mjs:30528:40)
at getInjectorResolutionPathHelper (core.mjs:30540:9)
at Object.getInjectorResolutionPath [as ɵgetInjectorResolutionPath] (core.mjs:30516:5)
Is this a browser-specific issue? If so, please specify the device, browser, and version. [Bug Report only]
Yes, devtools is the latest version 1.0.12 (sha d15dca0).
Also, to make this as isolated as possible, I was able to replicate this in Windows 10 VM installing everything from scatch:
Node 18.19.0
Angular 17.3.2
Angular Devtools 1.0.12
Fresh Angular app using ng new + replace app.component.ts with example from this bug's description
To see console exception you have to open Angular devtool tab in browser's devtools panel first to initialize Angular devtools - until then there are no any exceptions.
And as @alxhub mentioned, this affects only Angular devtools - application itself seems to be working correctly.
@sd-git thanks for reporting the issue. I was able to reproduce the problem in unit tests and confirmed that only debug APIs used by DevTools were affected. The underlying issue is that PR #55079 introduced a new injector chain configuration, which wasn't handled in the debug util logic. I've created a PR with the proposed fix, see PR #55144.
The fix for this issue was released today as a part of Angular v17.3.3 and is available on NPM. Please let us know if the problem still exists after updating an app to v17.3.3 (no updates to DevTools should be needed).
Thanks @AndrewKushnir , minimal example now works as expected, no any errors.
But in real bigger project I'm now facing new kind of an error with devtools + defer:
Let me know if it's not clear from the error's screenshot what's happening and I will try to come up with another 'minimal example' to reproduce.
Probably, it's related to more custom and more complex child components that are used inside of @defer block in real project comparing to this simple example.
Reacted by Jamal El Boutaibi Mohamed
Reacted by Jamal El Boutaibi Mohamed
angular-automatic-lock-bot commented on May 5, 2024
Activity
alxhub commentedon Mar 30, 2024
This seems to be a devtools issue - I can't reproduce it in JIT or AOT modes in the actual application (the child component renders normally).
Also, the crash stack trace shows
ɵgetInjectorResolutionPathwhich is a devtools-specific API.JeanMeche commentedon Mar 31, 2024
Also tried to reproduce it without success. 17.3.2 & latest pre-release of 18 (next.2).
Is your devtools up-to-date (1.0.12) ?
sd-git commentedon Mar 31, 2024
Yes, devtools is the latest version 1.0.12 (sha d15dca0).
Also, to make this as isolated as possible, I was able to replicate this in Windows 10 VM installing everything from scatch:
ng new+ replace app.component.ts with example from this bug's descriptionTo see console exception you have to open Angular devtool tab in browser's devtools panel first to initialize Angular devtools - until then there are no any exceptions.
And as @alxhub mentioned, this affects only Angular devtools - application itself seems to be working correctly.
fix(core): handle `ChainedInjector`s in injector debug utils
AndrewKushnir commentedon Apr 1, 2024
@sd-git thanks for reporting the issue. I was able to reproduce the problem in unit tests and confirmed that only debug APIs used by DevTools were affected. The underlying issue is that PR #55079 introduced a new injector chain configuration, which wasn't handled in the debug util logic. I've created a PR with the proposed fix, see PR #55144.
fix(core): handle `ChainedInjector`s in injector debug utils (#55144)
fix(core): handle `ChainedInjector`s in injector debug utils (angular…
AndrewKushnir commentedon Apr 4, 2024
The fix for this issue was released today as a part of Angular v17.3.3 and is available on NPM. Please let us know if the problem still exists after updating an app to v17.3.3 (no updates to DevTools should be needed).
sd-git commentedon Apr 4, 2024
Thanks @AndrewKushnir , minimal example now works as expected, no any errors.
But in real bigger project I'm now facing new kind of an error with devtools + defer:

Let me know if it's not clear from the error's screenshot what's happening and I will try to come up with another 'minimal example' to reproduce.
Probably, it's related to more custom and more complex child components that are used inside of @defer block in real project comparing to this simple example.
angular-automatic-lock-bot commentedon May 5, 2024
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.