immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
39.04k stars 1.84k forks source link

mobile: should be more resilient to temporary communication issues #2980

Open uhthomas opened 1 year ago

uhthomas commented 1 year ago

The bug

I use Tailscale to access Immich, and have an iOS automation which connects to Tailscale when I open the app. I found that Immich will try to resolve the host, fail, and then assume I'm actually unauthenticated and ask me to login again. It would be nice to:

  1. Not make that assumption.
  2. Handle transient connection failures more gracefully.

The OS that Immich Server is running on

N/A

Version of Immich Server

N/A

Version of Immich Mobile App

1.63.0 build.103

Platform with the issue

Your docker-compose.yml content

N/A

Your .env content

N/A

Reproduction steps

N/A

Additional information

No response

awonglk commented 9 months ago

Curious if there is any plans to fix this issue? It does impact background jobs whenever it's logged out, thus no photos are backed up until I open the app to login again.

ddshd commented 9 months ago

Curious if there is any plans to fix this issue? It does impact background jobs whenever it's logged out, thus no photos are backed up until I open the app to login again.

Some of the changes I’ve made should have helped with this.

Could you help me with if you’re using a domain or direct IP in the app?

awonglk commented 9 months ago

I am using a domain name

traktuner commented 9 months ago

Same problem here. Not using Tailscale. Domain name (subdomain) with Let's Encrypt cert. It happens every time I update the docker image. When the server is "not ready yet" and someone opens immich, it logs out. User has to log in again. Seems like that happens when you get a 502 back. Maybe implement a "server not reachable" screen and retry in the background? All my users are on iOS, all have the same problem including me.

bt90 commented 4 months ago

Fixed by #7383

rawcomposition commented 2 months ago

Just started using the app a couple days ago and I've already been logged out 3 or 4 times for no apparent reason. Server is on v1.102.2

rawcomposition commented 2 months ago

Screenshot 2024-04-23 at 7 07 27 AM

The Immich instance was online the whole time, and logging in manually worked fine, so presumably it was a temporary outage I guess, hard to say what caused that. But would be great if it wouldn't log out every time there's a temporary outage.

itaintgonnawell commented 2 months ago

In my case, free ddns service(duckdns) is sometimes down, server unreachable for some minutes or about an hour, and then iOS immich app automatically logged out when immich tries to background task or ping I guess. (Not happened with my iPad app which logged in but background backup not enabled)

Please consider to add 'retry access with delay' since I think most of users can't notice such background logout and keep considering background backup works.