René's URL Explorer Experiment


Title: Angular SSR can crash `AngularAppEngine` servers with a single aborted request (22.2.6 regression) · Issue #34754 · angular/angular-cli · GitHub

Open Graph Title: Angular SSR can crash `AngularAppEngine` servers with a single aborted request (22.2.6 regression) · Issue #34754 · angular/angular-cli

X Title: Angular SSR can crash `AngularAppEngine` servers with a single aborted request (22.2.6 regression) · Issue #34754 · angular/angular-cli

Description: Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was 22.2.5 Description Since @angular/ssr 22.2.6, a client that disconnects while a page is still render...

Open Graph Description: Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was 22.2.5 Description Since @angular/ssr 22.2.6, a client that ...

X Description: Is this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was 22.2.5 Description Since @angular/ssr 22.2.6, a client that ...

Opengraph URL: https://github.com/angular/angular-cli/issues/34754

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Angular SSR can crash `AngularAppEngine` servers with a single aborted request (22.2.6 regression)","articleBody":" \n\n### Is this a regression?\n\n- [x] Yes, this behavior used to work in the previous version\n\n### The previous version in which this bug was not present was\n\n22.2.5\n\n### Description\n\n\nSince `@angular/ssr` 22.2.6, a client that disconnects while a page is still rendering can kill the server process when it runs on `AngularAppEngine`: plain `node:http`, Hono, H3, srvx, Deno or Bun. The Express server from `ng new --ssr` is fine, because `AngularNodeAppEngine` installs process-wide error handlers.\n\n#34568 made `renderAngular()` destroy the platform when `request.signal` aborts:\n\nhttps://github.com/angular/angular-cli/blob/72f44d79cb577821bbfa849f5bb3b41eee87c2ab/packages/angular/ssr/src/utils/ng.ts#L126-L129\n\nThe host still gets the usual `AbortError` and handles it. What kills the process is the work that was still running. The clearest case is an app initializer: once it settles, [`bootstrap()` reads the destroyed injector](https://github.com/angular/angular/blob/v22.2.6/packages/core/src/platform/bootstrap.ts#L143-L146), and the internal error handler [rethrows the `NG0205` from a `setTimeout`](https://github.com/angular/angular/blob/v22.2.6/packages/core/src/error_handler.ts#L155-L160) because the injector is destroyed. Neither the app nor the host's `try/catch` can catch that, so it doesn't matter how the initializer is written:\n\n| Pending when the client disconnects, on `AngularAppEngine` | Process |\n| --- | --- |\n| `provideAppInitializer` from its [usage notes](https://angular.dev/api/core/provideAppInitializer#usage-notes) | exit 1 |\n| the same wrapped in `try/catch` | exit 1 |\n| an initializer that only waits on a 100 ms timer | exit 1 |\n| `PendingTasks.run()` as the [zoneless guide](https://angular.dev/guide/zoneless#pendingtasks-for-server-side-rendering-ssr) shows it, awaiting an `HttpClient` call | exit 1 |\n| `firstValueFrom(http.get(...))` in `async ngOnInit()` (zoneless) | exit 1 |\n| `subscribe()`, resolvers, guards, `httpResource`, `resource()` | alive |\n| the `try/catch` initializer on 22.2.5, or on `AngularNodeAppEngine` | alive |\n\nThe `ngOnInit` row is the other path: `FetchBackend` [completes without a value](https://github.com/angular/angular/blob/v22.2.6/packages/common/http/src/fetch.ts#L267-L270) once the app is destroyed, so `firstValueFrom()` rejects with `EmptyError` and nobody holds that promise. `PendingTasks.run()` passes that error to the same internal error handler, so it's rethrown from a `setTimeout` too.\n\nIt doesn't take precise timing. Every abort that arrived while the server was waiting on its backend killed it, 310 out of 310 with backends from 1 ms to 1 s, and nginx with its default config passes the abort on. The other pages that were rendering go down too. With Docker's `restart: always`, one aborted request every two seconds left the site serving 312 pages a minute instead of 5,584.\n\n#34568 is right to stop the render, but the platform shouldn't be destroyed while that work is still pending, so the abort stays inside the promise `handle()` returns, the way it did on 22.2.5. `AngularAppEngine` is meant for platforms other than Node.js, so it can't count on `process.on()` handlers like `AngularNodeAppEngine` does.\n\n### Minimal Reproduction\n\n\nhttps://github.com/SkyZeroZx/angular-ssr-abort-crash-lab\n\n`ng new --ssr` with `provideHttpClient()`, `RenderMode.Server` on `**`, the SSR guide's non-Node entry on `node:http`, and a component that waits for its data during the render (`api.mjs` answers in 100 ms):\n\n```ts\nasync ngOnInit() {\n  const { name } = await firstValueFrom(\n    this.http.get\u003c{ name: string }>('http://127.0.0.1:4400/profile'),\n  );\n  this.profile.set(name);\n}\n```\n\n```sh\nnpm ci && npx ng build\nnode api.mjs &\nnode dist/aborted-render-process/server/server.mjs &\nsleep 2\ncurl -sS -o /dev/null -w \"%{http_code}\\n\" http://localhost:4000/\ncurl -sS -m 0.05 http://localhost:4000/\nsleep 1\ncurl -sS http://localhost:4000/\n```\n\n```text\n200\ncurl: (28) Operation timed out after 55 milliseconds with 0 bytes received\ncurl: (7) Failed to connect to localhost:4000 after 0 ms: Could not connect to server\n```\n\nThe initializer version is in `variants/initializer-trycatch`, and `cd docker && sh variants.sh initializer-trycatch` builds and runs it. The README has the rest.\n\n### Exception or Error\n\n```text\nThe try/catch initializer, development build:\n\ndist/aborted-render-process/server/main.server.mjs:4818\n            throw e;\n            ^\n\nRuntimeError: NG0205: Injector has already been destroyed. Find more at https://v22.angular.dev/errors/NG0205\n    at assertNotDestroyed (dist/aborted-render-process/server/main.server.mjs:3546:11)\n    at R3Injector.get (dist/aborted-render-process/server/main.server.mjs:3303:5)\n    at dist/aborted-render-process/server/main.server.mjs:26095:38\n    at async renderAngular (dist/aborted-render-process/server/main.server.mjs:43273:24)\n\n\nThe ngOnInit repro, development build:\n\nnode:internal/process/promises:394\n    triggerUncaughtException(err, true /* fromPromise */);\n    ^\nError\n    at new EmptyErrorImpl (dist/aborted-render-process/server/main.server.mjs:1783:3)\n    at Object.complete (dist/aborted-render-process/server/main.server.mjs:1802:18) {\n  message: 'no elements in sequence'\n}\n```\n\n### Your Environment\n\n```text\n@angular/ssr      22.2.7\n@angular/core     22.2.6, also 22.3.0\nNode.js           24.16.0 on Windows 11, 24.22.3 in Docker\nAlso tried        Hono 4.13, H3 2.0, srvx 1.0, Deno 2.9.8, Bun 1.4.4, nginx 1.30\n```\n\n### Anything else relevant?\n\n\nI think this is a vulnerability according to the [SECURITY.md](https://github.com/angular/angular-cli/blob/main/SECURITY.md), which says:\n\n> DoS attacks which waste server resources significantly beyond the cost of the attacker's request may be security issues.\n\nHere a single request crashes the server.\n \n","author":{"url":"https://github.com/SkyZeroZx","@type":"Person","name":"SkyZeroZx"},"datePublished":"2026-11-19T05:23:50Z","url":"https://github.com/angular/angular-cli/issues/34754"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:57075535-e2d4-7faa-f72d-1f0e8f38841b
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8358:269AD9:2DB4184:3D0C887:6B01D5F3
html-safe-nonce8a167c717fbb1d335157eecbd3b8f0499a336f53a09fbc8e9883f6747471db09
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzU4OjI2OUFEOToyREI0MTg0OjNEMEM4ODc6NkIwMUQ1RjMiLCJ2aXNpdG9yX2lkIjoiNzgwMDEwMjMyMTkyNTU0NDgzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac7205e2d1752b42787412d4c684a95c2e86d93984f1160ae3bc83762d11bca00c
hovercard-subject-tagissue:6483021970
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/34754/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f75696c6b25d68c2c0e43217356be20ab76af35289201402c1da7576933aa3eb/angular/angular-cli/issues/34754
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f75696c6b25d68c2c0e43217356be20ab76af35289201402c1da7576933aa3eb/angular/angular-cli/issues/34754
og:image:altIs this a regression? Yes, this behavior used to work in the previous version The previous version in which this bug was not present was 22.2.5 Description Since @angular/ssr 22.2.6, a client that ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameSkyZeroZx
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/angular/angular-cli git https://github.com/angular/angular-cli.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id36891867
octolytics-dimension-repository_nwoangular/angular-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id36891867
octolytics-dimension-repository_network_root_nwoangular/angular-cli
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular-cli/issues/34754#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fissues%2F34754
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-cli%2Fissues%2F34754
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular-cli
Reloadhttps://github.com/angular/angular-cli/issues/34754
Reloadhttps://github.com/angular/angular-cli/issues/34754
Reloadhttps://github.com/angular/angular-cli/issues/34754
angularhttps://github.com/angular
angular-clihttps://github.com/angular/angular-cli
Codehttps://github.com/angular/angular-cli
Issues198 (198)https://github.com/angular/angular-cli/issues
Pull requests23 (23)https://github.com/angular/angular-cli/pulls
Actionshttps://github.com/angular/angular-cli/actions
Security and quality8 (8)https://github.com/angular/angular-cli/security
Insightshttps://github.com/angular/angular-cli/insights
https://github.com/angular/angular-cli
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/34754
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/34754
Angular SSR can crash AngularAppEngine servers with a single aborted request (22.2.6 regression)https://github.com/angular/angular-cli/issues/34754#top
area: @angular/ssrhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22area%3A%20%40angular%2Fssr%22
needsTriagehttps://github.com/angular/angular-cli/milestone/11
https://github.com/SkyZeroZx
SkyZeroZxhttps://github.com/SkyZeroZx
on Nov 19, 2026https://github.com/angular/angular-cli/issues/34754#issue-6483021970
#34568https://github.com/angular/angular-cli/pull/34568
angular-cli/packages/angular/ssr/src/utils/ng.tshttps://github.com/angular/angular-cli/blob/72f44d79cb577821bbfa849f5bb3b41eee87c2ab/packages/angular/ssr/src/utils/ng.ts#L126-L129
72f44d7https://github.com/angular/angular-cli/commit/72f44d79cb577821bbfa849f5bb3b41eee87c2ab
bootstrap() reads the destroyed injectorhttps://github.com/angular/angular/blob/v22.2.6/packages/core/src/platform/bootstrap.ts#L143-L146
rethrows the NG0205 from a setTimeouthttps://github.com/angular/angular/blob/v22.2.6/packages/core/src/error_handler.ts#L155-L160
usage noteshttps://angular.dev/api/core/provideAppInitializer#usage-notes
zoneless guidehttps://angular.dev/guide/zoneless#pendingtasks-for-server-side-rendering-ssr
completes without a valuehttps://github.com/angular/angular/blob/v22.2.6/packages/common/http/src/fetch.ts#L267-L270
#34568https://github.com/angular/angular-cli/pull/34568
https://github.com/SkyZeroZx/angular-ssr-abort-crash-labhttps://github.com/SkyZeroZx/angular-ssr-abort-crash-lab
SECURITY.mdhttps://github.com/angular/angular-cli/blob/main/SECURITY.md
angular-robothttps://github.com/apps/angular-robot
area: @angular/ssrhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22area%3A%20%40angular%2Fssr%22
on Nov 19, 2026https://github.com/angular/angular-cli/issues/34754#event-36613236378
angular-robothttps://github.com/apps/angular-robot
needsTriagehttps://github.com/angular/angular-cli/milestone/11
on Nov 19, 2026https://github.com/angular/angular-cli/issues/34754#event-36613237981
SkyZeroZxhttps://github.com/SkyZeroZx
on Nov 19, 2026https://github.com/angular/angular-cli/issues/34754#event-36613348315
fix(@angular/ssr): destroy the platform of an aborted request once it…https://github.com/SkyZeroZx/angular-cli/commit/106adcc217ddab1fba15be5eaf0e9f4a575d09ae
https://docs.github.com/articles/closing-issues-via-commit-messages
106adcchttps://github.com/SkyZeroZx/angular-cli/commit/106adcc217ddab1fba15be5eaf0e9f4a575d09ae
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular-cli/issues/34754
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/34754
area: @angular/ssrhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22area%3A%20%40angular%2Fssr%22
needsTriageNo due datehttps://github.com/angular/angular-cli/milestone/11
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.