Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access ImmichFrame backend (via URL) before main Immich server has started results in 404 and never recovers #236

Open
3 tasks done
sumnerboy12 opened this issue Dec 19, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@sumnerboy12
Copy link

Version

v1.0.21.0

Deployment Method

Docker (swarm)

Description

If I try to access the ImmichFrame slideshow before the Immich server has started up I get the following error in my ImmichFrame backend logs.

Once the Immich server starts and everything is running, if I try to access the slideshow again, I get the same 404 errors in the backend logs.

It appears as tho once the first request fails, that response is cached somehow, and any subsequent requests return the same code, even tho the Immich server is now available.

Reproduction

Start the ImmichFrame backend before starting the Immich server.
Access the ImmichFrame slideshow in your web browser.
Start the Immich server (wait a few mins to ensure it is fully up and running).
Access the ImmichFrame slideshow again, and you should get the same error message.

Expectations

No response

Configuration

No response

Logs

immich_frame-hw.1.eoxg2qouheu6@nuc03    | fail: Microsoft.AspNetCore.Server.Kestrel[13]
immich_frame-hw.1.eoxg2qouheu6@nuc03    |       Connection id "0HN8UCEI6VU3H", Request id "0HN8UCEI6VU3H:0000000C": An unhandled exception was thrown by the application.
immich_frame-hw.1.eoxg2qouheu6@nuc03    |       ImmichFrame.Core.Exceptions.PersonNotFoundException: Person '495ddab0-c847-49b9-9065-4bd07a3b13d8' was not found, check your settings file!
immich_frame-hw.1.eoxg2qouheu6@nuc03    |
immich_frame-hw.1.eoxg2qouheu6@nuc03    |       The HTTP status code of the response was not expected (404).
immich_frame-hw.1.eoxg2qouheu6@nuc03    |
immich_frame-hw.1.eoxg2qouheu6@nuc03    |       Status: 404
immich_frame-hw.1.eoxg2qouheu6@nuc03    |       Response:
immich_frame-hw.1.eoxg2qouheu6@nuc03    |       404 page not found
immich_frame-hw.1.eoxg2qouheu6@nuc03    |
immich_frame-hw.1.eoxg2qouheu6@nuc03    |        ---> HTTP Response:
immich_frame-hw.1.eoxg2qouheu6@nuc03    |
immich_frame-hw.1.eoxg2qouheu6@nuc03    |       404 page not found
immich_frame-hw.1.eoxg2qouheu6@nuc03    |
immich_frame-hw.1.eoxg2qouheu6@nuc03    |
immich_frame-hw.1.eoxg2qouheu6@nuc03    |       ImmichFrame.Core.Api.ApiException: The HTTP status code of the response was not expected (404).
immich_frame-hw.1.eoxg2qouheu6@nuc03    |
immich_frame-hw.1.eoxg2qouheu6@nuc03    |       Status: 404
immich_frame-hw.1.eoxg2qouheu6@nuc03    |       Response:
immich_frame-hw.1.eoxg2qouheu6@nuc03    |       404 page not found
immich_frame-hw.1.eoxg2qouheu6@nuc03    |
immich_frame-hw.1.eoxg2qouheu6@nuc03    |          at ImmichFrame.Core.Api.ImmichApi.SearchMetadataAsync(MetadataSearchDto body, CancellationToken cancellationToken) in /source/ImmichFrame.Core/obj/immich-openapi-specsClient.cs:line 8012
immich_frame-hw.1.eoxg2qouheu6@nuc03    |          at ImmichFrame.Core.Logic.ImmichFrameLogic.GetPeopleAssets() in /source/ImmichFrame.Core/Logic/ImmichFrameLogic.cs:line 351
immich_frame-hw.1.eoxg2qouheu6@nuc03    |          --- End of inner exception stack trace ---
immich_frame-hw.1.eoxg2qouheu6@nuc03    |          at ImmichFrame.Core.Logic.ImmichFrameLogic.GetPeopleAssets() in /source/ImmichFrame.Core/Logic/ImmichFrameLogic.cs:line 362
immich_frame-hw.1.eoxg2qouheu6@nuc03    |          at ImmichFrame.Core.Logic.ImmichFrameLogic.GetFilteredAssetIds() in /source/ImmichFrame.Core/Logic/ImmichFrameLogic.cs:line 202
immich_frame-hw.1.eoxg2qouheu6@nuc03    |          at ImmichFrame.Core.Logic.ImmichFrameLogic.GetAssets() in /source/ImmichFrame.Core/Logic/ImmichFrameLogic.cs:line 59
immich_frame-hw.1.eoxg2qouheu6@nuc03    |          at ImmichFrame.WebApi.Controllers.AssetController.GetAsset(String clientIdentifier) in /source/ImmichFrame.WebApi/Controllers/AssetController.cs:line 36
immich_frame-hw.1.eoxg2qouheu6@nuc03    |          at lambda_method6(Closure, Object)
immich_frame-hw.1.eoxg2qouheu6@nuc03    |          at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
immich_frame-hw.1.eoxg2qouheu6@nuc03    |          at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
immich_frame-hw.1.eoxg2qouheu6@nuc03    |          at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
immich_frame-hw.1.eoxg2qouheu6@nuc03    |          at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
immich_frame-hw.1.eoxg2qouheu6@nuc03    |          at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
immich_frame-hw.1.eoxg2qouheu6@nuc03    |          at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
immich_frame-hw.1.eoxg2qouheu6@nuc03    |       --- End of stack trace from previous location ---
immich_frame-hw.1.eoxg2qouheu6@nuc03    |          at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
immich_frame-hw.1.eoxg2qouheu6@nuc03    |          at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
immich_frame-hw.1.eoxg2qouheu6@nuc03    |          at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
immich_frame-hw.1.eoxg2qouheu6@nuc03    |          at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
immich_frame-hw.1.eoxg2qouheu6@nuc03    |          at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
immich_frame-hw.1.eoxg2qouheu6@nuc03    |          at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

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

@sumnerboy12 sumnerboy12 added the bug Something isn't working label Dec 19, 2024
@3rob3
Copy link
Collaborator

3rob3 commented Dec 23, 2024

@JW-CH you see any quick fix for this?

@JW-CH
Copy link
Collaborator

JW-CH commented Jan 7, 2025

@JW-CH you see any quick fix for this?

I'll take a look into it later.

@sumnerboy12
Copy link
Author

This happened again today when I upgraded my Immich server. I have two frames in the wild so they are constantly querying the frame backend. Because the Immich server was down for a few mins while it pulled the new version, the frame backend wasn't able to retrieve any assets, and it got in this state.

Even after Immich restarted the frame backed was in this "bad" state and never recovered until I noticed the errors popping up on the frame we have in our kitchen. I had to manually kill the frame container and restart to resolve.

@3rob3
Copy link
Collaborator

3rob3 commented Jan 9, 2025

This happened again today when I upgraded my Immich server. I have two frames in the wild so they are constantly querying the frame backend. Because the Immich server was down for a few mins while it pulled the new version, the frame backend wasn't able to retrieve any assets, and it got in this state.

Even after Immich restarted the frame backed was in this "bad" state and never recovered until I noticed the errors popping up on the frame we have in our kitchen. I had to manually kill the frame container and restart to resolve.

This doesn't happen for me. I updated Immich today while frames were running, while the Immich server was down I saw the not happy face error message, but once Immich came back online the frame continued on happily.

@sumnerboy12
Copy link
Author

sumnerboy12 commented Jan 9, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants