[BUG] cannot write response headers after response is sent
nabheet opened this issue ยท 6 comments
Describe the bug
The following error is repeatedly logged:
23-10-30 03:45:31 error: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at new NodeError (node:internal/errors:387:5)
at ServerResponse.setHeader (node:_http_outgoing:644:11)
at ServerResponse.header (/double-take/api/node_modules/express/lib/response.js:794:10)
at ServerResponse.send (/double-take/api/node_modules/express/lib/response.js:174:12)
at ServerResponse.res.send (/double-take/api/src/middlewares/respond.js:41:18)
at ServerResponse.json (/double-take/api/node_modules/express/lib/response.js:278:15)
at ServerResponse.send (/double-take/api/node_modules/express/lib/response.js:162:21)
at ServerResponse.res.send (/double-take/api/src/middlewares/respond.js:41:18)
at /double-take/api/src/app.js:46:38
at newFn (/double-take/api/node_modules/express-async-errors/index.js:16:20)
Version of Double Take
latest
(I think this error does not happen in docker tag 1.13..11.4
or 1.13
)
Expected behavior
I am thinking this might be causing some unknown issues and that it should not happen.
Can confirm I also experienced this (was troubleshooting it yesterday)
The immediate effect I saw was that updating Frigate labels stopped working.
Can help with any troubleshooting as needed.
Same, switched back to previous build
Oh I see it now. Looks like this problem is only in the docker container with latest
tag. The one with 1.13.11.4
version tag or 1.13
works just fine. So I don't mind closing this as documented if latest
is supposed to be the latest dev version.
1.13.11.4
Umm, so I switched to 1.13.11.4 tag, not just doing latest. And I got the same error
23-11-02 01:40:02 error: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at new NodeError (node:internal/errors:387:5)
at ServerResponse.setHeader (node:_http_outgoing:644:11)
at ServerResponse.header (/double-take/api/node_modules/express/lib/response.js:794:10)
at ServerResponse.send (/double-take/api/node_modules/express/lib/response.js:174:12)
at ServerResponse.res.send (/double-take/api/src/middlewares/respond.js:41:18)
at ServerResponse.json (/double-take/api/node_modules/express/lib/response.js:278:15)
at ServerResponse.send (/double-take/api/node_modules/express/lib/response.js:162:21)
at ServerResponse.res.send (/double-take/api/src/middlewares/respond.js:41:18)
at /double-take/api/src/app.js:46:38
at newFn (/double-take/api/node_modules/express-async-errors/index.js:16:20)
23-11-02 01:51:00 info: purged 7 file(s)
23-11-02 02:03:51 info: Double Take v1.13.11.4
probably fixed on v1.13.11.5