Skip to content

When starting serve with SSR and SSL process crashes #29142

Closed

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

Activity

  1. alan-agius4 commented on Dec 16, 2024

    @alan-agius4
    Collaborator

    I suspect this issue might is caused from Express not supporting HTTP/2, which Vite relies on when SSL is enabled.

  2. added
    freq1: low
    on Dec 16, 2024
  3. self-assigned this
    on Dec 16, 2024
  4. added 2 commits that reference this issue on Dec 16, 2024
    fcae47e
    4b91f8d
  5. added a commit that references this issue on Dec 17, 2024
    5fbc105
  6. added a commit that references this issue on Dec 17, 2024
    19bb2d4
  7. mjmustafaev commented on Dec 17, 2024

    @mjmustafaev

    Thank you very much, @alan-agius4. Truly appreciated!!

  8. angular-automatic-lock-bot commented on Jan 17, 2025

    @angular-automatic-lock-bot

    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.

  9. locked and limited conversation to collaborators on Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

angular/build:dev-serverarea: @angular/buildfreq1: lowseverity3: brokentype: bug/fix

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions