android: App fails to connect

Home Assistant Android version: Latest October 16 2021 Beta

Android version: 10

Phone model: Huawei P30

Home Assistant version: 2021.10.6

Last working Home Assistant release (if known):

Description of problem: Android app fails with connection problems while the Chrome browser connects without problem on the same device and WiFi network. No crash happens.

Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):


Screenshot of problem: image

Additional information:

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19 (10 by maintainers)

Most upvoted comments

So it turns out my NAT reflection was actually broken, i’ve fixed it and now it works again. But the strange thing is that it had been working flawlessly before without reflection for a long time and in any case, with a proper split DNS setup, it shouldn’t even be necessary.

I still think there is an issue with how the app decides on where and how to connect to home assistant, even though i was able to work around it. It should be able to honor the local dns fully without issue and there has to be something strange going on for it even being able to resolve the external ip like that.

The only time i’ve had issues like this before was when chrome (on PC) rolled out the secure dns feature by default, bypassing my local resolver completely. Is it possible that the webview you are using is doing something similar?

Like the creator of this issue, i have zero problems when connecting through the browser of my phone whether i’m using mobile data or wifi.

Connecting to HA via the browser is not the same as how the app communicates with HA. The app uses authenticated webview as well as other API’s to login and make the connection. I suspect your failed to connect issue is due to not everything being routed properly. If you bypass your setup and do a direct connection does it work?

https://developers.home-assistant.io/docs/api/native-app-integration/setup#authenticating-the-user

Failed to connect issues are not one that we can actually solve, those are usually internal networking issues that need to be solved on your end.