Skip to content

ExcludedAlbums causes /api/asset to deadlock silently in v1.0.34 (cache poisoning wedges all clients); v1.0.33 crashes at the same code path #669

Description

@afonsolaw

Version

v1.0.34.0

Deployment Method

Docker

Description

  1. Immich v3 server (v3.0.1) with a large library (~96,700 assets); create an album with a few thousand assets (~2,750 in my case).
  2. Run ImmichFrame v1.0.34.0 (Docker) with ExcludedAlbums: "". Also set in my config: People (3 person UUIDs), Interval, ShowClock - but removing ExcludedAlbums alone resolves it, and People alone works fine.
  3. From a fresh client: curl -m 120 http://:8080/api/asset -> no response ever; curl exits with HTTP 000 at the timeout.
  4. Container log shows the startup pool build completing normally (paginated POST /api/search/metadata, all 200s), then nothing: the hung /api/asset request produces ZERO outbound calls and ZERO errors.
  5. Open the web UI from 1-2 more devices -> previously-working clients stop advancing too (their next asset request queues behind the poisoned cache entry). Web UI shows the "Looks like your immich-server is offline or you misconfigured immichFrame" page even though the server is healthy.
  6. Remove ExcludedAlbums, recreate the container -> /api/asset returns within seconds and all clients work.

Reproduced identically on linux/amd64 (Synology DSM) and linux/arm64 (macOS/Colima), one via direct container network, one via HTTPS reverse proxy - not network- or architecture-specific.

Reproduction

Immich v3 server with a large library; create an album with a few thousand assets.
Run ImmichFrame v1.0.34.0 with ExcludedAlbums: "" (a People filter appears not to matter — see note above).
curl -m 120 http://:8080/api/asset from a fresh client → no response, curl exits with HTTP 000 at the timeout.
Container log shows the startup pool build completing normally (paginated POST /api/search/metadata, all 200s), then nothing: the hung /api/asset request produces zero outbound calls and zero errors.
Open the web UI from 1-2 more devices → previously-working clients stop advancing too (their next asset request queues behind the poisoned cache entry). Web UI shows the "Looks like your immich-server is offline or you misconfigured immichFrame" page even though the server is healthy.
Remove ExcludedAlbums, recreate the container → /api/asset returns within seconds and all clients work.

Expectations

/api/asset either returns assets with the excluded album applied, or fails fast with a logged error. A failed/hung excluded-album fetch should not be cached (GetOrCreateAsync) in a state that permanently blocks all clients until container restart.

Evidence the excluded-album fetch is the failing path: pinning v1.0.33.0 against the same Immich v3.0.1 crashes IMMEDIATELY (HTTP 500) at the identical call site - AssetHelper.GetExcludedAlbumAssets -> CachingApiAssetsPool.AllAssets -> GetOrCreateAsync - with 'Error converting value "owner" to type AlbumUserRole' (expected pre-v3 incompatibility, but it pins the operation: old code THROWS where v1.0.34 HANGS). Full stack traces available on request.

Configuration

Docker compose environment (docker-compose.yml, not Settings.xml):

services:
  immichframe:
    container_name: immichframe
    image: ghcr.io/immichframe/immichframe:latest   # = v1.0.34.0
    restart: on-failure
    ports:
      - "8080:8080"
    environment:
      TZ: "America/New_York"
      ImmichServerUrl: "http://immich_server:2283"   # also reproduced via https reverse proxy
      ApiKey: "REDACTED"
      Interval: "10"
      People: "UUID1,UUID2,UUID3"
      ExcludedAlbums: "ALBUM_UUID"    # <- removing only this line fixes it
      ShowClock: "true"
      ClockFormat: "hh:mm"

Logs

=== v1.0.34.0: pool build completes, then /api/asset hangs with NOTHING logged ===
26-07-05 13:39:01 info: ...ImmichApiAccountClient.ClientHandler[101] Received HTTP response headers after 126.276ms - 200
[... ~30 more paginated POST /api/search/metadata calls, all 200, 300-600ms each ...]
26-07-05 13:39:12 info: ...ImmichApiAccountClient.LogicalHandler[101] End processing HTTP request after 648.6501ms - 200
[log ends - curl -m 120 http://localhost:8080/api/asset from this point = HTTP 000 at 120.001s, zero new log lines, zero outbound calls]

=== v1.0.33.0 against the same server: instant HTTP 500 pinning the code path ===
26-07-05 13:57:59 fail: Microsoft.AspNetCore.Server.Kestrel[13] An unhandled exception was thrown by the application.
ImmichFrame.Core.Api.ApiException: Could not deserialize the response body stream as ImmichFrame.Core.Api.AlbumResponseDto.
 ---> Newtonsoft.Json.JsonSerializationException: Error converting value "owner" to type 'ImmichFrame.Core.Api.AlbumUserRole'. Path 'albumUsers[0].role'
   at ImmichFrame.Core.Api.ImmichApi.GetAlbumInfoAsync(Guid id, String key, Nullable`1 withoutAssets, CancellationToken cancellationToken)
   at ImmichFrame.Core.Helpers.AssetHelper.GetExcludedAlbumAssets(ImmichApi immichApi, IAccountSettings accountSettings, CancellationToken ct) in AssetHelper.cs:line 15
   at Microsoft.Extensions.Caching.Memory.CacheExtensions.GetOrCreateAsync[TItem](IMemoryCache cache, Object key, Func`2 factory, MemoryCacheEntryOptions createOptions)
   at ImmichFrame.Core.Logic.Pool.CachingApiAssetsPool.AllAssets(CancellationToken ct) in CachingApiAssetsPool.cs:line 23
   at ImmichFrame.Core.Logic.Pool.CachingApiAssetsPool.GetAssetCount(CancellationToken ct) in CachingApiAssetsPool.cs:line 13
   at ImmichFrame.Core.Logic.AccountSelection.TotalAccountImagesSelectionStrategy.GetWeights(IList`1 accounts)
   at ImmichFrame.WebApi.Controllers.AssetController.GetAssets(String

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions