The unable to connect issue started for me yesterday. It was either caused by:
- Updating HassOS to v7
- Updating Hass Core to 2021.12
- Applying Android 12 December security patch to my pixel 5.
I cannot connect anymore when I’m on my wifi, both internal & external url fail. Connecting over celular data coming in “from the outside” works.
On my Tablet (Android 10), the Hass Android app works without a problem. It even makes use of the new 2021.12 feature to use a user that can only access the internal url. On the Pixel 5 app I use a different user, that is allowed to access externally.
Both have the same latest beta version of the companion app.
This is the error in the webview behind the error pop-up:
Web page not available
The web page at http://<internal_domain>:8123/?external_auth=1 could not be loaded because:
net::ERR_NAME_NOT_RESOLVED
And this is (I the the relevant snippets) from my app log:
12-16 08:13:20.824 16322 16348 D WebSocketRepository: Sending message number 2: {type=get_config, id=2}
12-16 08:13:20.835 16322 16322 I WM-SystemFgDispatcher: Started foreground service Intent { act=ACTION_START_FOREGROUND cmp=io.homeassistant.companion.android/androidx.work.impl.foreground.SystemForegroundService (has extras) }
12-16 08:13:20.844 16322 16322 D UrlRepository: localUrl is: true and usesInternalSsid is: true
12-16 08:13:20.844 16322 16322 D UrlRepository: Using internal URL
12-16 08:13:22.198 16322 16322 D WebviewActivity: Authentication successful, unlocking app
12-16 08:13:22.231 16322 16322 D UrlRepository: localUrl is: true and usesInternalSsid is: true
12-16 08:13:22.231 16322 16322 D UrlRepository: Using internal URL
12-16 08:13:22.551 16322 16382 E WebSocketRepository: Websocket: onFailure
12-16 08:13:24.560 16322 16348 E IntegrationRepository: Issue getting new version from core.
12-16 08:13:24.564 16322 16351 D UrlRepository: localUrl is: true and usesInternalSsid is: true
12-16 08:13:24.564 16322 16351 D UrlRepository: Using internal URL
12-16 08:13:24.567 16322 16382 E WebSocketRepository: Websocket: onFailure
12-16 08:13:24.568 16322 16322 E WebviewActivity: onReceivedHttpError: errorCode: -2 url:http://<internal domain:port>/?external_auth=1
12-16 08:13:24.568 16322 16387 D UrlRepository: localUrl is: true and usesInternalSsid is: true
12-16 08:13:24.568 16322 16387 D UrlRepository: Using internal URL
12-16 08:13:24.570 16322 16351 E IntegrationRepository: Issue getting new version from core.
When pressing “Refresh External URL” (still via internal LAN) I get:
12-16 09:02:23.303 24009 24009 D UrlRepository: Using external URL
12-16 09:02:23.308 24009 24049 D OpenGLRenderer: endAllActiveAnimators on 0xb4000070ea16dba0 (RippleDrawable) with handle 0xb400006ffa1aa010
12-16 09:02:23.338 24009 24009 D UrlRepository: localUrl is: true and usesInternalSsid is: true
12-16 09:02:23.338 24009 24009 D UrlRepository: Using internal URL
12-16 09:02:23.711 24009 24143 D UrlRepository: localUrl is: true and usesInternalSsid is: true
12-16 09:02:23.711 24009 24143 D UrlRepository: Using internal URL
12-16 09:02:25.723 24009 24009 E WebViewPresenterImpl: Unable to retrieve external auth
12-16 09:02:25.730 24009 24009 D UrlRepository: localUrl is: true and usesInternalSsid is: true
12-16 09:02:25.730 24009 24009 D UrlRepository: Using internal URL
12-16 09:02:25.734 24009 24009 D UrlRepository: localUrl is: true and usesInternalSsid is: true
12-16 09:02:25.906 24009 24143 D UrlRepository: localUrl is: true and usesInternalSsid is: true
12-16 09:02:25.906 24009 24143 D UrlRepository: Using internal URL
12-16 09:02:25.907 24009 24009 E WebViewPresenterImpl: Unable to retrieve external auth
I didn’t change anything about my network. So my hunch is it’s either an issue with 2021.12 of HassOS 7…?
It’s not NAT loopback issue, as this is enabled by default on my USG.
When I replace my internal url with the ip address instead of the hostname, it works.
However I have no issue whatsoever to reach Hass internally via its internal hostname via anyother browser/device and as said the Android companion app on a different device.
Mmm, the internal hostname url also doesn’t work in a browser on the same device. When using a different device on the same network and wifi AP it works fine. So now I suspect the latest Android 12 update…
In the browser I get this error:
This site can't be reached
<internal hostname>'s DNS address could not be found. Diagnosing the problem.
DNS_PROBE_POSSIBLE
An Nslookup in a commandline window in Windows resolves the internal hostname just fine.
The DNS in Android is configured correctly too, it’s the gateway address of the vlan (x.x.x.1 of the vlan subnet).