Android APP "Unable to connect to Home Assistant"

Same problem to me.
Since I installed duckdns+let’sencrypt no more connections with the ha android app.
net::ERR_CONNECTION_REFUSED

Opera/ chrome- browser works well, on W10 too, but in local network only.
Strange behaviour.
Anyone a good idea :bulb:? Help appreciated.

2 Likes

I’m now running into this issue on android. I’ve even done a full factory reset of my phone and tested this with an older phone where HA was setup on it did a wipe of the cache/storage and I can now reproduce this error. Starting to wonder if its something in HA itself. Doesn’t matter which method I use to connect to my HA instance they all return the same error.

Ran into the same problem, only on IOS. Got send on a red herring quest, as i just changed my router. As it happened it wasn’t the router that sparked the issue.

I’m using a Synology NAS with docker to run HA, and i’m using the Synology reverse proxy to make it SSL. After reading this topic, I remembered i set the SSL profile level to “modern compatibility”. After setting it back to “normal compatibility” the app started working again.

1 Like

I’m one step further now and get the message my ssl- certificate is not valid.
But only if I use Wireguard, without no connection at all.

Hi everyone,
I have read through the thread and tried some of the steps but I do not see anything recently for this. I am on HA version :core-2021.7.2

I have now noticed that I am unable to connect to HA from the Android Companion app when I am not on my local network. I am using DuckDNS and NGINX installed add ons are on the latest release.

I now have to enter my local IP address “http://192.168.xx.xxx:8123/” into the companion app on my phone and it works when I am connected to my local wifi but when I put the DuckDNS address, which I had setup before I am unable to connect. I get the following error - “400:Bad Request”

Does anyone know the steps involved in me getting this to work externally outside my wifi network?

This is how I had it before with DuckDNS

https://xxxx.duckdns.org:8123/

I have found this in my log.

Logger: homeassistant.components.http.forwarded
Source: components/http/forwarded.py:91
Integration: HTTP (documentation, issues)
First occurred: 1:32:22 PM (2 occurrences)
Last logged: 1:32:27 PM

A request from a reverse proxy was received from 172.30.33.2, but your HTTP integration is not set-up for reverse proxies.

I found a thread that assisted in resolving my issue.

been dealing with this for a few weeks. Will allow me to setup the app and get notifications, but i cant connect when i try in the app.

Had issues too; selecting a Lovelace View did the trick for me. Hope it helps you too.

http://192.168.1.136:8123/lovelace/lights

I keep getting “Unable to connect to Home Assistant.” in the app and “Your Internet access is blocked” in my mobile web browser (which has no trouble loading other sites). Everything works fine in my desktop’s web browser.

Local traffic should not be routed through my V.P.N. but I have not confirmed it yet. I tried setting the Internal Connection URL but that didn’t help either.

I noticed that the app shows “Web page not available” with the url sometimes showing just the protocol, address, and port and other times also trailing “?external_auth=1”. Including that parameter in my desktop’s web browser returns 404. Not sure if that’s supposed to work.

This may or may not be related but the app behaviour is very eratic. Sometimes it takes a few seconds to detect the error, sometimes is doesn’t. Sometimes I can open the settings menu, sometimes it doesn’t open. I often get “Home Assistant isn’t responding” messages, but the app seems to work fine if I choose to “wait” for it to respond. There is usually (but not always) an option to refresh with either the external or internal address, but never both. It seemed to change once when I set the internal address but it never changed again even after I removed that address.

UPDATE: The issue was that Android’s setting to “Block connections without VPN” was enabled. I assumed that my V.P.N. app’s feature to bypass for local traffic and/or not secure specific apps would also bypass this block, but apparently not. Hopefully this is useful to others.

It seems that this may be an issue specific with my device. It is working fine on a Samsung Note 8 I have, but not on the OnePlus7T I am using as my phone.

I have to imagine there is a setting I am not seeing that is causing this issue on the phone. Still able to receive notifications but not access the dashboards

best advice i can give is to make sure android system webview is up to date and check that chrome is up to date as well. If you are on a custom ROM make sure to switch to googles version of webview as any other version is incompatible.

No luck. Anyway to track error logs?

App logs are under App Configuration, you can check HA server logs and there is also chrome remote debugging to look at the frontend errors but that will require using a debug build of the app and a bit of fiddling. App Configuration and HA server logs are your best bet. Also referring to the troubleshooting sections of the docs may be of help if you haven’t looked at them all yet.

I have the same problem.
My situation:
Huawei MediaPad T3 Android 7.0 HomeAssistant 2021.9.0
HomeAssistant 2021.9.3 installed on Proxmox

I can login by Google Chrome with any device including Huawei, but I can’t login by HomeAssistant app on it. If I gave wrong password, notification appears in HomeAssistant, but if I gave correct password I have an error on app and no any logs on HA.

I have 3 phones connected with HomeAssistant and everything works fine. I tried new account, different WiFi network, wiping any data from app settings in android. Nothing works… Can someone fix this?

I have the same problem.
My situation:
Redmi Note 4 Android 7.0 HomeAssistant 2021.9.0
HomeAssistant 2021.9.3 installed on Raspberry Pi, Operating System: Home Assistant OS 6.3, core-2021.9.5, supervisor-2021.09.0,

I can login by Google Chrome with any device (including my phone (Redmi)), but I can’t login by HomeAssistant app on it. Also, if I gave wrong password, notification appears in HomeAssistant, but if I gave correct password I have an error on app and no any logs on HA.

make sure that chrome and/or android system webview are up to date. If you are on a custom ROM then you need to ensure googles version of webview is being used.

Android system webview is up to date, ROM is original from Huawei

are all of you guys using a proxy? If you take it out of the loop and make it a direct connection is it working?

For my phone ROM is original, I don’t use proxy.

since you guys are unable to get past initial onboarding can you get the ADB logs off the device itself? We should see some error in there that might give us a clue. There are some apps in the play store but keep in mind they will require you to plug your device into a computer to get full logging details. Once there you can reproduce the issue and hopefully logs will tell us whats going on.