question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App fails to connect

See original GitHub issue

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:

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:19 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
bashmdcommented, Oct 28, 2021

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?

1reaction
dshokouhicommented, Oct 28, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

If you can't connect to the App Store, iTunes Store, or other ...
Learn what to do if you see a "Cannot connect" message, if an app won't load anything, or if content stops downloading.
Read more >
Fix internet connection problems on Android devices
Open your Settings app and tap Network & internet or Connections and then Airplane Mode. Depending on your device, these options may be...
Read more >
My apps show connection error even though I'm conected to ...
I have no idea what's going on. I have two mobile games that keep telling me connection error and will not load. I...
Read more >
9 Methods to Fix the "Cannot Connect to App Store" Error
Steps to Fix “Cannot Connect to App Store” Error on iPhone and iPad · Turn Off/On Airplane Mode · Turn Off/On Mobile Data/Wi-Fi...
Read more >
Troubleshooting the Phone Link app - Microsoft Support
I'm having problems connecting my Android device and PC.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found