René's URL Explorer Experiment


Title: fix(core): safely handle server platform destruction on aborted SSR requests by alan-agius4 · Pull Request #72139 · angular/angular · GitHub

Open Graph Title: fix(core): safely handle server platform destruction on aborted SSR requests by alan-agius4 · Pull Request #72139 · angular/angular

X Title: fix(core): safely handle server platform destruction on aborted SSR requests by alan-agius4 · Pull Request #72139 · angular/angular

Description: PR Checklist The commit message follows our guidelines: https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md Tests for the changes have been added (for bug fixes / features) Docs have been added / updated (for bug fixes / features) PR Type Bugfix What is the current behavior? When an SSR server immediately destroys PlatformRef on request abort (e.g. via @angular/ssr), several framework paths can crash the Node.js process with uncaughtException or unhandledRejection, or leave in-flight requests open: bootstrap() looks up ENABLE_ROOT_COMPONENT_BOOTSTRAP after ApplicationInitStatus.donePromise without checking envInjector.destroyed, throwing NG0205. ApplicationInitStatus does not unsubscribe observable initializers or settle donePromise when destroyed. INTERNAL_APPLICATION_ERROR_HANDLER throws via setTimeout(() => { throw e; }) when injector.destroyed and no prior error has cached userErrorHandler, terminating Node.js SSR servers. PendingTasks.run() reports post-destroy promise rejections to ErrorHandler. FetchBackend does not abort in-flight fetch requests on DestroyRef.onDestroy, and emitting complete() on stream cancellation triggers EmptyError in firstValueFrom/lastValueFrom. Router.dispose() does not unsubscribe active setupNavigations transitions, leaving guards and resolvers running after platform teardown. renderInternal() reports rejections from async BEFORE_APP_SERIALIZED hooks and calls renderToString() even if the platform was destroyed mid-hook. Related issue: angular/angular-cli#34754 What is the new behavior? @angular/core: ApplicationInitStatus unsubscribes observable initializers on DestroyRef.onDestroy, settles donePromise without setting done = true, stops remaining initializers if destroyed, and ignores late post-destroy rejections. bootstrap(), internalCreateApplication(), and PlatformRef.bootstrapModule() settle cleanly with the destroyed ApplicationRef / NgModuleRef without bootstrapping root components when destroyed before or during initialization. PendingTasks.run() checks DestroyRef.destroyed before reporting errors. INTERNAL_APPLICATION_ERROR_HANDLER logs via console.error('ERROR', e) on the server when destroyed without a cached ErrorHandler instead of throwing from setTimeout. @angular/common/http: FetchBackend unsubscribes on DestroyRef.onDestroy to abort in-flight fetch calls and clear timeouts without emitting complete() or error(), cancels body streams on destroy, and skips initiating requests when already destroyed. @angular/router: Router.dispose() unsubscribes active setupNavigations transitions (after detaching the navigation event listener) and withEnabledBlockingInitialNavigation() skips starting navigation if the injector was destroyed while awaiting LOCATION_INITIALIZED. @angular/platform-server: renderInternal(), renderApplication(), and renderModule() return '' early when destroyed before or during async BEFORE_APP_SERIALIZED hooks, suppress post-destroy ErrorHandler reporting, and ensure asyncDestroyPlatform() always resolves safely. Does this PR introduce a breaking change? No Other information Companion @angular/ssr PR: angular/angular-cli#34768

