Android APP "Unable to connect to Home Assistant"

Cleared storage and cache and I’m still having this issue. Any other ideas?

3 Likes

Same as Nordic, tried the fixes and I still have the issue. It seemed to work reliably for me for a few initial months, and the issue surfaced for me a couple of months back. Using Chrome browser on Android has no problems. I’ve cleared data, re-installed, re-set up multiple times.

i have samsung s5 with lolipop 5.1 and after i change my domain name the app unable to connect. in chrome from andriod its work, also if i only set the local ip its also work with the app . its looks that the problem on the external address but in other phone have no issue.
any idea ?

Same problem on all four of the mobiles in my household. Has there been any solution posted here?

Not that I’m aware of. I’ve just reverted back to using Chrome on my mobile (Add it to your home screen so it acts a bit more like an app). No issues with that. But you lose some features.

1 Like

I think it had something to do with SSL. I recently enabled that for my ddns access and it seems to have hosed up my local access. If I only use my ddns access, it works fine. I tested that with only using mobile data and no wifi. If I try only wifi and local access, it gives me the unable to connect message

1 Like

I must be something to do with SSL. I have a Galaxy Note 10+ and the Home Assistant app was working just fine both inside and outside of my network until I added my SSL certificate to Home Assistant. Here’s my situation:

I have my own domain name purchased through Google, so no need for DuckDNS. I also have my own SSL certificate which I use for UniFi and now Home Assistant. Before installing my certificate, I could access Home Assistant via an internet browser or the app inside of the network using http://192.168.XX.XX:8123 and outside of the network using https://name.domain.com:port. I got annoyed with the warning the web browser would give me when outside of the network. So I installed my SSL certificate in HA. That fixed the issue when accessing HA from outside of the network.
However, I noticed that when accessing HA from inside of the network, I now had to use https for the internal address instead of just http. With https inside of the network, I can access HA. I just get the annoying warning from the web browser about the certificate, which I understand because the certificate is for the domain name and not the internal HA address.
Now, in the app, I cannot access HA from inside of the network. I even changed the internal address to https in the app settings. The app only works when inside of my network if I completely remove the internal address from the app settings.

I know some people say just leave it that way, but I would like to have HA be able to operate without the internet if need be.

I’ve tried just about everything. I’ve reset the app. I’ve uninstalled and reinstalled the app. It’s got to be something with SSL. When I removed the certificate from HA, the app worked again from within the network with the http internal address.

2 Likes

I have a similar scenario to yours…

Same problem. If reinstall works ok 1 day.

I have a similar problem. I was able to use the android app and my desktop Windows 10 no problem. Then I changed my router to an access point and the Android app would no longer connect. I have no trouble connecting with the windows 10 machine.
Bob

Same problem

Same problem…

Try updating android web viewer on your device

Been doing that. Still nothing.

It’s amazing. All of these updates to HA to the app lately and this issue STILL has not been fixed.

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

1 Like

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: https://github.com/home-assistant/android/issues/798

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?

1 Like

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.

1 Like