adminjs icon indicating copy to clipboard operation
adminjs copied to clipboard

Error [ERR_HTTP_HEADERS_SENT]: Cannot remove headers after they are sent to the client

Open sc4la opened this issue 1 year ago • 1 comments

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

Expected behavior Not to happen

Additional context The crash happened when the app was idle and no one was connected.

sc4la avatar Aug 08 '22 20:08 sc4la

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.

dziraf avatar Aug 09 '22 06:08 dziraf

Thanks for answering @dziraf ! I will try updating the version.

sc4la avatar Aug 10 '22 19:08 sc4la