immich-app / immich

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

App offline Takes Too Long to Load timeline #11769

Closed DaanHend closed 2 weeks ago

DaanHend commented 1 month ago

The bug

When I open the app on Android without a connection to the server (offline mode), the app becomes unusable. It takes an excessively long time to load anything, often around 1 minute, with the app remaining stuck on the loading screen displaying the logo. Even in cases where it is slightly faster, the minimum wait time is still around 10 seconds.

This delay is significant enough that I most of the time resort to using Google Photos for quickly accessing my photos. For Immich, I need to use Tailscale to achieve a usable experience. Waiting 10 seconds or more just to view a recently taken photo or another existing one feels too long and inconvenient.

The OS that Immich Server is running on

Latest

Version of Immich Server

Latest

Version of Immich Mobile App

Latest

Platform with the issue

Your docker-compose.yml content

I dont think this is related to the problem.

Your .env content

I dont think this is related to the problem.

Reproduction steps

1. Ensure No Server Connection. Disconnect any traffic to the server.
2. Launch the app while the device is offline or without access to the server.
3. Observe the Behavior:

Use Android. Cant relate to IOS

Relevant log output

No response

Additional information

No response

alextran1502 commented 1 month ago

Can you help me connect to the local IP when you are at home, then disconnect the server, kill the app, and open it again? I am trying to figure out if this is Tailscale timeout issue or the app itself since I cannot reproduce this scenario on my end

DaanHend commented 1 month ago

Yes. I did:

Tried it then again with an Tailscale IP same way as above. It did the same as described in the issue again.

Seems indeed Tailscale related.

You think this is resolveable?

alextran1502 commented 1 month ago

Do you know if there are any settings to help reduce the timeout check for Tailscale?

DaanHend commented 1 month ago

Not that I know of. Did some reading and can't find anything related yet.

Would Immich not check the connection, if not after x seconds open the timeline anyway? It seems there is something in place, but it takes a lot of time.

vinyasns commented 4 weeks ago

I see a similar behaviour when the server is offline. I use tailscale IP to connect to the server.

ChiNoel-osu commented 3 weeks ago

I can confirm this on iOS, done some testing:

alextran1502 commented 3 weeks ago

@zackpollard would you like to look at this behavior?

DanielChydz commented 2 weeks ago

Same issue, just to bump the thread.

vinyasns commented 2 weeks ago

Thank you @alextran1502 !

DaanHend commented 1 week ago

Thanks @alextran1502! It works

But I have to say. It seems a bit of a simple work around. To timeout getuser when it takes to long. It is still 7 seconds. If I quickly need a photo from my phone to show, then I'm still not opening Immich. I know its a backup tool first. But GP opens instantly without a connection.

Wouldn't it be better to make Immich start directly and parallel to it establish the connection to the server?

zackpollard commented 1 week ago

That's essentially our long term goal but right now this is the best we can do. There needs to be a bunch of changes in the app before that will be an easy change to make without a bunch of other issues 🙂

alextran1502 commented 1 week ago

@DaanHend this is a workaround for now, we will take a look into this to proper fixing it in the doming weeks. Is your connection to your server not available that often?

DaanHend commented 1 week ago

Hi! Thanks for the reply.

Glad to hear that a better solution is in the works. I can totally see how it could affect more of the app once it’s properly implemented. For now, this workaround does the job. Before, I couldn’t use the app if Tailscale would have been disconnected, but now it’s at least functional, even if it’s a bit of a wait. I know there are other features that need attention, so I’m cool with waiting for the final fix.

Thanks again for all the effort you’re putting in!