Android APP "Unable to connect to Home Assistant"

I had this issue, too. Very suddenly.

I removed the cache and data. But somehow there is still data. I reinstalled the app. Some config is still there. Nevermind. I use DuckDNS. I used dnschecker.org and saw my DNS is fine worldwide - except in my country. The app can connect to HA if I use VPN on my phone. But there is no problem in the browser with the same address. Why does the app need VPN (in my case)?

On Android: Updating Android web view solved the problem for me.

This worked for me, had the same issue as discussed above. Thanks.

Hi everyone,
I had the same issue and it drove me crazy, I uninstalled the Chrome app from my mobile phone (iPhone 12 Pro) as I don’t really need it and it solved the issue so far. Not sure if it’s going to be a stable solution. Will keep an eye.
I would say this is not the ultimate solution as the solution should solve the root cause. I have seen something related to Nginx in my Cloudflare config (FYI, my setup is a Cloudflare tunnel on my own DNS), I haven’t touched this config yet as I will see how it goes with deleting Chrome for a few days, then I will install it again to see if the issue comes again then will try the Nginx config from Cloudflare. I will keep my reply updated.

Also a quick reminder to anyone stumbling on this to check any VPN connections you may have. I installed a home assistant update and afterwards had an issue connecting form an Android phone, convinced that the new software was a fault… A bunch of debugging and I eventually realised that I had left my VPN client connected.

What was causing the issue for me was running two instances of homeassistant on my network.
I was in the process of migrating from HA in docker on my desktop PC to HA yellow and both where running at the same time.
After shutting down the HA container, the issue disappeared.

1 Like

On the Android app, I went from going directly to homeassistant.local:8123 to using a reverse proxy domain. Got the unable to connect error. Clearing cache and data fixed the issue.

Thanks for this!

This ended up being my issue as well. Was only happening with ONE device in the entire house. Pinged my phone from HA and it worked…

Guess this is still an issue? I had no access available on my phone or tablet with the android app 2 days ago. But could access on a browser.
Fix for me, clear app cache & data, uninstall app. Install and set up. Now working normally on both phone and tablet.

it will always be an issue for some at different times, most if not all of these are for the user to solve as the server setup is not something the app has control over. The best the app can do is notify you of the error and to follow troubleshooting steps such as clearing data like you did to solve the issue (other times its been a valid certificate etc…). There are somethings proxy/dns related that get stored in places of WebView that won’t get cleared out until data is cleared. Browsers will behave differently than the app in this regard but knowing it can connect in a browser should be a clue as to where the issue may be as you saw clearing data helped.

Thanks for the reply. It was fine after the other nights fix, but I get home tonight and can’t use the app, same steps refused to work tonight.
Tried accessing on a browser and can’t access there either, tried on 2 different browsers on pc and on chrome on my phone. I’m only 1 week in with my new HA Yellow set up, and know Very Little about it all. Total newbie.
One hell of a learning curve!

1 Like

Hi, I’ve been having this issue of the connection not working from both the HA app and via browser, but only via one tablet (the one mounted to my wall…). All other devices (pc/iPhone etc) work fine. Weirdly, restarting my router seems to fix the issue for a random amount of time (could be an hour? Could be a week). Any ideas?

Same issue here.
I’ve have had one tablet working for 3 months with no issues and this started a few days ago.
It runs 14h a day, and happens about 10 times a day.
There is no connection problem because I have a new tablet (exact same model, same configuration, same OS version, etc.) and side by side one has the error and the other presents no errors.

Could be something reaching its limits? Loop, logs, any memory allocation or counter?

Also, if you inmediatly click retry it works properly.
Could some correct this connection error dialog and be removed automatically when the connection “comes back” instead of staying there for hours?

solved it for this noob on his first foray into home assistant, thank you!

Hey there so I’ve been using HA(and companion app on 3 Android phones) for over an year now. Since the last update I am no longer able to reach the HA with the companion app on all the phones from outside of local network.
I am using Duckdns for outside access and nothing apart from an update is changed.

At first no issue was reported anywhere but after a reinstall on one of the devices I started seeing the following error

Error Code: -6 
"net::ERR_CONNECTION_REFUSED"

I trying some of the “fixes” that I managed to see but none of them worked.
Has anyone experienced the same and perhaps has a solution?

1 Like

interesting read, i cant connect through vpn too.
i thought i was the only one or my vpn connection (wireshark on router or as haos addin) was faulty.

i also having issue with connection on android app. i also using duckdns to access HA at home.
what i found out that
on mobile phone

  1. on mobile phone web browser, after i disable all security and privacy setting on the web browser, i able to connect directly to homeassistant.local:8123, that after ignoring to all the warning
  2. but on HA companion app. connection to HA can only be done thru duckdns only. any attemp to by adding connection thru internal local network either by adding the wifi ssd or or together with the address homeassistant.local:8123, i will no able to connect at all.

i believe it is issue with the companion app.

so even when i am at home, i have to connect to duckdns.org instead of connecting to homeassistant.local.

Remember not to use https locally as that will not work. The companion app expects a valid certificate and does not bypass certificate errors.

i tried both still doesn’t work.

what is the actual error message in the pop-up it should be somewaht descriptive? If it generic click on Settings on the popup go to Troubleshooting > Logs and look at the failure