firebase / firebase-tools

The Firebase Command Line Tools
MIT License
4.01k stars 930 forks source link

Apparent issue with node 20 and firebase-tools hosting deploy #7204

Closed stuartpaulin closed 4 months ago

stuartpaulin commented 4 months ago

[REQUIRED] Environment info

Firebase tools 13.9.0 and earlier

Windows 11, Node v20.11.1, Intel i5-8350U cpu

[REQUIRED] Test case

Sorry, I don't know how to do this. Hoping that by having a record of the error I'm facing that someone else will at least know there might be an issue with Node 20.

[REQUIRED] Steps to reproduce

I have copied a 'compiled?' version of my ionic / angular 17 project that is the minified www folder into my hosting test folder and then run the command : firebase deploy --only hosting:test --debug

[REQUIRED] Expected behavior

Project would upload to firebase hosting as per normal, still works fine on older windows 10 machine with earlier node. I note that the functions updated fine with node 20, just not the hosting.

[REQUIRED] Actual behavior

I get this repeated many times to the screen before it gives up. I note that the 1429 files are mainly tiny svg files. The size of the entire upload is only 3.5MB:

8f6e4fe8a8a42f0fc [stream] i hosting: adding files to version [1000/1429] (69%) i hosting: adding files to version [1000/1429] (69%) [2024-05-18T09:38:16.338Z] Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals. Please open an issue with this stack trace at https://github.com/nodejs/node/issues

at assert (node:internal/assert:14:11)
at internalConnectMultiple (node:net:1118:3)
at Timeout.internalConnectMultipleTimeout (node:net:1687:3)
at listOnTimeout (node:internal/timers:575:11)
at process.processTimers (node:internal/timers:514:7)

Error: An unexpected error has occurred. [2024-05-18T09:38:16.338Z] Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals. Please open an issue with this stack trace at https://github.com/nodejs/node/issues

at assert (node:internal/assert:14:11)
at internalConnectMultiple (node:net:1118:3)
at Timeout.internalConnectMultipleTimeout (node:net:1687:3)
at listOnTimeout (node:internal/timers:575:11)
at process.processTimers (node:internal/timers:514:7)
aalej commented 4 months ago

Hey @stuartpaulin, thanks for reaching out. I’m currently trying to reproduce this issue and I’m guessing the steps you took were:

  1. Run ionic start web-app blank --type angular
    • Select NgModules
  2. Run cd web-app
  3. Run firebase init hosting --project PROJECT_ID
    • What do you want to use as your public directory? www
    • Configure as a single-page app (rewrite all urls to /index.html)? No
    • Set up automatic builds and deploys with GitHub? No
  4. Run npm run build
  5. Run firebase deploy --only hosting
    • Deploys without any errors

I’m not sure if these are the exact steps you took. In case I’m missing anything or made a mistake, please let me know. By any chance, would you be able to share a minimal reproducible example, or detailed steps on how you set up your project? This will help us to accurately replicate the issue, and verify if this is a bug within firebase-tools.

Also, since I can’t reproduce the issue on a macOS machine using the steps above, it’s possible that the issue could be specific to Windows.

google-oss-bot commented 4 months ago

Hey @stuartpaulin. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot commented 4 months ago

Since there haven't been any recent updates here, I am going to close this issue.

@stuartpaulin if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.