Title: HttpClient request fails in development during SSR with SSL enabled · Issue #31710 · angular/angular-cli · GitHub
Open Graph Title: HttpClient request fails in development during SSR with SSL enabled · Issue #31710 · angular/angular-cli
X Title: HttpClient request fails in development during SSR with SSL enabled · Issue #31710 · angular/angular-cli
Description: Command serve 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 No response Description When using ng serve with SSR and an SSL certificate the HttpCl...
Open Graph Description: Command serve 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 No response Description When using ng serve wi...
X Description: Command serve 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 No response Description When using ng serve wi...
Opengraph URL: https://github.com/angular/angular-cli/issues/31710
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"HttpClient request fails in development during SSR with SSL enabled","articleBody":"### Command\n\nserve\n\n### Is this a regression?\n\n- [ ] Yes, this behavior used to work in the previous version\n\n### The previous version in which this bug was not present was\n\n_No response_\n\n### Description\n\nWhen using `ng serve` with SSR and an SSL certificate the HttpClient request fails during SSR\n\nGitHub repo: https://github.com/brandonroberts/angular-ssl-assets\n\n\n\n### Minimal Reproduction\n\n## Setup\n\n1. Install dependencies\n\n```sh\nnpm install\n```\n\n2. Run application\n\n```sh\nnpm start\n```\n\n3. Navigate to `https://localhost:4430` and notice the error in the command line console, and the flash of data on the page.\n\n\n## Workaround\n\nThe workaround is to run `NODE_TLS_REJECT_UNAUTHORIZED=0 ng serve` \n\n1. Run application\n\n```sh\nnpm run start:cert\n```\n\n2. Navigate to `https://localhost:4430` and notice the Node warning in the command line console, but no flash of data on the page.\n\n\n\n### Exception or Error\n\n```text\nERROR HttpErrorResponse {\n headers: _HttpHeaders {\n headers: Map(0) {},\n normalizedNames: Map(0) {},\n lazyInit: undefined,\n lazyUpdate: null\n },\n status: 0,\n statusText: 'Unknown Error',\n url: 'https://localhost:4430/assets/data.json',\n ok: false,\n type: undefined,\n redirected: undefined,\n name: 'HttpErrorResponse',\n message: 'Http failure response for https://localhost:4430/assets/data.json: 0 undefined',\n error: TypeError: fetch failed\n at node:internal/deps/undici/undici:13510:13\n at _ZoneDelegate.invoke (/Users/computer/projects/angular-ssl-assets/.angular/cache/20.3.9/angular-ssl-assets/vite/deps_ssr/zone__js_node.js:336:158)\n at ZoneImpl.run (/Users/computer/projects/angular-ssl-assets/.angular/cache/20.3.9/angular-ssl-assets/vite/deps_ssr/zone__js_node.js:105:35)\n at eval (/Users/computer/projects/angular-ssl-assets/.angular/cache/20.3.9/angular-ssl-assets/vite/deps_ssr/zone__js_node.js:1040:30)\n at _ZoneDelegate.invokeTask (/Users/computer/projects/angular-ssl-assets/.angular/cache/20.3.9/angular-ssl-assets/vite/deps_ssr/zone__js_node.js:362:171)\n at ZoneImpl.runTask (/Users/computer/projects/angular-ssl-assets/.angular/cache/20.3.9/angular-ssl-assets/vite/deps_ssr/zone__js_node.js:143:37)\n at drainMicroTaskQueue (/Users/computer/projects/angular-ssl-assets/.angular/cache/20.3.9/angular-ssl-assets/vite/deps_ssr/zone__js_node.js:522:23)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {\n [cause]: Error: unable to verify the first certificate\n at TLSSocket.onConnectSecure (node:_tls_wrap:1679:34)\n at _ZoneDelegate.invokeTask (/Users/computer/projects/angular-ssl-assets/.angular/cache/20.3.9/angular-ssl-assets/vite/deps_ssr/zone__js_node.js:362:171)\n at ZoneImpl.runTask (/Users/computer/projects/angular-ssl-assets/.angular/cache/20.3.9/angular-ssl-assets/vite/deps_ssr/zone__js_node.js:143:37)\n at invokeTask (/Users/computer/projects/angular-ssl-assets/.angular/cache/20.3.9/angular-ssl-assets/vite/deps_ssr/zone__js_node.js:439:26)\n at TLSSocket.ZoneTask.invoke (/Users/computer/projects/angular-ssl-assets/.angular/cache/20.3.9/angular-ssl-assets/vite/deps_ssr/zone__js_node.js:428:38)\n at TLSSocket.emit (node:events:518:28)\n at TLSSocket._finishInit (node:_tls_wrap:1078:8)\n at ssl.onhandshakedone (node:_tls_wrap:864:12) {\n code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'\n }\n }\n}\n```\n\n### Your Environment\n\n```text\nAngular: 20.3.9\n... build, cli, common, compiler, compiler-cli, core, forms\n... platform-browser, platform-server, router, ssr\n\nPackage Version\n------------------------------------\n@angular-devkit/architect 0.2003.9\n@angular-devkit/core 20.3.9\n@angular-devkit/schematics 20.3.9\n@schematics/angular 20.3.9\nrxjs 7.8.2\ntypescript 5.9.3\nzone.js 0.15.1\n```\n\n### Anything else relevant?\n\nIts a self-signed certificate for local development using `mkcert localhost`.","author":{"url":"https://github.com/brandonroberts","@type":"Person","name":"brandonroberts"},"datePublished":"2025-11-05T17:54:50.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/31710/angular-cli/issues/31710"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:71e247a1-8a0e-c4b3-a75a-0afe706aa31d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C34C:3C7D7F:2131E7C:2D300A7:696ACE5D |
| html-safe-nonce | 4506a1b432be0089ec396eed1c81af8e979f60aef47e0285a79b2147367bf8d2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzRDOjNDN0Q3RjoyMTMxRTdDOjJEMzAwQTc6Njk2QUNFNUQiLCJ2aXNpdG9yX2lkIjoiMzYwNDI1NDExMDM3OTU5MzMwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2fc2e635b80e364da89c240713a29d9ab1967ddb494205d39aff090028333c46 |
| hovercard-subject-tag | issue:3592195191 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/31710/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4ebf48404a4f1d8ea78e2e82f5a510d3287b89357d81bc48f227e71d069175b0/angular/angular-cli/issues/31710 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4ebf48404a4f1d8ea78e2e82f5a510d3287b89357d81bc48f227e71d069175b0/angular/angular-cli/issues/31710 |
| og:image:alt | Command serve 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 No response Description When using ng serve wi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | brandonroberts |
| hostname | github.com |
| expected-hostname | github.com |
| None | c785f4ce187e9e7331257791b36ddee01625bb8e292a9b4fe2c16d4c006abf5d |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c718a376fcf780eb22089171adb84a543f660bf7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width