App stops working after a 400
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 22/100
Hướng nghiên cứu
Start in ImmichFrame.Core/Logic/PooledImmichFrameLogic.cs at GetImage (around line 104), where the ImmichApi ViewAssetAsync call throws, and in ImmichFrame.WebApi/Controllers/AssetController.cs GetImage (line 69). Check whether an ApiException from a single asset can be caught and skipped so the frame moves on. The second question, whether the wrong API key is used, is unresolved and needs reproduction against two keys. Done means a 400 for one asset no longer breaks the slideshow, with a test or a manual check.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
-
This is a bug report and not a feature request
-
I have provided all of the required information to reproduce the bug (config, logs, etc.)
-
I have checked for related issues and checked the documentation
- Ngôn ngữ chính
- C#
- Star
- 2.4k
- Fork
- 121
- Merge trung bình
- 18 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của immichFrame/ImmichFrame
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
immichFrame/ImmichFrame#735 ·
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 56/100
immichFrame/ImmichFrame#733 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
immichFrame/ImmichFrame#732 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 22/100
immichFrame/ImmichFrame#731 · 1 reaction ·
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
immichFrame/ImmichFrame#729 ·
Tất cả issue của immichFrame/ImmichFrame
Issue tương tự
-
Feature needs response
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Adyen/adyen-dotnet-api-library#1907 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
dimitar-radenkov/Pointframe#318 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
DotHarness/dotcraft#546 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
a-corriger bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
christian-raj/S-Aloha#303 · 1 bình luận ·
-
Input editor says "Apply Changes" even when no changes have been made.Có thể đã có người làm @hcooper đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
MobiFlight/MobiFlight-Connector#3526 ·
Maintainer thường phản hồi trong vòng 1 ngày