App stops working after a 400
Version
v1.0.29.0
Deployment Method
Linux Server
Description
Our current configuration has two users (API Keys) on the same server. Every few hours, the web app stops working after it hits a 400 retrieving a particular asset. It displays the error page with the following message: "Looks like your immich-server is offline or you misconfigured immichFrame, check the container logs". The logs show a single failing request, and then continued working requests to immich after the failure. The error page continues to display, even though the frame is requesting other images successfully after the failure.
This is not limited to a single asset, and occurs after a few hours of normal operation.
There are two potential issues here:
- a 400 error for a single asset disables the entire web app, instead of logging an error and moving on to other assets.
- The logs show the asset failing, but the album info for the asset succeeding. Manual immich API calls to retrieve the asset thumbnail work...with one of the API Keys. Is ImmichFrame potentially using the wrong key? I have no good proof of this - just speculation. I confirmed that the asset isn't returned to the metadata search used by the key that fails this asset.
Reproduction
Part 1 (error page) - force immich to return a 400 for an asset (i.e. get an asset to return to the frame on startup, and then move it) Part 2 - not sure.
Of note - this occurs every few hours in our setup. I've already increased log levels, which so far only unearthed this asset 400 error, but I'm happy to continue to debug. My gut says this might be related to running multiple API keys from the same server, since these failing assets have always returned 200s for one of the configured keys but 400s on the other (which seems reasonable).
Expectations
- a single 400 error shouldn't stop the web app from working
- I'm not yet sure what is causing the 400 error, but ideally that wouldn't happen either!
Configuration
Accounts:
- ImmichServerUrl: http://immich_server:2283
ApiKey: <api key 1>
ShowMemories: true
People:
- <person ID 1>
- ImmichServerUrl: http://immich_server:2283
ApiKey: <api key 2>
ShowMemories: false
Albums:
- <album id 1>
People:
- <person id 2>
Logs
immichframe-1 | 25-10-15 05:57:50 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[100] Start processing HTTP request GET http://immich_server:2283/api/assets/d283016c-c22e-4613-b3de-2ef24a5d0d1e/thumbnail?key=&size=preview
immichframe-1 | 25-10-15 05:57:50 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[100] Sending HTTP request GET http://immich_server:2283/api/assets/d283016c-c22e-4613-b3de-2ef24a5d0d1e/thumbnail?key=&size=preview
immichframe-1 | 25-10-15 05:57:50 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[101] Received HTTP response headers after 21.8714ms - 400
immichframe-1 | 25-10-15 05:57:50 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[101] End processing HTTP request after 21.9929ms - 400
immichframe-1 | 25-10-15 05:57:50 fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HNGAIR6OECVI", Request id "0HNGAIR6OECVI:0000000C": An unhandled exception was thrown by the application. HTTP Response: {"message":"Not found or no asset.view access","error":"Bad Request","statusCode":400,"correlationId":"lob35nis"} ImmichFrame.Core.Api.ApiException: The HTTP status code of the response was not expected (400). Status: 400 Response: {"message":"Not found or no asset.view access","error":"Bad Request","statusCode":400,"correlationId":"lob35nis"} at ImmichFrame.Core.Api.ImmichApi.ViewAssetAsync(Guid id, String key, Nullable`1 size, CancellationToken cancellationToken) in /source/ImmichFrame.Core/obj/immich-openapi-specsClient.cs:line 3769 at ImmichFrame.Core.Logic.PooledImmichFrameLogic.GetImage(Guid id) in /source/ImmichFrame.Core/Logic/PooledImmichFrameLogic.cs:line 104 at ImmichFrame.WebApi.Controllers.AssetController.GetImage(Guid id, String clientIdentifier) in /source/ImmichFrame.WebApi/Controllers/AssetController.cs:line 69 at lambda_method14(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at CustomAuthenticationMiddleware.InvokeAsync(HttpContext context) in /source/ImmichFrame.WebApi/Helpers/CustomAuthenticationMiddleware.cs:line 23 at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
immichframe-1 | 25-10-15 05:57:50 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[100] Start processing HTTP request GET http://immich_server:2283/api/albums?assetId=d283016c-c22e-4613-b3de-2ef24a5d0d1e
immichframe-1 | 25-10-15 05:57:50 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[100] Sending HTTP request GET http://immich_server:2283/api/albums?assetId=d283016c-c22e-4613-b3de-2ef24a5d0d1e
immichframe-1 | 25-10-15 05:57:50 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[101] Received HTTP response headers after 14.6481ms - 200
immichframe-1 | 25-10-15 05:57:50 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[101] End processing HTTP request after 14.7941ms - 200
immichframe-1 | 25-10-15 05:58:35 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[100] Start processing HTTP request GET http://immich_server:2283/api/assets/ccecdd91-57e4-414a-82a8-512e9e4fb539/thumbnail?key=&size=preview
immichframe-1 | 25-10-15 05:58:35 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[100] Sending HTTP request GET http://immich_server:2283/api/assets/ccecdd91-57e4-414a-82a8-512e9e4fb539/thumbnail?key=&size=preview
immichframe-1 | 25-10-15 05:58:35 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[101] Received HTTP response headers after 13.6344ms - 200
immich_server | [Nest] 27 - 10/15/2025, 5:57:50 AM DEBUG [Api:LoggingInterceptor~lob35nis] GET /api/assets/d283016c-c22e-4613-b3de-2ef24a5d0d1e/thumbnail?key=&size=preview 200 15.68ms fd52:8804:e740::3
immich_server | [Nest] 27 - 10/15/2025, 5:57:50 AM DEBUG [Api:GlobalExceptionFilter~lob35nis] HttpException(400): {"message":"Not found or no asset.view access","error":"Bad Request","statusCode":400}
immich_server | [Nest] 27 - 10/15/2025, 5:57:50 AM DEBUG [Api:LoggingInterceptor~k6vk7lfa] GET /api/albums?assetId=d283016c-c22e-4613-b3de-2ef24a5d0d1e 200 9.57ms fd52:8804:e740::3
Pre-Submission Checklist
-
[x] This is a bug report and not a feature request
-
[x] I have provided all of the required information to reproduce the bug (config, logs, etc.)
-
[x] I have checked for related issues and checked the documentation
Well, the saga continues. I've commented out one of the accounts, in an attempt to isolate the issue. The error page on the frame continues to periodically display (and then continue displaying until a hard refresh). However, there are no longer 400 errors in the logs. Perhaps those were a red herring?
What device are you using?
What device are you using?
immichframe is running in a docker container on an ubuntu server. Home assistant (also running on that server) is continuously casting to a smart display. So, perhaps a bit more complexity in setup than usual.
I think the issue is the disconnect between the error page displaying and the frame controller continuing to load images, instead of the error page disappearing when the next image loads successfully.
What happens in a browser or the Android app (if you have that)?
Can confirm - I also have this issue. My use case: Immich running on a Raspberry Pi 5 in the living room (lan), ImmichFrame on a Raspberry Pi 4 in the dining room (wifi). The Rpi4 opens a chromium browser to display ImmichFrame's WebUI, which works fine for random amounts of time. It seems occasional connection issues are surfacing on the Rpi4 - as soon as a disconnect occurs, ImmichFrame breaks with the error page adam-bloom mentions, despite logs indicating it working again after the reconnect.
Edit: After checking the logs, I do not have 400 errors, so my prior theory was wrong. For some reason it stops querying for several minutes (upon which the error is displayed), then starts again without removing the error message. Here is an extract of the logs detailing the "issue". If you wish I can create a new bug report with this.
Normal requests every minute:
25-11-05 21:57:40 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[100] Start processing HTTP request GET http://192.168.178.77:2283/api/assets/17435667-f3ab-4195-beec-b9307f1b79e4/thumbnail?key=&size=preview 25-11-05 21:57:40 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[100] Sending HTTP request GET http://192.168.178.77:2283/api/assets/17435667-f3ab-4195-beec-b9307f1b79e4/thumbnail?key=&size=preview 25-11-05 21:57:40 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[101] Received HTTP response headers after 33.1756ms - 200 25-11-05 21:57:40 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[101] End processing HTTP request after 33.9276ms - 200
No further requests for several minutes (no apparent reason), then a sudden flurry of requests
25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[100] Start processing HTTP request GET http://192.168.178.77:2283/api/assets/c4d19510-ec1e-4b4f-b271-55d0101a82dc/thumbnail?key=&size=preview 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[100] Sending HTTP request GET http://192.168.178.77:2283/api/assets/c4d19510-ec1e-4b4f-b271-55d0101a82dc/thumbnail?key=&size=preview 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[100] Start processing HTTP request GET http://192.168.178.77:2283/api/assets/ae97af48-3c4b-424c-b8b3-0585c9417712/thumbnail?key=&size=preview 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[100] Sending HTTP request GET http://192.168.178.77:2283/api/assets/ae97af48-3c4b-424c-b8b3-0585c9417712/thumbnail?key=&size=preview 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[100] Start processing HTTP request GET http://192.168.178.77:2283/api/assets/5040ce67-6aad-499d-96c4-abef81ff6601/thumbnail?key=&size=preview 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[100] Sending HTTP request GET http://192.168.178.77:2283/api/assets/5040ce67-6aad-499d-96c4-abef81ff6601/thumbnail?key=&size=preview 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[100] Start processing HTTP request GET http://192.168.178.77:2283/api/assets/4337b0a8-c986-4ab5-9127-db2dad35cba6/thumbnail?key=&size=preview 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[100] Sending HTTP request GET http://192.168.178.77:2283/api/assets/4337b0a8-c986-4ab5-9127-db2dad35cba6/thumbnail?key=&size=preview 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[100] Start processing HTTP request GET http://192.168.178.77:2283/api/assets/69c133c8-4363-44fe-a029-696753b8107f/thumbnail?key=&size=preview 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[100] Sending HTTP request GET http://192.168.178.77:2283/api/assets/69c133c8-4363-44fe-a029-696753b8107f/thumbnail?key=&size=preview 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[100] Start processing HTTP request GET http://192.168.178.77:2283/api/assets/08c8cebc-0655-493c-8d3c-041cb983cd51/thumbnail?key=&size=preview 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[100] Sending HTTP request GET http://192.168.178.77:2283/api/assets/08c8cebc-0655-493c-8d3c-041cb983cd51/thumbnail?key=&size=preview 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[101] Received HTTP response headers after 34.4518ms - 200 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[101] End processing HTTP request after 34.7989ms - 200 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[101] Received HTTP response headers after 78.7495ms - 200 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[101] End processing HTTP request after 80.6753ms - 200 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[101] Received HTTP response headers after 94.2148ms - 200 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[101] End processing HTTP request after 94.5789ms - 200 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[101] Received HTTP response headers after 93.331ms - 200 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[101] End processing HTTP request after 94.0198ms - 200 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[101] Received HTTP response headers after 94.7464ms - 200 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[101] End processing HTTP request after 95.0702ms - 200 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[101] Received HTTP response headers after 110.0627ms - 200 25-11-05 22:03:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[101] End processing HTTP request after 110.5744ms - 200
Resuming normal queries every minute...:
25-11-05 22:04:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[100] Start processing HTTP request GET http://192.168.178.77:2283/api/assets/d2a59c89-91b2-466e-937b-a88311890d9b/thumbnail?key=&size=preview 25-11-05 22:04:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[100] Sending HTTP request GET http://192.168.178.77:2283/api/assets/d2a59c89-91b2-466e-937b-a88311890d9b/thumbnail?key=&size=preview 25-11-05 22:04:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[101] Received HTTP response headers after 26.1071ms - 200 25-11-05 22:04:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[101] End processing HTTP request after 26.5809ms - 200 25-11-05 22:05:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[100] Start processing HTTP request GET http://192.168.178.77:2283/api/assets/52a2aaf9-b7e9-4b62-b9cd-efd8e823a07a/thumbnail?key=&size=preview 25-11-05 22:05:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[100] Sending HTTP request GET http://192.168.178.77:2283/api/assets/52a2aaf9-b7e9-4b62-b9cd-efd8e823a07a/thumbnail?key=&size=preview 25-11-05 22:05:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.ClientHandler[101] Received HTTP response headers after 24.0052ms - 200 25-11-05 22:05:41 info: System.Net.Http.HttpClient.ImmichApiAccountClient.LogicalHandler[101] End processing HTTP request after 24.7172ms - 200
Duplicate/related to https://github.com/immichFrame/ImmichFrame/issues/547?