adminjs
adminjs copied to clipboard
Error [ERR_HTTP_HEADERS_SENT]: Cannot remove headers after they are sent to the client
Describe the bug App crashed giving the following error:
Error [ERR_HTTP_HEADERS_SENT]: Cannot remove headers after they are sent to the client
at new NodeError (node:internal/errors:372:5)
at ServerResponse.removeHeader (node:_http_outgoing:654:11)
at write (/home/ubuntu/Desktop/AdminDashboard/node_modules/finalhandler/index.js:282:9)
at AsyncResource.runInAsyncScope (node:async_hooks:202:9)
at listener (/home/ubuntu/Desktop/AdminDashboard/node_modules/on-finished/index.js:170:15)
at onFinish (/home/ubuntu/Desktop/AdminDashboard/node_modules/on-finished/index.js:101:5)
at callback (/home/ubuntu/Desktop/AdminDashboard/node_modules/ee-first/index.js:55:10)
at Socket.onevent (/home/ubuntu/Desktop/AdminDashboard/node_modules/ee-first/index.js:93:5)
at Socket.emit (node:events:539:35)
at emitErrorNT (node:internal/streams/destroy:157:8) {
code: 'ERR_HTTP_HEADERS_SENT'
Installed libraries and their versions
- [email protected]
- @adminjs/[email protected]
- @adminjs/[email protected]
Expected behavior Not to happen
Additional context The crash happened when the app was idle and no one was connected.
Are you sure it comes from AdminJS code? It's the first time I'm seeing this error. I would suggest updating the libraries though, we're already on v6.
Thanks for answering @dziraf ! I will try updating the version.