Open bdr99 opened 4 months ago
I am experiencing the same issue on iOS app 1.91.0 build 141 - server 1.97.0
. In my case, it was not due to VPN disconnection but when my server is down.
There should be an offline mode or something that would prevent Immich from returning to the login screen when your server is offline or, in your case, using Tailscale.
@f-x1-1 Can you tell what response you get when visiting https://{YOUR_HOSTNAME}/.well-known/immich
while you are not on tailscale. if you get 502 Bad Gateway
then I have a possible fix.
FIX is: In mobile/lib/shared/services/api.service.dart:101 we are ignoring any HTTP error codes we also need to return false if we get 502 from server. right now we are returning true.
I can check if this fix works, I have to setup flutter dev environment and find android device to test.
@Tushar-Harsora In my case, my web server is configured such that when it receives a request that isn't from Tailscale, it immediately closes the connection. So there won't be a 502 status code, or any status code at all for that matter.
In case it helps, here is the output I get from curl when I send a request from outside my Tailscale network:
$ curl "https://immich.mydomain.com/.well-known/immich"
curl: (92) HTTP/2 stream 0 was not closed cleanly: INTERNAL_ERROR (err 2)
Same for me, behind a Cloudflare tunnel
curl "https://xxx/.well-known/immich"
error code: 1033
Hello, facing the same issue on android app. Currently im hosting locally via docker and have yet to decide whether i want to expose it. The app routes me back to the Server Endpoint URL when using mobile data for example.
This is, at least for me, breaking the possibility to use it as a daily driver, which is bad because the product is great.
Wouldn't it be better for the app to handle remote communication in a side thread with "disabled" features when offline? e.g. connection is not mandatory for the "local" gallery visualization.
The bug
Similarly to the user in https://github.com/immich-app/immich/issues/4850, I'm using Immich behind a VPN (Tailscale). When the phone is not connected to the VPN, the server will be unreachable. This is causing the app to redirect me back to the login screen, and I am unable to browse my photos offline. The fix in https://github.com/immich-app/immich/pull/7383 unfortunately did not work for me.
I'm using Immich behind a Caddy reverse proxy. The reverse proxy is configured to only allow requests to the Immich server if they originate from the internal network (VPN). When the reverse proxy receives a request from the public internet, it will close the connection and not forward the request to the Immich server.
I'm attaching a CSV log below, but it doesn't contain much info. In addition to the info in the CSV log, the in-app log viewer shows the following details.
Please let me know if there is any more info I can provide to help troubleshoot this issue.
Immich_log_2024-02-28T141937.253411.csv
The OS that Immich Server is running on
Unraid 6.12.8
Version of Immich Server
v1.96.0
Version of Immich Mobile App
v1.96.0
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
Additional information
No response