HomeAssistant access denied after short time.
See original GitHub issueHome Assistant Android version: 2021.9.0-full
Android version: 11
Phone model: PocoPhone X3 NFC with LineageOS 18 MicroG
Home Assistant version: core-2021.9.6 supervisor-2021.09.0
Last working Home Assistant release (if known): No change in versions. Same as above.
Description of problem: The companion app seems to login fine. Then after a short while of completely normal use (varies from few to 20 seconds) I get the Unable To Connect to Home Assistant. Neither via Nabu Casa or locally logon.
Traceback (if applicable):
No crash... no traceback.
Screenshot of problem:
Additional information:
Important Logline It seems it is related to:
09-14 09:54:49.391 4769 4769 I chromium: [INFO:CONSOLE(1)] "Uncaught (in promise) SecurityError: Failed to construct 'WebSocket': Access to this address is not allowed.", source: https://mynabucasaidstringhere.ui.nabu.casa/frontend_latest/core.9dd583b2.js (1)
After which I get a LOT of these, obviously.
09-14 09:54:57.454 4769 4781 E mpanion.androi: failed to connect to jdwp control socket: Connection refused
See logfile for more detail. homeassistant_companion_log_8-14-2021_9-55-12.txt
Related Seems to be related to the Bromite Webview. https://github.com/bromite/bromite/issues/822 A security measure: “@cvsickle Bromite does not allow a non-local address to access a local address; this is by design and not a bug in Bromite.”
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top GitHub Comments
Bromite is blocking things in the HA frontend which is causing this issue and as the app is just a webview this means that Bromite is doing non-standard things. Your screenshot is of the HA frontend and not a screen that the app provides. There is a reason why we support googles version and it just works without needing to do any changes. Not to mention the majority of users already have this on their device. Custom ROMs also ship with non-standard versions of webview which cause other issues and those users switch to supported webview also. Simply switching to Googles version just works without any changes, so we stick to supporting that. If you want to use non-standard webview that is your choice but you are on your own there.
So insecure methods are a standard practice? Thats an easy copout.
Seems trivial to check if the http ot https protocols are used in the installatie and initiate the correct protocol. If I can fix this myself, do you consider accepting the commit even if bromite is not supported? (bromite is still chromium which is google webview…)
Still paying for this thing you know… with nabu.casa account, would be nice to have a bit better reason than just “not supported use X”. There is a reason I do not use google stuff.