#Public hostname not working for mobile (android) app

1 messages ยท Page 1 of 1 (latest)

split condor
#

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.

umbral shard
#

You only need to set that env var if you're running a nonstandard deployment, a normal reverse proxy setup should work without it

split condor
umbral shard
#

Can you check whether it works if you add /api?

split condor
#

{"api":{"endpoint":"/api"}}

Already tried the /api before but didn't work.

near mirage
#

It is a valid SSL certificate, right? A bad certificate is one reason the web might work and the mobile app won't.

split condor
#

seems like it, yes

umbral shard
#

Is it also from a trusted CA?

split condor
#

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

umbral shard
#

Can you get the log file from the app and post it here?

split condor
#

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.

umbral shard
#

That's the spot. I'm pretty sure it's supposed to log auth problems ๐Ÿค”

near mirage
#

It's never logged auth errors iirc

near mirage
#

Which has made debugging this exact situation a pain.

umbral shard
#

Yup

near mirage
#

That might not write anything to the user log

split condor
#

Public hostname not working for mobile (android) app

split condor
#

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"

near mirage
#

Are you using any other DNS related service from cloudflare?

split condor
#

I would say no. Just a basic free account only for immich and authentik for now

near mirage
#

Does it work on the phone on mobile data, not on your local wifi?

split condor
#

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

near mirage
#

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?

split condor
#

nope

near mirage
split condor
#

sorry for the delay, had to troubleshoot why openssl wasn't running but after I figured that out looks like it runs normally

split condor
#

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.

near mirage
#

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?

split condor
#

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 ๐Ÿ˜…

near mirage
#

Cached maybe?

split condor
#

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

near mirage
#

Probably not that then ๐Ÿ˜

errant egret
near mirage
#

Anything in the mobile app logs?

errant egret
errant egret
#

update: After using https instead of http it seems to work. Sometimes its the little mistakes...