Closed akauppi closed 3 years ago
Until this gets resolved, just serving functions as well...
Happens also with --only hosting,functions
if one logs out, back in:
Error [ERR_HTTP_HEADERS_SENT]: Cannot remove headers after they are sent to the client
at ServerResponse.removeHeader (_http_outgoing.js:603:11)
at Responder.handleNotModified (/usr/local/lib/node_modules/firebase-tools/node_modules/superstatic/lib/responder.js:138:12)
at /usr/local/lib/node_modules/firebase-tools/node_modules/superstatic/lib/responder.js:100:19
at tryCatch (/usr/local/lib/node_modules/firebase-tools/node_modules/rsvp/dist/rsvp.js:525:12)
at invokeCallback (/usr/local/lib/node_modules/firebase-tools/node_modules/rsvp/dist/rsvp.js:538:13)
at publish (/usr/local/lib/node_modules/firebase-tools/node_modules/rsvp/dist/rsvp.js:508:7)
at flush (/usr/local/lib/node_modules/firebase-tools/node_modules/rsvp/dist/rsvp.js:2415:5)
at processTicksAndRejections (internal/process/task_queues.js:75:11)
Error: An unexpected error has occurred.
Reproducible with commit d5debe9114a01057d6af7d3333d5353b7309501c
This only happens with Rollup build, but that may be because Vite serves itself.
Should study whether it's Rollup, or Firebase that is the culprit. Also, check if this happens in production, or only with npm run prod:serve
.
The renaming of public/404.html
mentioned here helped.
It's just a work-around so let's keep tracking that error, and rename back once there's a solution.
Firebase had it fixed. 🥇
When running
firebase serve --only functions,hosting
, things work.When only hosting is served, the execution crashes on first refresh / load of the UI.
The same in text:
It looks like an internal
firebase-tools
bug to me. Is it, really?firebase-tools
8.9.2 on node 14.8.0, macOS