Widget "unable to connect to your Immich instance"
Hi, thanks in advance for your help! I upgraded server from 1.132.3 to 1.35.3. Love all the new features, but I can't get widgets to work. When I try to add widget, it shows "Unable to connect to your Immich instance." Using on iOS.
56 Replies
:wave: Hey @dnas,
Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:.
References
- Container Logs:
docker compose logs docs
- Container Status: docker ps -a docs
- Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
- Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA
Checklist
I have...
1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
2. :ballot_box_with_check: read applicable release notes.
3. :ballot_box_with_check: reviewed the FAQs for known issues.
4. :ballot_box_with_check: reviewed Github for known issues.
5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
6. :ballot_box_with_check: uploaded the relevant information (see below).
7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable
(an item can be marked as "complete" by reacting with the appropriate number)
Information
In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:
- Your docker-compose.yml and .env files.
- Logs from all the containers and their status (see above).
- All the troubleshooting steps you've tried so far.
- Any recent changes you've made to Immich or your system.
- Details about your system (both software/OS and hardware).
- Details about your storage (filesystems, type of disks, output of commands like fdisk -l and df -h).
- The version of the Immich server, mobile app, and other relevant pieces.
- Any other information that you think might be relevant.
Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)
If this ticket can be closed you can use the /close command, and re-open it later if needed.
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:mobile app logs
Can you try re-create the widget?
or try log out and log in your instance first
I have the same exact issue, cc @Mraedis
I am using oauth for logging in
Do you also happen to be using OAuth @dnas ?
I didn’t set up the album initially, but even with the album selected (it’s pretty slow to show the available albums, if this could raise some hints) it doesn’t work
I’ve checked the logs and the server properly sends the response with status code 200, so it seems a client-side issue
And I see many “previews”, I’d say around 10 (didn’t count tbh), getting sent
Cc @bwees to investigate
@LucaTheHacker @dnas are you using server link switching in the app? This is the only thing that I can think of that would cause the requests to fail. It is quite odd that the server is responding with 200 and then the widget replying with that error. @LucaTheHacker when you say you "see many previews", I assume this means you see the preview endpoint logs in the server?
@bwees I am not using link switching, I do that “with the network’ at home with some DNS magic
I mean that I see multiple requests in the NGINX logs

This is what I see right now
ok that view is indicative of the widget code crashing. Unfortunately we do not have any logging in the widget portion because it is a separate process and has limited ability to transmit data back/forth
I can try to attach a debugger with XCode, maybe(?)
are you able to provide a screenshot of the nginx logs? I want to see if its trying to refetch the same image and/or the initial API request to get the list of images failed
you may be able to? I have never tried to attach to a running widget. If you manage, that would be super helpful
I’ll try
another option is if you have developed in xcode before, clone the immich repo and make your own build of the app
little more advanced tho, you would have to setup the whole flutter dev environment
@LucaTheHacker any chance you could provide the URL you are using for the server? Was thinking about some edge cases and it could be that if you have a URL path in the server URL (for use with a reverse proxy) or a trailing / in the server URL, there could be issues
but seeing as you are getting 200 response codes, thats quite odd...
[22/Jun/2025:21:16:20 +0000] - 200 200 - POST https XXX "/api/search/random?sessionKey=xxxxx"
and this is then followed by the other requests with URL "/api/assets/afa288f0-d8b0-XXXXX-XXXXX7/thumbnail?sessionKey="
hmmmm
is your library filled with a mix of images from different cameras?
yes it is
ok, do you know what your preview thumbnail size is set to in immich?
I am starting to think that our image resizing code in the widget is crashing
https://my.immich.app/admin/system-settings?isOpen=image+preview-settings
thumbnail is WebP 480p whilst preview is WebP 4K
that would do it
webp is prolly not supported by UIImage
all of our test instances use JPEG, oversight by me...
May that be caused by "extended P3"?
I dont think
I dont believe UIImage supports decoding WebP
which is how all of the images are handled in swift
Let me try
That will take some time

yeah....
im thinking this is gonna require a check in the widget code to make sure the MIME is JPEG and throwing an appropriate error
@dnas can you confirm what your thumbnail settings are? This appears to be a separate issue to @LucaTheHacker 's
I guess it would be better to add a request param like "enforce_jpeg"
and that would re-encode the image on the fly
yeah thats likely
I will discuss with the team and see what the best course of action is. We may have to fast track a planned on-the-fly encoding/resizing feature we are discussing
I mean, previews are important because you scroll the pictures in the app, so re-encoding them every time would be bad, but for a widget, I guess that's more than fine
My current bet is that dnas' issue is the server URL switching which should™ be an easy fix
In this case I believe it would be more future-proof to add a check for eventual errors for "unsupported format"
Just in case Apple decides to add webp support soon™
yeah I completely missed the fact that we support WebP as a format since none of our instances use it.
There is an API call to know which image types are supported by UIImage
Makes sense tbh
definitely best course of action is to add a format=jpeg/webp query param for this though
Do we want to move this to another thread, since you believe dnas issue is different from mine?
if you could actually open an issue on GitHub (if able), this would help us track it internally
just post a link once you make it here and ill assign myself
thank you!
I will try and keep this thread updated with the state of that feature so you know when to switch back to webp
I have reencoded everything and it’s still not working
are you still at 4k resolution?
thumbnails are at 480p jpeg
previews are webp 4k
I have encoded all previews to JPEG as well, is not working
Can you try reencoding to 1080p or maybe 1440p? I wonder if this is not actually a format issue but maybe an OOM scenario?
yeah this looks like a memory issue if you are getting this https://discord.com/channels/979116623879368755/1386174690829013154/1386452687763013723. I created a patch to support WebP natively in the widget and use a more efficient resizing API that @mertalev found. I am testing this with a few other instances to cover all the bases and I'll report back findings.
So sorry for the late response!

not using server url switching
Ok sounds good, this will get fixed in the next update!
So I shouldn't change the settings?
If you want it to work, change the preview settings to use jpeg
The picture you sent is of the thumbnail settings
It’s the dropdown below
You’ll have to re run the thumbnail generator which may or may not be worth it if you are willing to wait a few weeks

Is this current settings or what you changed it to?
current
Hmmmmmm
Interesting
Are you using the ip address of your Immich instance in the app?
Or do you have a domain name
the tailnet ip of the server
Got it
I will try Tailscale IPs tomorrow and see if it’s some weird issue with that
sounds good - thanks Brandon!