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
Angular 17.3 ngOnInit running infinite loop with defer block #55036
P2The issue is important to a large percentage of users, with a workaroundarea: coreIssues related to the framework runtimecore: deferIssues related to @defer blocks.
See here >>
https://stackoverflow.com/questions/78216445/angular-ngoninit-running-multipe-times-resulting-in-call-stack-error-with-sign
Wasn't a problem with Angular 17.01
Please provide the environment you discovered this bug in (run ng version)
Thanks. I don't know what's causing it, but it just refuses to load both components in the defer block. project navigation gets repeatedly loaded, and router outlet, won't load project-detail (which is an empty component anyway). But I can load each component, when I comment one or the other out. The links also lose all their relative link referencing....
For more information, this does work! (But, i have other components, where I do need multiple components in a defer block, so, not sure what's going on with Angular 17.3). If put the components in nested defer blocks, inside the main defer block it also, strangely, works, but the components lose their relative link referencing, and reference from the app root...
@dreamstar-enterprises I've confirmed that the root cause of this issue is the same as the one in #54864. We are working on a fix and I'll share an update once the fix is available.
Quick update: the fix for this issue was merged and released as a part of Angular v17.3.2 (available on NPM). Please let us know if you still see the issue after updating to v17.3.2.
Its fixed! Works great! (like it did with 17.0.1). Thank you very much for listening to my request, and investigating / attacking the problem! I'm very grateful!
Reacted by Andrew Kushnir
angular-automatic-lock-bot commented on Apr 28, 2024
P2The issue is important to a large percentage of users, with a workaroundarea: coreIssues related to the framework runtimecore: deferIssues related to @defer blocks.
Activity
atscott commentedon Mar 25, 2024
Please provide a runnable reproduction, either in a Github repository or Stackblitz.
dreamstar-enterprises commentedon Mar 26, 2024
Done! Not sure if you can see the code and replicate the issue..
UPDATE STACKBLITZ
Here is what I managed to put onto Stackblitz
https://stackblitz.com/edit/stackblitz-starters-aeguwd?file=src%2Fproject-parent%2Fproject-parent.routes.ts
atscott commentedon Mar 26, 2024
@dreamstar-enterprises Thank you for the reproduction. @AndrewKushnir I simplified the reproduction quite a bit here: https://stackblitz.com/edit/stackblitz-starters-bmouvm. This seems pretty similar to #54864 where a component with
importscauses an issue.dreamstar-enterprises commentedon Mar 26, 2024
Thanks. I don't know what's causing it, but it just refuses to load both components in the defer block. project navigation gets repeatedly loaded, and router outlet, won't load project-detail (which is an empty component anyway). But I can load each component, when I comment one or the other out. The links also lose all their relative link referencing....
dreamstar-enterprises commentedon Mar 26, 2024
dreamstar-enterprises commentedon Mar 26, 2024
For more information, this does work! (But, i have other components, where I do need multiple components in a defer block, so, not sure what's going on with Angular 17.3). If put the components in nested defer blocks, inside the main defer block it also, strangely, works, but the components lose their relative link referencing, and reference from the app root...
AndrewKushnir commentedon Mar 27, 2024
@dreamstar-enterprises I've confirmed that the root cause of this issue is the same as the one in #54864. We are working on a fix and I'll share an update once the fix is available.
dreamstar-enterprises commentedon Mar 27, 2024
Thank you! I really, really appreciate it. (I'll try to roll back to 17.01 if I can in the meantime)
fix(core): establish proper injector resolution order for `@defer` bl…
fix(core): establish proper injector resolution order for `@defer` bl…
fix(core): establish proper injector resolution order for `@defer` bl…
dreamstar-enterprises commentedon Mar 28, 2024
Thank you. The issue seems closed now. Do you know how I, myself, could get the changes. Or do I have to wait for the next published release?
atscott commentedon Mar 28, 2024
There will be a release later today that includes the fix.
AndrewKushnir commentedon Mar 28, 2024
Quick update: the fix for this issue was merged and released as a part of Angular v17.3.2 (available on NPM). Please let us know if you still see the issue after updating to v17.3.2.
dreamstar-enterprises commentedon Mar 28, 2024
Its fixed! Works great! (like it did with 17.0.1). Thank you very much for listening to my request, and investigating / attacking the problem! I'm very grateful!
angular-automatic-lock-bot commentedon Apr 28, 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.