I
Immich3y ago
sodoh.

Public hostname not working for mobile (android) app

I have added a public domain through Cloudflare which works perfectly for the web access, but when I try to setup the server endpoint URL (https://my.public.link) through the app and authenticate with my credentials, I always get an error to check the link, username or password. The last 2 are, of course, correct. The app works normally when I use my local http://ip:2383. App version is v1.53.0. Attached the .env and .yml files. Probably I'm missing something, but curious as to what as I seem to have followed all the relevant instructions. Edit: updated title to more relevant since IMMICH_API_URL_EXTERNAL is not related to this.
35 Replies
bo0tzz
bo0tzz3y ago
You only need to set that env var if you're running a nonstandard deployment, a normal reverse proxy setup should work without it
sodoh.
sodoh.OP3y ago
okay, so I commented this line out and run
docker compose up -d
docker compose up -d
but nothing changed really with the error in the app. Could it be something different to look at?
bo0tzz
bo0tzz3y ago
Can you check whether it works if you add /api? And what is the output of https://my.public.link/.well-known/immich ?
sodoh.
sodoh.OP3y ago
{"api":{"endpoint":"/api"}} Already tried the /api before but didn't work.
jrasm91
jrasm913y ago
It is a valid SSL certificate, right? A bad certificate is one reason the web might work and the mobile app won't.
sodoh.
sodoh.OP3y ago
seems like it, yes
No description
bo0tzz
bo0tzz3y ago
Is it also from a trusted CA?
sodoh.
sodoh.OP3y ago
No description
sodoh.
sodoh.OP3y ago
I think cloudflare etc. takes care of these, that's why i went with this as a first step for testing before I start digging more into better options
bo0tzz
bo0tzz3y ago
Can you get the log file from the app and post it here?
sodoh.
sodoh.OP3y ago
The Logs option from the app doesn't seem to capture anything relevant and same from docker. Not sure if I'm looking at the right place though.
No description
bo0tzz
bo0tzz3y ago
That's the spot. I'm pretty sure it's supposed to log auth problems 🤔
jrasm91
jrasm913y ago
It's never logged auth errors iirc
jrasm91
jrasm913y ago
Which has made debugging this exact situation a pain.
bo0tzz
bo0tzz3y ago
Yup
jrasm91
jrasm913y ago
That might not write anything to the user log
sodoh.
sodoh.OP3y ago
update: I've also put a layer OIDC (authentik) which, again, works for web access but nothing changed for the mobile app. I have tried including app.immich:/ and without it + enable "REDIRECT URI OVERRIDE"
jrasm91
jrasm913y ago
Are you using any other DNS related service from cloudflare?
sodoh.
sodoh.OP3y ago
I would say no. Just a basic free account only for immich and authentik for now
jrasm91
jrasm913y ago
Does it work on the phone on mobile data, not on your local wifi?
sodoh.
sodoh.OP3y ago
the localhost works normally on the app and on wifi. when I switch to the public domain I get these errors in the app. The web access of the public domain works normally outside the home network
jrasm91
jrasm913y ago
Idk. The only thing that i can think of would be a certificate related problem. Connectivity seems to be fine. Unfortunately the debugging info for those types of errors is missing from the logs right now If you add /api on the end does that change anything?
sodoh.
sodoh.OP3y ago
nope
jrasm91
jrasm913y ago
Can you successfully run this openssl s_client -debug -connect www.thedomaintocheck.com:443
sodoh.
sodoh.OP3y ago
sorry for the delay, had to troubleshoot why openssl wasn't running but after I figured that out looks like it runs normally it's also strange that while the Login with OAuth option is available when using localhost in the app, when I use again the public host (incl. all variations) it doesn't show anymore. Let me know if this is any hint, else I guess my only choice is to replace cloudflare tunnel with something else.
jrasm91
jrasm913y ago
That makes sense as the http request to get the OAuth settings is probably failing Probably for the same reason the login request fails Does your phone use a proxy or custom DNS server or settings?
sodoh.
sodoh.OP3y ago
I did have a private dns configured on the phone, but I removed it and unfortunately didn't help. nice catch, though. It did give me hope for a second 😅
jrasm91
jrasm913y ago
Cached maybe?
sodoh.
sodoh.OP3y ago
i see that cached dns on android is only on the browser-level, would it affect the app login? I did uninstall & restart though also cleared the cache for the app & browsers but nothing new
jrasm91
jrasm913y ago
Probably not that then 😁
Marvin Jérôme Stephan
Bumping this thread since i'm facing the same issue: Can access photos.jeromestephan.de on the web no problem, but with the android app I'm getting a 404 not found as it tries to hit photos.jeromestephan.de/api/.well-known/immich
jrasm91
jrasm912y ago
Anything in the mobile app logs?
Marvin Jérôme Stephan
Sadly nothing at all. Just if I'm running httpry on the server I see that that it tries to hit that and gives back a 404 update: After using https instead of http it seems to work. Sometimes its the little mistakes...
sodoh.
sodoh.OP2y ago
Nice that you solved it! I still have the same while using https

Did you find this page helpful?