Skip to content

fix(core): inject APP_ID before injector is destroyed - #61885

Closed
arturovt wants to merge 1 commit into
angular:mainfrom
arturovt:fix/core-request-appId
Closed

arturovt wants to merge 1 commit into
angular:mainfrom
arturovt:fix/core-request-appId

Conversation

@arturovt

@arturovt arturovt commented Jun 4, 2025

Copy link
Copy Markdown
Contributor

In this commit, we request APP_ID outside the onDestroy callback because the injector might already be in a destroyed state when the callback runs.

@pullapprove
pullapprove Bot requested a review from alxhub June 4, 2025 23:45
@angular-robot angular-robot Bot added the area: core Issues related to the framework runtime label Jun 4, 2025
@ngbot ngbot Bot added this to the Backlog milestone Jun 4, 2025
@JeanMeche

Copy link
Copy Markdown
Member

Are you sure the application injector can be destroyed at this point ?

@arturovt

arturovt commented Jun 5, 2025

Copy link
Copy Markdown
Contributor Author

Yes, I have an app which reproduces this issue.

@JeanMeche

Copy link
Copy Markdown
Member

can we try to capture that in a test then ?

@arturovt

arturovt commented Jun 5, 2025

Copy link
Copy Markdown
Contributor Author

yes, it's reproducible in existing tests in the repo, it didn't capture before because its wrapped with ngServerMode

In this commit, we request `APP_ID` outside the `onDestroy` callback because the injector might already be in a destroyed state when the callback runs.
@arturovt
arturovt force-pushed the fix/core-request-appId branch from c511f0a to 6fead75 Compare June 5, 2025 10:42
@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release action: presubmit The PR is in need of a google3 presubmit and removed action: merge The PR is ready for merge by the caretaker labels Jun 10, 2025
@AndrewKushnir
AndrewKushnir removed the request for review from alxhub June 10, 2025 23:34
@AndrewKushnir

Copy link
Copy Markdown
Contributor

Presubmit.

@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note and removed action: presubmit The PR is in need of a google3 presubmit labels Jun 11, 2025
@AndrewKushnir

AndrewKushnir commented Jun 11, 2025 •

Copy link
Copy Markdown
Contributor

Caretaker note: the presubmit is "green", this PR is ready for merge.

@pkozlowski-opensource

Copy link
Copy Markdown
Member

This PR was merged into the repository by commit 31da435.

The changes were merged into the following branches: main, 20.0.x

pkozlowski-opensource pushed a commit that referenced this pull request Jun 12, 2025
In this commit, we request `APP_ID` outside the `onDestroy` callback because the injector might already be in a destroyed state when the callback runs.

PR Close #61885
@angular-automatic-lock-bot

Copy link
Copy Markdown

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 Jul 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants