Android APP "Unable to connect to Home Assistant"

my to have the same problem with mi redmi 8, work for few hours and then stop working in the phone

I’m currently setting up external access in the app for the first time and I seem to be experiencing this issue as well.

The app works fine through the internal URL, and home assistant works fine through a webbrowser on the remote URL ‘remotely’.
It is only remote access through the app that seems to fail and I think it has to do with authentication.

I filed a bug for it:

I’ve been having a lot of issues with this as well.

I’ve found that restarting the core from the command line resolves it for a while, but it reoccurs fairly frequently.

I see your bug report was closed Johan - I have this problem but only with android - iOS and web work fine. I use caddy as my reverse proxy. Any further ideas?

For me, the issue was some sort of “bot”-detection in Nginx.
Because of the inconsistent/changing value of the “user-agent”-header, it considered some HTTP requests from the app as coming from a bot and blocked those requests.

I had to disable those protections in the Nginx config to get the app working.
Webbrowser access was fine with or without those protections on. Only the app was affected.

Check your certificate. This happened to me on Android EMUI 10 the day my HA certificate was set to expire.

Same problem here, cannot connect from Android phone. No matter if I use the browser or the app and no matter if I try within LAN or world (with port forwarding). iPad iOS works fine.

I tried all the “suggestion” in the thread but still not works in local (external via DDNS is ok).

Same here. Works when outside the network absolutely fine, and all fine on various computers and iOS devices. What is going on with Android not being able to connect? I’m using caddy in front as a reverse proxy, but have that set up correctly in HomeAssistant which is working on it’s default port but with my own subdomain pointed to the reverse proxy correctly - and nothing has changed in caddy which was working before - and it’s working fine for all other services which I run in docker (and for other devices using home assistant). Google Assistant also works perfectly.

Any ideas? So frustrating. Feels like some sort of network setup silly-ness, but I can’t for the life of me figure it out! :frowning:

Home Assistant 0.115.6
Supervisor Version 245
No revers proxy, only port forvading. Own domain. Can open HA thrue chrome from my android phone, but HA app show same error as Mahko_Mahko.
What i try to do: reinstall app, clear app cache, reboot my phone, reboot HA.
Some logs:

> 2020-10-04 17:08:13 DEBUG (MainThread) [homeassistant.components.http.view] Serving /auth/providers to (auth: False)
2020-10-04 17:08:13 DEBUG (MainThread) [homeassistant.components.http.view] Serving /auth/login_flow to (auth: False)
2020-10-04 17:08:28 DEBUG (MainThread) [homeassistant.components.http.view] Serving /auth/login_flow/7d4e601a134245ddadc15d5ee8544606 to (auth: False)

p.a my wife’s and dother’s mobile apps on androids phones works fine

It happends to me too. With different phones.
I solved it just removing the port from the URL ->