Home Assistant android app does not connect externally

The Home Assistant URL is “https://home.1.mydomain.com” (which runs nginx which proxies this to “http://aikhasse:8123”).
The home wifi is “mynet,mynet5”.
The Internal connection is “http://aikhasse:8123”.
This works fine when connected to Wifi but it does not when 3G/4G.

At the same time the “https://home.1.mydomain.com” URL DOES work fine from Firefox on the very same phone via 3G/4G.

The https certificate is fine (letsencrypt, 36 days until refresh), Firefox is happy but the app is not.

It really feels like the app cannot see if Wifi is connected or not as “https://home.1.mydomain.com” works if i use it for external and internal access.

What do I miss?

I wonder if the problem is that the internal connection does not use (or need) the SSL certificate, and when it tries to switch to the external URL - it’s not expecting the certificate or something like that?

I use the external URL for the internal, and the nabuacasa URL for external.

if you remove nginx from the loop does the app connect? If so that tells you the nginx settings are off, there is a troubleshooting section that may be of help here: https://companion.home-assistant.io/docs/troubleshooting/networking#addendum-reverse-proxy-via-nginx

nginx is not a suspect as firefox works just fine. For now I solved the problem by clearing all storage and cache for the app on my phone and things seem working again with the external url.

1 Like

The app actually connects to HA in a different manner than a browser. A browser is only useful to show if something doesn’t display right in the frontend when compared to chrome (we dont compare to firefox because the app uses webview which is based off chrome). The app uses external auth for authenticated webview as well as the REST API and webhooks for communication.

Ah weird, if it happens again be sure to check App Configuration > Logs to pull the on device error message so we can see what it was.