Open Graph Description: PR Checklist The commit message follows our guidelines: https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md Tests for the changes have been added (for bug...

X Description: PR Checklist The commit message follows our guidelines: https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md Tests for the changes have been added (for bug...

Opengraph URL: https://github.com/angular/angular/pull/72139

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:7b8144db-c5d3-2007-65fc-1e13d3974392
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB03C:240CD1:334C1EF:413D319:6B01DAEF
html-safe-noncea9d1267202cc422cea6fa8712ef11c50b4d999bc095ff325091e0f6b944dc971
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDNDOjI0MENEMTozMzRDMUVGOjQxM0QzMTk6NkIwMURBRUYiLCJ2aXNpdG9yX2lkIjoiNzc1NDk3NzE1ODg1ODEzNjMwNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf9d89b0aad4dba54aafae77cc6ebe8adaa76b8ce746ffc88b0d8a368c2eff5b4
hovercard-subject-tagpull_request:5409711779
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/angular/angular/pull/72139/files
twitter:imagehttps://avatars.githubusercontent.com/u/17563226?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/17563226?s=400&v=4
og:image:altPR Checklist The commit message follows our guidelines: https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md Tests for the changes have been added (for bug...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/angular/angular git https://github.com/angular/angular.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id24195339
octolytics-dimension-repository_nwoangular/angular
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24195339
octolytics-dimension-repository_network_root_nwoangular/angular
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/angular/angular/pull/72139/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fpull%2F72139%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fpull%2F72139%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=angular%2Fangular
Reloadhttps://github.com/angular/angular/pull/72139/files
Reloadhttps://github.com/angular/angular/pull/72139/files
Reloadhttps://github.com/angular/angular/pull/72139/files
angularhttps://github.com/angular
angularhttps://github.com/angular/angular
Codehttps://github.com/angular/angular
Issues835 (835)https://github.com/angular/angular/issues
Pull requests142 (142)https://github.com/angular/angular/pulls
Discussionshttps://github.com/angular/angular/discussions
Actionshttps://github.com/angular/angular/actions
Projectshttps://github.com/angular/angular/projects
Security and quality40 (40)https://github.com/angular/angular/security
Insightshttps://github.com/angular/angular/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fangular%2Fangular%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fangular%2Fangular%2Fissues%2Fnew%2Fchoose
alan-agius4https://github.com/alan-agius4
angular:mainhttps://github.com/angular/angular/tree/main
alan-agius4:fix-ssr-abort-destroyhttps://github.com/alan-agius4/angular/tree/fix-ssr-abort-destroy
Conversation 7 https://github.com/angular/angular/pull/72139
Commits 8 https://github.com/angular/angular/pull/72139/commits
Checks 19 https://github.com/angular/angular/pull/72139/checks
Files changed 19 https://github.com/angular/angular/pull/72139/files
fix(core): safely handle server platform destruction on aborted SSR requests https://github.com/angular/angular/pull/72139/files#top
Show all changes 8 commits https://github.com/angular/angular/pull/72139/files
7d40246 fix(core): safely handle platform destruction during bootstrap and pe… alan-agius4 Nov 20, 2026 https://github.com/angular/angular/pull/72139/commits/7d4024654d36dfe6295c0f6b51fca045cd9b1502
6d29cd8 fix(http): abort in-flight FetchBackend requests on injector destroy alan-agius4 Nov 20, 2026 https://github.com/angular/angular/pull/72139/commits/6d29cd8c8b2c81c27bc5c608fd0d09d20a421e30
7b9a037 fix(router): cancel active navigation transitions on router dispose alan-agius4 Nov 20, 2026 https://github.com/angular/angular/pull/72139/commits/7b9a0371d689f8ee597e1f8149231ae18e1b6c18
9caacfb fix(platform-server): guard renderInternal and platform teardown afte… alan-agius4 Nov 20, 2026 https://github.com/angular/angular/pull/72139/commits/9caacfb3b0c81d88f991b7223d8bbc2679a17993
070f37a fixup! fix(core): safely handle platform destruction during bootstrap… alan-agius4 Nov 20, 2026 https://github.com/angular/angular/pull/72139/commits/070f37a0ac95468a09778e986cd6ca93a5821634
653bddd fixup! fix(core): safely handle platform destruction during bootstrap… alan-agius4 Nov 20, 2026 https://github.com/angular/angular/pull/72139/commits/653bddd1035832313f01c5c9d6b534e0cb7303b7
38f26f4 fixup! fix(http): abort in-flight FetchBackend requests on injector d… alan-agius4 Nov 20, 2026 https://github.com/angular/angular/pull/72139/commits/38f26f4454e735fff519a1ddef87fcf90773bc85
3ad1a79 fixup! fix(platform-server): guard renderInternal and platform teardo… alan-agius4 Nov 20, 2026 https://github.com/angular/angular/pull/72139/commits/3ad1a798bd5b1299bc7f196802062c75b9ed08a4
Clear filters https://github.com/angular/angular/pull/72139/files
Please reload this pagehttps://github.com/angular/angular/pull/72139/files
Please reload this pagehttps://github.com/angular/angular/pull/72139/files
size.json https://github.com/angular/angular/pull/72139/files#diff-b60e85c9cf6fe8bfe339497ca72dfad1599e14483816ebf5d27fb65eb0f67b70
backend.ts https://github.com/angular/angular/pull/72139/files#diff-cd058c9423ebac5a7501f92a98199de87a2d58f0df08b8a2da3aa60d4eeb8858
fetch.ts https://github.com/angular/angular/pull/72139/files#diff-807923e5490f5a82b856306fbf45d50b27015fb54def49080f499279ec42131f
fetch_spec.ts https://github.com/angular/angular/pull/72139/files#diff-b960194ebbfd15d7c4600bec62d16fd94cd593f90ea6043b5645a8bf3810b452
application_init.ts https://github.com/angular/angular/pull/72139/files#diff-e1aa851410465e4c6db1fd74293919b5dfe950e863e8dae64c21020c97be78cd
create_application.ts https://github.com/angular/angular/pull/72139/files#diff-b0a0e4138c855ca8547cba5bcb7bb494a27e13e8314bff0d19c6ead3b219a8c9
error_handler.ts https://github.com/angular/angular/pull/72139/files#diff-45e2220b41b19552d1a44f6f6137c15fcf5df593ff19e0c9f23a34abf1b0b49f
pending_tasks.ts https://github.com/angular/angular/pull/72139/files#diff-eea6fa6f919bc626d51905b71e0ca8783d1dc627a36b7b0fd3058e3c3d52632b
bootstrap.ts https://github.com/angular/angular/pull/72139/files#diff-44d6259c7a4eebd00a85bec64ec41b0ee128f60060e20d5b2956ce2594dc5ab3
platform_ref.ts https://github.com/angular/angular/pull/72139/files#diff-ad1942f402f289762aa3cf34575c1897d4410ce9f9ae4a33680a197dc93e39da
bootstrap_spec.ts https://github.com/angular/angular/pull/72139/files#diff-a278c337cc132ab6dabc060051cf16464a4b79c3d44d30411109e6e5b5728462
pending_tasks_spec.ts https://github.com/angular/angular/pull/72139/files#diff-2c659940b1b837554de844cb988f34cd3ab8bef30fb000c7cf7a5c2a2bc63ddd
application_init_spec.ts https://github.com/angular/angular/pull/72139/files#diff-f3cc58ddd1ff9fbd2eb6554c40f7fc2892e09120a66493e8b93909a7c882c2d8
error_handler_spec.ts https://github.com/angular/angular/pull/72139/files#diff-99507f79078750a989dad8a70f19ebe4a0453a0f2639b804ce6598ca68338649
utils.ts https://github.com/angular/angular/pull/72139/files#diff-123357100da5c09eb9d4e1df15579e76dbb13ecf7abbb33b9e41ff28ff2daeaf
utils_spec.ts https://github.com/angular/angular/pull/72139/files#diff-5f9cc88646cbed60518e87c9446c2fce9e7f0bbc1e4d0119d381a09f4948cbb4
provide_router.ts https://github.com/angular/angular/pull/72139/files#diff-b60f579b6666c0ed6d78acd8ef5c55cfc7b599c9011d5a34fbb2d5dd291da819
router.ts https://github.com/angular/angular/pull/72139/files#diff-03cb1ea13f0b5890eb24ce6fef7a42eed85429da0a90cdb48ab06b58c30cb1c1
router_events.spec.ts https://github.com/angular/angular/pull/72139/files#diff-81410376d0cc28e51cabd3ab9bacbd5b19178b40c837b310bbb694127663d79c
integration/legacy-animations-async/size.jsonhttps://github.com/angular/angular/pull/72139/files#diff-b60e85c9cf6fe8bfe339497ca72dfad1599e14483816ebf5d27fb65eb0f67b70
View file https://github.com/angular/angular/blob/3ad1a798bd5b1299bc7f196802062c75b9ed08a4/integration/legacy-animations-async/size.json
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/72139/{{ revealButtonHref }}
https://github.com/angular/angular/pull/72139/files#diff-b60e85c9cf6fe8bfe339497ca72dfad1599e14483816ebf5d27fb65eb0f67b70
packages/common/http/src/backend.tshttps://github.com/angular/angular/pull/72139/files#diff-cd058c9423ebac5a7501f92a98199de87a2d58f0df08b8a2da3aa60d4eeb8858
View file https://github.com/angular/angular/blob/3ad1a798bd5b1299bc7f196802062c75b9ed08a4/packages/common/http/src/backend.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/72139/{{ revealButtonHref }}
https://github.com/angular/angular/pull/72139/files#diff-cd058c9423ebac5a7501f92a98199de87a2d58f0df08b8a2da3aa60d4eeb8858
https://github.com/angular/angular/pull/72139/files#diff-cd058c9423ebac5a7501f92a98199de87a2d58f0df08b8a2da3aa60d4eeb8858
https://github.com/angular/angular/pull/72139/files#diff-cd058c9423ebac5a7501f92a98199de87a2d58f0df08b8a2da3aa60d4eeb8858
https://github.com/angular/angular/pull/72139/files#diff-cd058c9423ebac5a7501f92a98199de87a2d58f0df08b8a2da3aa60d4eeb8858
https://github.com/angular/angular/pull/72139/files#diff-cd058c9423ebac5a7501f92a98199de87a2d58f0df08b8a2da3aa60d4eeb8858
https://github.com/angular/angular/pull/72139/files#diff-cd058c9423ebac5a7501f92a98199de87a2d58f0df08b8a2da3aa60d4eeb8858
packages/common/http/src/fetch.tshttps://github.com/angular/angular/pull/72139/files#diff-807923e5490f5a82b856306fbf45d50b27015fb54def49080f499279ec42131f
View file https://github.com/angular/angular/blob/3ad1a798bd5b1299bc7f196802062c75b9ed08a4/packages/common/http/src/fetch.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/72139/{{ revealButtonHref }}
https://github.com/angular/angular/pull/72139/files#diff-807923e5490f5a82b856306fbf45d50b27015fb54def49080f499279ec42131f
JeanMechehttps://github.com/JeanMeche
Nov 20, 2026https://github.com/angular/angular/pull/72139/files#r4643038155
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/angular/angular/pull/72139/files
alan-agius4https://github.com/alan-agius4
Nov 20, 2026https://github.com/angular/angular/pull/72139/files#r4643267874
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/angular/angular/pull/72139/files
JeanMechehttps://github.com/JeanMeche
Nov 20, 2026https://github.com/angular/angular/pull/72139/files#r4643294535
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/angular/angular/pull/72139/files
https://github.com/angular/angular/pull/72139/files#diff-807923e5490f5a82b856306fbf45d50b27015fb54def49080f499279ec42131f
https://github.com/angular/angular/pull/72139/files#diff-807923e5490f5a82b856306fbf45d50b27015fb54def49080f499279ec42131f
https://github.com/angular/angular/pull/72139/files#diff-807923e5490f5a82b856306fbf45d50b27015fb54def49080f499279ec42131f
https://github.com/angular/angular/pull/72139/files#diff-807923e5490f5a82b856306fbf45d50b27015fb54def49080f499279ec42131f
https://github.com/angular/angular/pull/72139/files#diff-807923e5490f5a82b856306fbf45d50b27015fb54def49080f499279ec42131f
https://github.com/angular/angular/pull/72139/files#diff-807923e5490f5a82b856306fbf45d50b27015fb54def49080f499279ec42131f
https://github.com/angular/angular/pull/72139/files#diff-807923e5490f5a82b856306fbf45d50b27015fb54def49080f499279ec42131f
https://github.com/angular/angular/pull/72139/files#diff-807923e5490f5a82b856306fbf45d50b27015fb54def49080f499279ec42131f
packages/common/http/test/fetch_spec.tshttps://github.com/angular/angular/pull/72139/files#diff-b960194ebbfd15d7c4600bec62d16fd94cd593f90ea6043b5645a8bf3810b452
View file https://github.com/angular/angular/blob/3ad1a798bd5b1299bc7f196802062c75b9ed08a4/packages/common/http/test/fetch_spec.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/72139/{{ revealButtonHref }}
https://github.com/angular/angular/pull/72139/files#diff-b960194ebbfd15d7c4600bec62d16fd94cd593f90ea6043b5645a8bf3810b452
https://github.com/angular/angular/pull/72139/files#diff-b960194ebbfd15d7c4600bec62d16fd94cd593f90ea6043b5645a8bf3810b452
https://github.com/angular/angular/pull/72139/files#diff-b960194ebbfd15d7c4600bec62d16fd94cd593f90ea6043b5645a8bf3810b452
https://github.com/angular/angular/pull/72139/files#diff-b960194ebbfd15d7c4600bec62d16fd94cd593f90ea6043b5645a8bf3810b452
https://github.com/angular/angular/pull/72139/files#diff-b960194ebbfd15d7c4600bec62d16fd94cd593f90ea6043b5645a8bf3810b452
Please reload this pagehttps://github.com/angular/angular/pull/72139/files
Please reload this pagehttps://github.com/angular/angular/pull/72139/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.