Closed dsm1212 closed 9 months ago
I have the same issue v1.91.0, using traefik as a proxy to immich-server.
immich-immich-server-1 | [Nest] 7 - 12/16/2023, 7:16:13 AM LOG [CommunicationRepository] Websocket Connect: xxxxxxxxxxxxxxxxxxx
immich-immich-server-1 | [Nest] 7 - 12/16/2023, 7:16:13 AM ERROR [ExceptionsHandler] Cannot remove headers after they are sent to the client
immich-immich-server-1 | Error [ERR_HTTP_HEADERS_SENT]: Cannot remove headers after they are sent to the client
immich-immich-server-1 | at ServerResponse.removeHeader (node:_http_outgoing:782:11)
immich-immich-server-1 | at ServerResponse.send (/usr/src/app/node_modules/express/lib/response.js:214:10)
immich-immich-server-1 | at ExpressAdapter.reply (/usr/src/app/node_modules/@nestjs/platform-express/adapters/express-adapter.js:31:29)
immich-immich-server-1 | at RouterResponseController.apply (/usr/src/app/node_modules/@nestjs/core/router/router-response-controller.js:15:36)
immich-immich-server-1 | at /usr/src/app/node_modules/@nestjs/core/router/router-execution-context.js:175:48
immich-immich-server-1 | at async /usr/src/app/node_modules/@nestjs/core/router/router-execution-context.js:47:13
immich-immich-server-1 | at async /usr/src/app/node_modules/@nestjs/core/router/router-proxy.js:9:17
same +1 app auto backup also failed
+1 here. Same error.
Same here, it happens on page refresh and just shows a blank page.
Same here. Refresh - blank page since 1.91.0.
[Nest] 653 - 12/16/2023, 3:22:03 PM WARN [ExpressAdapter] Content-Type doesn't match Reply body, you might need a custom ExceptionFilter for non-JSON responses
[Nest] 653 - 12/16/2023, 3:22:30 PM ERROR [ExceptionsHandler] Cannot remove headers after they are sent to the client
Error [ERR_HTTP_HEADERS_SENT]: Cannot remove headers after they are sent to the client
at ServerResponse.removeHeader (node:_http_outgoing:782:11)
at ServerResponse.send (/app/immich/server/node_modules/express/lib/response.js:214:10)
at ExpressAdapter.reply (/app/immich/server/node_modules/@nestjs/platform-express/adapters/express-adapter.js:31:29)
at RouterResponseController.apply (/app/immich/server/node_modules/@nestjs/core/router/router-response-controller.js:15:36)
at /app/immich/server/node_modules/@nestjs/core/router/router-execution-context.js:175:48
at async /app/immich/server/node_modules/@nestjs/core/router/router-execution-context.js:47:13
at async /app/immich/server/node_modules/@nestjs/core/router/router-proxy.js:9:17
@jrasm91 Any thoughts on this error Jason? I can't reproduce the blank page issue
Who is not using Docker? I don't. Maybe it's related.
@traktuner @TomasValenta Are you guys using docker/docker-compose to deploy Immich?
Hi. I'm also having this issue, and am using https://github.com/imagegenius/docker-immich to deploy, along with the tensorchord/pgvecto-rs:pg15-v0.1.11
psql image.
Same here. But no blank page, frontend seems to work correctly. Docker containers via Traefik.
@traktuner @TomasValenta Are you guys using docker/docker-compose to deploy Immich?
Yes, docker-compose image @martabal AIO image
The blank page issue should been have solved with #5753.
Will be fixed for the AIO when https://github.com/imagegenius/docker-immich/pull/255 is merged
I just took an immich update and this message is now gone. I can't get it to reappear. Normally I would resolve since I submitted it, but since there are so many others here I'll leave to whomever fixed it to resolve.
That error message "Cannot remove headers after they are sent to the client" persists in 1.91.2. Blank page was fixed by https://github.com/immich-app/immich/pull/5753.
Additionally seeing a lot of...
[ExpressAdapter] Content-Type doesn't match Reply body, you might need a custom ExceptionFilter for non-JSON responses
I have this error too in 1.91.2
Logs:
immich_server | Error [ERR_HTTP_HEADERS_SENT]: Cannot remove headers after they are sent to the client
immich_server | at ServerResponse.removeHeader (node:_http_outgoing:782:11)
immich_server | at ServerResponse.send (/usr/src/app/node_modules/express/lib/response.js:214:10)
immich_server | at ExpressAdapter.reply (/usr/src/app/node_modules/@nestjs/platform-express/adapters/express-adapter.js:31:29)
immich_server | at RouterResponseController.apply (/usr/src/app/node_modules/@nestjs/core/router/router-response-controller.js:15:36)
immich_server | at /usr/src/app/node_modules/@nestjs/core/router/router-execution-context.js:175:48
immich_server | at async /usr/src/app/node_modules/@nestjs/core/router/router-execution-context.js:47:13
immich_server | at async /usr/src/app/node_modules/@nestjs/core/router/router-proxy.js:9:17
i`
1.91.2
[Nest] 591 - 12/17/2023, 1:06:05 PM ERROR [ExceptionsHandler] Cannot remove headers after they are sent to the client
Error [ERR_HTTP_HEADERS_SENT]: Cannot remove headers after they are sent to the client
at ServerResponse.removeHeader (node:_http_outgoing:782:11)
at ServerResponse.send (/app/immich/server/node_modules/express/lib/response.js:214:10)
at ExpressAdapter.reply (/app/immich/server/node_modules/@nestjs/platform-express/adapters/express-adapter.js:31:29)
at RouterResponseController.apply (/app/immich/server/node_modules/@nestjs/core/router/router-response-controller.js:15:36)
at /app/immich/server/node_modules/@nestjs/core/router/router-execution-context.js:175:48
at async /app/immich/server/node_modules/@nestjs/core/router/router-execution-context.js:47:13
at async /app/immich/server/node_modules/@nestjs/core/router/router-proxy.js:9:17
I only have this issue when using my reverse proxy
same problem in 1.91.3, and now (I don't know if this is related) my android phone backup the photos but there is none in web interface (with 1.91.2 everything was working fine)
nvm: my phone changed the location (different timezone) and the photos was taken in the future... after one hour (difference of timezone) the photos showed in the web interface
Same error im experiencing when trying to perform a search in 1.91.2
@mvivaldi @lslvxy @martabal backup issue may relate with reverse-proxy's config like in nginx client_max_body_size
Same issue when I reload or scroll a page (not a specific page) but no blank page, frontend seems to work correctly. Docker (compose) containers via Nginx. I'm using this :
client_max_body_size 50000M;
Version : 1.91.3
[Nest] 7 - 12/19/2023, 2:53:19 AM ERROR [ExceptionsHandler] Cannot remove headers after they are sent to the client
Error [ERR_HTTP_HEADERS_SENT]: Cannot remove headers after they are sent to the client
at ServerResponse.removeHeader (node:_http_outgoing:782:11)
at ServerResponse.send (/usr/src/app/node_modules/express/lib/response.js:214:10)
at ExpressAdapter.reply (/usr/src/app/node_modules/@nestjs/platform-express/adapters/express-adapter.js:31:29)
at RouterResponseController.apply (/usr/src/app/node_modules/@nestjs/core/router/router-response-controller.js:15:36)
at /usr/src/app/node_modules/@nestjs/core/router/router-execution-context.js:175:48
at async /usr/src/app/node_modules/@nestjs/core/router/router-execution-context.js:47:13
at async /usr/src/app/node_modules/@nestjs/core/router/router-proxy.js:9:17
What am I supposed to do ? Thanks
What am I supposed to do ?
Update.
I have a similar log when i try to load some videos, when this happens the video seems to load very slow
[Nest] 17 - 06/14/2024, 4:36:17 PM ERROR [Api:LoggerRepository~sb9vgm39] Unable to send file: Error
Error: write EPIPE
at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:95:16)
at WriteWrap.callbackTrampoline (node:internal/async_hooks:130:17)
[Nest] 17 - 06/14/2024, 4:36:17 PM ERROR [Api:Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at ServerResponse.setHeader (node:_http_outgoing:659:11)
at ServerResponse.header (/usr/src/app/node_modules/express/lib/response.js:795:10)
at sendFile (/usr/src/app/dist/utils/file.js:61:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async AssetMediaController.playAssetVideo (/usr/src/app/dist/controllers/asset-media.controller.js:60:9)~sb9vgm39] Failed to play asset video
[Nest] 17 - 06/14/2024, 4:36:17 PM ERROR [Api:Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at ServerResponse.setHeader (node:_http_outgoing:659:11)
at ServerResponse.header (/usr/src/app/node_modules/express/lib/response.js:795:10)
at sendFile (/usr/src/app/dist/utils/file.js:61:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async AssetMediaController.playAssetVideo (/usr/src/app/dist/controllers/asset-media.controller.js:60:9)~sb9vgm39] Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
Fixed again in #10289, which will be in the next release.
The bug
After updating to 1.91.0 I'm seeing these messages in the server log:
[Nest] 8 - 12/15/2023, 9:38:56 PM ERROR [ExceptionsHandler] Cannot remove headers after they are sent to the client Error [ERR_HTTP_HEADERS_SENT]: Cannot remove headers after they are sent to the client at ServerResponse.removeHeader (node:_http_outgoing:782:11) at ServerResponse.send (/usr/src/app/node_modules/express/lib/response.js:214:10) at ExpressAdapter.reply (/usr/src/app/node_modules/@nestjs/platform-express/adapters/express-adapter.js:31:29) at RouterResponseController.apply (/usr/src/app/node_modules/@nestjs/core/router/router-response-controller.js:15:36) at /usr/src/app/node_modules/@nestjs/core/router/router-execution-context.js:175:48 at async /usr/src/app/node_modules/@nestjs/core/router/router-execution-context.js:47:13 at async /usr/src/app/node_modules/@nestjs/core/router/router-proxy.js:9:17
The system is working fine and my read of the error is that it is benign but the code apparently is doing someting to the response after it has been sent. This is usually bug. unfortuntely I'm not getting enough of the call stack to know where to look in immich.
The OS that Immich Server is running on
Debian (docker)
Version of Immich Server
v1.91.0
Version of Immich Mobile App
N/A
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
Additional information
I use swag. here is my proxy config. I already had the http settings you suggested in a shared proxy.cfg file.
server { listen 443 ssl; listen [::]:443 ssl;
}