Skip to content

When starting serve with SSR and SSL process crashes #29142

Closed
@rsmogura

Description

@rsmogura

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 SSR server (ng serve) with SSL enabled in configuration, first render process crashes with JS error.

(Configuration and error details in other places).

Minimal Reproduction

Run ng serve with configuration SSR enabled and SSL configuration:

        "serve": {
          "builder": "@angular-devkit/build-angular:dev-server",
          "configurations": {
            "production": {
              "buildTarget": "portal:build:production"
            },
            "development": {
              "buildTarget": "portal:build:development",
              "port": 4203,
              "ssl": true
            }
          },
          "defaultConfiguration": "development"
        },

Exception or Error

Watch mode enabled. Watching for file changes...
NOTE: Raw file sizes do not reflect development server per-request transformations.
  ➜  Local:   https://localhost:4203/
  ➜  press h + enter to show help
Re-optimizing dependencies because lockfile has changed
node:events:491
      throw er; // Unhandled 'error' event
      ^

TypeError: Cannot read properties of undefined (reading 'readable')
    at IncomingMessage._read (node:_http_incoming:211:19)
    at Readable.read (node:internal/streams/readable:737:12)
    at resume_ (node:internal/streams/readable:1255:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
Emitted 'error' event on IncomingMessage instance at:
    at emitErrorNT (node:internal/streams/destroy:170:8)
    at errorOrDestroy (node:internal/streams/destroy:239:7)
    at Readable.read (node:internal/streams/readable:739:7)
    at resume_ (node:internal/streams/readable:1255:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)

Node.js v23.3.0

Your Environment

@angular-devkit/architect       0.1900.5
@angular-devkit/build-angular   19.0.5
@angular-devkit/core            19.0.5
@angular-devkit/schematics      19.0.5
@angular/cdk                    19.0.3
@angular/cli                    19.0.5
@angular/material               19.0.3
@angular/ssr                    19.0.5
@schematics/angular             19.0.5
rxjs                            7.8.1
typescript                      5.6.3
zone.js                         0.15.0

Anything else relevant?

No response

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions