Skip to content

Enabling Server Routing and App Engine APIs (Developer Preview) in New Project Generation causing crash when enabling SSL #29163

@mjmustafaev

Description

@mjmustafaev

Command

serve, new

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

Command line history for the base project generation and error log in the terminal:

❯ ng new angular-ssr-ssl-api-project
✔ Which stylesheet format would you like to use? CSS [
https://developer.mozilla.org/docs/Web/CSS ]
✔ Do you want to enable Server-Side Rendering (SSR) and Static Site Generation
(SSG/Prerendering)? yes
✔ Would you like to use the Server Routing and App Engine APIs (Developer Preview)
for this server application? yes
CREATE angular-ssr-ssl-api-project/README.md (1486 bytes)
CREATE angular-ssr-ssl-api-project/.editorconfig (314 bytes)
CREATE angular-ssr-ssl-api-project/.gitignore (587 bytes)
CREATE angular-ssr-ssl-api-project/angular.json (2829 bytes)
CREATE angular-ssr-ssl-api-project/package.json (1326 bytes)
CREATE angular-ssr-ssl-api-project/tsconfig.json (915 bytes)
CREATE angular-ssr-ssl-api-project/tsconfig.app.json (489 bytes)
CREATE angular-ssr-ssl-api-project/tsconfig.spec.json (434 bytes)
CREATE angular-ssr-ssl-api-project/.vscode/extensions.json (130 bytes)
CREATE angular-ssr-ssl-api-project/.vscode/launch.json (470 bytes)
CREATE angular-ssr-ssl-api-project/.vscode/tasks.json (938 bytes)
CREATE angular-ssr-ssl-api-project/src/main.ts (250 bytes)
CREATE angular-ssr-ssl-api-project/src/index.html (309 bytes)
CREATE angular-ssr-ssl-api-project/src/styles.css (80 bytes)
CREATE angular-ssr-ssl-api-project/src/main.server.ts (264 bytes)
CREATE angular-ssr-ssl-api-project/src/server.ts (1608 bytes)
CREATE angular-ssr-ssl-api-project/src/app/app.component.css (0 bytes)
CREATE angular-ssr-ssl-api-project/src/app/app.component.html (19903 bytes)
CREATE angular-ssr-ssl-api-project/src/app/app.component.spec.ts (979 bytes)
CREATE angular-ssr-ssl-api-project/src/app/app.component.ts (303 bytes)
CREATE angular-ssr-ssl-api-project/src/app/app.config.ts (438 bytes)
CREATE angular-ssr-ssl-api-project/src/app/app.routes.ts (77 bytes)
CREATE angular-ssr-ssl-api-project/src/app/app.config.server.ts (505 bytes)
CREATE angular-ssr-ssl-api-project/src/app/app.routes.server.ts (166 bytes)
CREATE angular-ssr-ssl-api-project/public/favicon.ico (15086 bytes)
✔ Packages installed successfully.
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m
Successfully initialized git.
❯ cd angular-ssr-ssl-api-project
❯ ng serve --ssl=true

Would you like to share pseudonymous usage data about this project with the Angular
Team
at Google under Google's Privacy Policy at https://policies.google.com/privacy. For
more
details and how to change this setting, see https://angular.dev/cli/analytics.

no
Global setting: enabled
Local setting: disabled
Effective status: disabled
Browser bundles
Initial chunk files | Names | Raw size
polyfills.js | polyfills | 90.20 kB |
main.js | main | 18.33 kB |
styles.css | styles | 95 bytes |

                 | Initial total    | 108.62 kB

Server bundles
Initial chunk files | Names | Raw size
polyfills.server.mjs | polyfills.server | 572.91 kB |
main.server.mjs | main.server | 19.56 kB |
server.mjs | server | 1.86 kB |

Application bundle generation complete. [1.600 seconds]

Watch mode enabled. Watching for file changes...
NOTE: Raw file sizes do not reflect development server per-request transformations.
➜ Local: https://localhost:4200/
➜ press h + enter to show help
node:events:495
throw er; // Unhandled 'error' event
^

TypeError: Cannot read properties of undefined (reading 'readable')
at IncomingMessage.read (node:http_incoming:214:19)
at Readable.read (node:internal/streams/readable:539:12)
at resume
(node:internal/streams/readable:1040:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on IncomingMessage instance at:
at emitErrorNT (node:internal/streams/destroy:151:8)
at errorOrDestroy (node:internal/streams/destroy:214:7)
at Readable.read (node:internal/streams/readable:541:7)
at resume
(node:internal/streams/readable:1040:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Node.js v18.20.5
fatal error: all goroutines are asleep - deadlock!

goroutine 1 [chan receive]:
github.com/evanw/esbuild/internal/helpers.(*ThreadSafeWaitGroup).Wait(...)
github.com/evanw/esbuild/internal/helpers/waitgroup.go:36
main.runService.func2()
github.com/evanw/esbuild/cmd/esbuild/service.go:114 +0x88
main.runService(0x1)
github.com/evanw/esbuild/cmd/esbuild/service.go:160 +0x47c
main.main()
github.com/evanw/esbuild/cmd/esbuild/main.go:241 +0x898

goroutine 22 [chan receive]:
main.runService.func1()
github.com/evanw/esbuild/cmd/esbuild/service.go:98 +0x40
created by main.runService in goroutine 1
github.com/evanw/esbuild/cmd/esbuild/service.go:97 +0x19c

goroutine 23 [chan receive]:
main.(*serviceType).sendRequest(0x1400010e2a0, {0x102cb9e60, 0x14000d87e00})
github.com/evanw/esbuild/cmd/esbuild/service.go:192 +0x138
main.runService.func3()
github.com/evanw/esbuild/cmd/esbuild/service.go:125 +0x44
created by main.runService in goroutine 1
github.com/evanw/esbuild/cmd/esbuild/service.go:122 +0x2e4

Minimal Reproduction

terminal history print.pdf

You should create a new project with ng new and enable Server Routing and App Engine APIs (Developer Preview) during project generation. Once project generation is done, use the ng serve with SSL true (ng serve --ssl=true) and then try to open the application in the browser (https://localhost:4200/).

Exception or Error

node:events:495
      throw er; // Unhandled 'error' event
      ^

TypeError: Cannot read properties of undefined (reading 'readable')
    at IncomingMessage._read (node:_http_incoming:214:19)
    at Readable.read (node:internal/streams/readable:539:12)
    at resume_ (node:internal/streams/readable:1040:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on IncomingMessage instance at:
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at errorOrDestroy (node:internal/streams/destroy:214:7)
    at Readable.read (node:internal/streams/readable:541:7)
    at resume_ (node:internal/streams/readable:1040:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Node.js v18.20.5
fatal error: all goroutines are asleep - deadlock!
                                                                                   
goroutine 1 [chan receive]:
github.com/evanw/esbuild/internal/helpers.(*ThreadSafeWaitGroup).Wait(...)
	github.com/evanw/esbuild/internal/helpers/waitgroup.go:36
main.runService.func2()
	github.com/evanw/esbuild/cmd/esbuild/service.go:114 +0x88
main.runService(0x1)
	github.com/evanw/esbuild/cmd/esbuild/service.go:160 +0x47c
main.main()
	github.com/evanw/esbuild/cmd/esbuild/main.go:241 +0x898

Your Environment

Angular CLI: 19.0.5
Node: 18.20.5
Package Manager: npm 10.8.2
OS: darwin arm64

Angular: 19.0.4
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, platform-server
... router

Package                         Version
---------------------------------------------------------
@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/cli                    19.0.5
@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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions