Skip to content

Conversation

@mertalev
Copy link
Member

@mertalev mertalev commented Feb 5, 2026

Description

This PR moves API requests from a Dart client to a shared native client that is instantiated at startup. This change improves performance and (mostly) consolidates configuration to a single place. Among other things, this should also improve the mTLS experience. The main remaining exceptions to this are asset downloading and background uploads, which don't use the same session as they're handled in dependencies. This can be addressed separately from this PR.

How Has This Been Tested?

Tested login, browsing, asset upload and websocket events on both platforms.

platform-side headers

update comment

consistent platform check

tweak websocket handling

support streaming
@mertalev mertalev force-pushed the feat/use-native-clients branch from ec63816 to 03afe8f Compare February 5, 2026 20:58
@jfly
Copy link
Contributor

jfly commented Feb 7, 2026

With the changes in this branch, I am able to log into the immich app and view my timeline, but foreground uploads do not work. I have not tested background uploads.

Foreground uploads error out with the following:

Message:

Error(401) uploading 32010 | IMG_20260207_144100_965.jpg | Created on 2026-02-07 22:41:01.000Z | Invalid user token

From: ForegroundUploadService

Shortly after that, I see:

Message: Unauthorized access token.
From: AuthGuard

I can repro the error if I log out and log back in. I don't see anything interesting in my immich server logs.

(I'm connected to a immich server over HTTPS with a certificate signed by my own self-hosted certificate authority, although I cannot imagine how that's relevant here).

@mertalev
Copy link
Member Author

mertalev commented Feb 7, 2026

Hmm, it might not be setting headers correctly on Android. I think I only tested upload on iOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants