Open mx4k opened 1 year ago
please don't skip over the traceback section from the template, its going to be very important in helping with this issue.
My bad. I've reentered the template.
Thanks, we will still need the on device logs containing the crash. As the app is crashing the logs will need to be taken from Logcat. You can use either Android Studio or an app like Logcat Reader. Both of which will require you to use USB on a computer. From there you can reproduce the crash and get the log so we can see where it is failing to correct the problem.
Logcat output added.
the logs are filtered and as a result are missing the actual traceback, if you try to search for the word "crash" you should see the actual error above or below it. You will need to find the time around when the crash occurred to better pull the actual error.
Thanks for your patience. I've pasted the unfiltered log here https://justpaste.it/al1di
Well i dont see an actual crash in our code but given that its a safe browsing issue we may need to adjust
https://developer.android.com/develop/ui/views/layout/webapps/managing-webview#safe-browsing
Can you tell me what the behavior is when you launch the app? Are you presented with a pop-up or anything or does it crash as soon as you open the app?
Looking at the above docs you should get some kind of prompt.
When an instance of WebView attempts to load a page that has been classified by Google as a known threat, the WebView by default shows an interstitial that warns users of the known threat. This screen gives users the option to load the URL anyway or return to a previous page that's safe.
a recording of what happens would also be helpful :)
https://user-images.githubusercontent.com/8719632/224812573-ef9735df-5554-4087-a198-b56e793d379d.mp4
The splash screen appears for about a second and dissappears suddenly. That's it.
By the way, I can reproduce this behavior on an Android Tablet (Xiaomi Pad 5).
Looks like the crash is related to the app getting a segfault for webview, it looks like webview for some reason on this device is not handling the system based pop-up like it should be here.
Personally speaking I am not sure if we should disable the safe browsing check or not
I've tested the behavior on three different devices now. It's always the same. There is no prompt.
Usually you aren't connected to an HA instance that doesn't belong to you. So maybe Safe Browsing doesn't make a lot of sense in this case?
Which version of the Android System WebView are your devices using (check in Settings > Apps).
Can you login + register without the app crashing? You'll have to delete all data for the app to test this if the issue started appearing after setting up the app in the past.
Usually you aren't connected to an HA instance that doesn't belong to you. So maybe Safe Browsing doesn't make a lot of sense in this case?
This is a slippery slope to disabling all security features "because it your server". The app should promote safe defaults.
Android System WebView 111.0.5563.57.
After deleting the data of the app I see the frightening red Google Safe Browsing prompt. I can login after skipping it. But later the old behavior seems to appear again.
Trying to replicate this using test pages from https://testsafebrowsing.appspot.com/ and loading them using Chrome remote dev tools, but no crashes so far :(.
Same issue for me ! Maybe another information : HA companion app service seams working because GPS position and all others information of android device are sent and refreshed to HA. It seams only the launching of HA app and app frontend which is broken with SSL phishing google warning
Tried replicating this again, but this time by loading the test url here, still no crash :(
The only somewhat relevant issue I can find is related to HTTP basic authentication changes in WebView 110, which seems unlikely to be the cause here.
Just wanted to add my voice to this and +1 the issue.
Android WebView: 114.0.5735.147 HA Android App: 2023.6.0 full Utilise DuckDNS + LetsEncrypt SSL
As of July 1 2023 the same issue occurs for me. I go to the HA Companion app. I am already fully logged in, but as soon as I try and click anything in the app the app crashes. The first time this occurred a pop up from the Android OS appeared and I think it said something like "WebView doesn't work with this app do you want to stop WebView" or something similar.
If I go to my DuckDNS website in my browser I get the Google SSL red warning. I can click through and say disregard and the HA Dashboard loads perfectly fine and is usable in the browser. Just not the app.
I have another Android mobile and Tablet and both have this same issue. As of 1 day ago.
If you need logs please give me some instructions so I can find what you need and I can post it back here.
I submitted my DuckDNS site to Google Search so that they would hopefully white list it to remove the red unsafe warning screen. This thankfully worked and I can now use the Android app without issues. But I think this still needs to be more robustly fixed.
FYI here is the pop up that first appeared when I opened the app the very first time the crash happened. Even after uninstalling this WebView service the issues with the HA app still occurred.
I try to describe my problem which seems to be the same as yours. The app was working fine but after updating the certificates it stopped working. I also use duckdns.org, web access works fine (after deleting the cache to update the certificate) but the app crashes after the "Google Safe Broswer" warning. I tried to delete the cache of both the App Companion and WebView but the app crashes immediately after showing the dashboard. I hope someone can find the solution to this problem :(
I try to describe my problem which seems to be the same as yours. The app was working fine but after updating the certificates it stopped working. I also use duckdns.org, web access works fine (after deleting the cache to update the certificate) but the app crashes after the "Google Safe Broswer" warning. I tried to delete the cache of both the App Companion and WebView but the app crashes immediately after showing the dashboard. I hope someone can find the solution to this problem :(
Unfortunately they don't create a workaround for the Android app/devices while this is a common problem.
The only thing you can do is to whitelist the domain with a Google request. In my experience they review the request quite fast.
I submitted my DuckDNS site to Google Search so that they would hopefully white list it to remove the red unsafe warning screen. This thankfully worked and I can now use the Android app without issues. But I think this still needs to be more robustly fixed.
FYI here is the pop up that first appeared when I opened the app the very first time the crash happened. Even after uninstalling this WebView service the issues with the HA app still occurred.
Can you step-by-setp describe how to "submit my DuckDNS site to Google Search"? I tried to verify property in the Search Console, but none of the options seems suitable for Duckdns:
As I am not de "real owner" of the site, I can´t use any of these methods. Is there any other way?
Thanks in advance!
@Cantabron If you have a domain like xxxx.duckdns.org, you can verify using a TXT record and then update your xxxx.duckdns.org as described https://github.com/home-assistant/home-assistant.io/issues/17509#issuecomment-822000734 So, go on Google Search Console, get your DNS TXT record and then update your duckdns.
Home Assistant Android app version(s): 2023.1.1-full
Android version(s): 13
Device model(s): Oppo Find X5 Pro
Home Assistant version: Home Assistant 2023.3.3
Last working Home Assistant release (if known):
Description of problem, include YAML if issue is related to notifications: App crashes because the main domain of my HA is listed at "Google Safe Browsing" as malicious.
Companion App Logs: Please find the logs here: https://justpaste.it/al1di
Screenshot or video of problem:
Additional information: