Skip to content

Angular SSR 17 in Firebase : listen EADDRINUSE: address already in use :::8080 #6651

@alexcibotari

Description

@alexcibotari

[REQUIRED] Environment info

firebase-tools: 13.0.2

Platform: Windows, Linux

[REQUIRED] Test case

I deploy a fully workable version from the emulator in Firebase Functions of the Angular SSR application.

[REQUIRED] Steps to reproduce

  • Enabled experiment webframeworks.
  • Create an application angular ssr from cli with standalone componenet
  • run it locally
  • deploy it in the firebase.
    During Local build I have next warning
▲ [WARNING] Module 'undici' used by 'node_modules/@firebase/auth/dist/node-esm/index.js' is not ESM
▲ [WARNING] Module '@grpc/grpc-js' used by 'node_modules/@firebase/firestore/dist/index.node.mjs' is not ESM
▲ [WARNING] Module '@grpc/proto-loader' used by 'node_modules/@firebase/firestore/dist/index.node.mjs' is not ESM
▲ [WARNING] Module 'undici' used by 'node_modules/@firebase/functions/dist/esm-node/index.node.esm.js' is not ESM
▲ [WARNING] Module 'undici' used by 'node_modules/@firebase/storage/dist/node-esm/index.node.esm.js' is not ESM
  CommonJS or AMD dependencies can cause optimization bailouts.
  For more information see: https://angular.io/guide/build#configuring-commonjs-dependencies

[REQUIRED] Expected behavior

Should work exactly as in the emulator.

[REQUIRED] Actual behavior

SSR Page returns: Service Unavailable

Logs

Default STARTUP TCP probe succeeded after 1 attempt for container "ssr-project-name-1" on port 8080.

Uncaught exception

Error: listen EADDRINUSE: address already in use :::8080
    at Server.setupListenHandle [as _listen2] (node:net:1872:16)
    at listenInCluster (node:net:1920:12)
    at Server.listen (node:net:2008:7)
    at te.listen (file:///workspace/dist/ssr-project-name/server/server.mjs:81:3210)

at $k (file:///workspace/dist/ssr-project-name/server/server.mjs:99:5579)
at file:///workspace/dist/ssr-project-name/server/server.mjs:99:5665
at ModuleJob.run (node:internal/modules/esm/module_job:217:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
 at async importModuleDynamicallyWrapper (node:internal/vm/module:431:15)

Error: Process exited with code 16
    at process.<anonymous> (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/invoker.js:92:22)
    at process.emit (node:events:514:28)
    at process.emit (node:domain:488:12)
    at process.exit (node:internal/process/per_thread:193:15)
    at sendCrashResponse (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/logger.js:44:9)
    at process.<anonymous> (/layers/google.nodejs.functions-framework/functions-framework/node_modules/@google-cloud/functions-framework/build/src/invoker.js:84:44)
    at process.emit (node:events:526:35)
    at process.emit (node:domain:488:12)
    at process._fatalException (node:internal/process/execution:159:25)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions