home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
3.96k stars 2.69k forks source link

Webview crashing/reloading on Home assistant App #21900

Closed bambucha3 closed 1 week ago

bambucha3 commented 1 week ago

Checklist

Describe the issue you are experiencing

I have three NSPanel PROs, running Android 8.1 and running Home assistant app 2024.7.3-minimal. I am using Sections view on all of them. Since the update, the panels have been restarting/reloading the dashboard in an infinite loop. Reverting to 2024.8 fixed the issue.

Describe the behavior you expected

Not crashing.

Steps to reproduce the issue

  1. Opened sections dashboard on device

What version of Home Assistant Core has the issue?

core-2024.9

What was the last working version of Home Assistant Core?

core-2024.8.3

In which browser are you experiencing the issue with?

Home assistant app 2024.7.3-minimal

Which operating system are you using to run this browser?

Android 8.1

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

zamansoum commented 1 week ago

seems related to #21879

cgilis commented 1 week ago

Indeed I have the same

bambucha3 commented 1 week ago

seems related to #21879

Yes, looks the same. Bad thing is, i cant upgrade webview on my NSPanels without rooting them (or so i understand)..

cgilis commented 1 week ago

seems related to #21879

Yes, looks the same. Bad thing is, i cant upgrade webview on my NSPanels without rooting them (or so i understand)..

You can, with this guide: https://github.com/seaky/nspanel_pro_tools_apk?tab=readme-ov-file#install-custom-webview You override the existing webview.

rouxdoo commented 1 week ago

I have the same issue on an older iPad Pro that I'm using as a kiosk. If I go to a dashboard with sections view it will crash loop then fail to load on Safari and HA app both. I cleared all cache and website data with no change in behavior. This does not happen on iOS or macOS, only on iPadOS (16.7.10).

Tykwondo1 commented 1 week ago

looks the same

miketague commented 1 week ago

Exactly the same issues on all my Fire tablets Happens in Fully Kios Browser, the HA app and Silk browser. But not Firefox, Firefox seems to load fine. Works fine on both Safari and HA app on my iPhone.

gitzappo commented 1 week ago

I'm facing the same issue using HA Companion App 2024.8.1. (2024.791). Dashboards using the sections feature leads to continuously reloading the page if HA core 2024.9.0 is installed.

technoman63 commented 1 week ago

I have the same issues on my Sonoff Nspanel in Fully Kiosk Browser and the HA app, all time the apps crash.

lviciedo commented 1 week ago

xactly the same issues on all my Fire tablets running Fully Kios Browser

Tykwondo1 commented 1 week ago

I have two fire tablets and they are on my IoT network where I block the internet so my tablets were not up to date. So I connected the tablets to my network with the internet and checked the updates, there were 24, I did the manual updates by pushing the update button several times until zero. I put my tablet back on my network without internet, relaunch Fully Kios Browser, AND VOILA , I fix my issues

catdogmaus commented 1 week ago

Same with my Yoga tab. Issue is with Sections, when I am fast enough to open any other view before sections loads, everything is fine. Switching to sections dashboard again crashes it immediately. Kiosk mode per se in my opinion has nothing to do with it.

silamon commented 1 week ago

There's probably something going on that older browsers cannot parse that was introduced as new feature in the sections view. If there's anybody who can reproduce this in a browser (not the companion app), we do have daily demo deployments at https://github.com/home-assistant/frontend/actions/workflows/demo_deployment.yaml?query=event%3Aschedule. You can click one open, then see the url of the frontend at that day. Finding the oldest where everything is working, would help towards resolution.

At this point, if you're experiencing the same issue but cannot add more information to what is already provided, just give a thumbs up to the initial post.

alexpfau commented 1 week ago

Same issue here with fully kiosk running on a Fire tablet

rchiileea commented 1 week ago

seems related to #21879

Yes, looks the same. Bad thing is, i cant upgrade webview on my NSPanels without rooting them (or so i understand)..

You can, with this guide: https://github.com/seaky/nspanel_pro_tools_apk?tab=readme-ov-file#install-custom-webview You override the existing webview.

webview update does not fix this, fully still crashes, chrome has the occational crash on android devices (aw snap message) so something with the sections update has caused this...

also there will be 1000s of users out there with home assistant that cant update webview.

EvanMulawski commented 1 week ago

@silamon I can't seem to find a demo deployment that causes the crash. Currently testing some different scenarios locally.


adb logcat output, crashpads omitted:

09-07 14:02:23.035 10162 10162 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 10176 <<<<<<
09-07 14:02:23.135 10162 10162 I /system/bin/app_process64: The ClassLoaderContext is a special shared library.
09-07 14:02:23.136 10162 10162 I /system/bin/app_process64: The ClassLoaderContext is a special shared library.
09-07 14:02:23.151 10162 10164 I /system/bin/app_process64: Bumping SignalCatcher priority from 7 to 10
09-07 14:02:23.186 10162 10162 D AmazonDisplayManagerGlobal: Successfully loaded all classes
09-07 14:02:23.186 10162 10162 D AmazonDisplayManagerGlobal: Successfully loaded all fields
09-07 14:02:23.199 10162 10162 D AndroidRuntime: Calling main entry org.chromium.components.crash.browser.CrashpadMain
09-07 14:02:23.204 10162 10162 W linker  : Warning: "/system/app/AmazonWebView/AmazonWebView.apk!/lib/arm64-v8a/libwebviewextchromium.so" unused DT entry: unknown processor-specific (type 0x70000001 arg 0x0) (ignoring)
09-07 14:02:23.537 10162 10162 W chromium: [0907/140223.536754:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.533 10162 10162 W main    : type=1400 audit(0.0:1564): avc: denied { getsched } for scontext=u:r:untrusted_app:s0:c176,c256,c512,c768 tcontext=u:r:isolated_app:s0:c8,c256,c512,c768 tclass=process permissive=0
09-07 14:02:23.537 10162 10162 W chromium: [0907/140223.537914:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.538 10162 10162 W chromium: [0907/140223.538211:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.538 10162 10162 W chromium: [0907/140223.538507:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.538 10162 10162 W chromium: [0907/140223.538726:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.533 10162 10162 W main    : type=1400 audit(0.0:1565): avc: denied { getsched } for scontext=u:r:untrusted_app:s0:c176,c256,c512,c768 tcontext=u:r:isolated_app:s0:c8,c256,c512,c768 tclass=process permissive=0
09-07 14:02:23.539 10162 10162 W chromium: [0907/140223.539903:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.540 10162 10162 W chromium: [0907/140223.540573:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.540 10162 10162 W chromium: [0907/140223.540886:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.541 10162 10162 W chromium: [0907/140223.541203:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.541 10162 10162 W chromium: [0907/140223.541548:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.542 10162 10162 W chromium: [0907/140223.541991:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.542 10162 10162 W chromium: [0907/140223.542396:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.542 10162 10162 W chromium: [0907/140223.542758:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.543 10162 10162 W chromium: [0907/140223.543146:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.543 10162 10162 W chromium: [0907/140223.543438:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.543 10162 10162 W chromium: [0907/140223.543874:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.544 10162 10162 W chromium: [0907/140223.544201:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.544 10162 10162 W chromium: [0907/140223.544580:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.545 10162 10162 W chromium: [0907/140223.544990:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.545 10162 10162 W chromium: [0907/140223.545283:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.545 10162 10162 W chromium: [0907/140223.545593:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.546 10162 10162 W chromium: [0907/140223.546034:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.546 10162 10162 W chromium: [0907/140223.546484:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.547 10162 10162 W chromium: [0907/140223.546992:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.547 10162 10162 W chromium: [0907/140223.547423:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.547 10162 10162 W chromium: [0907/140223.547807:WARNING:process_reader_linux.cc(95)] sched_getscheduler: Permission denied (13)
09-07 14:02:23.557 10162 10162 E chromium: [0907/140223.557640:ERROR:ptrace_client.cc(363)] Broker Open: access denied
09-07 14:02:23.606 10162 10162 F crashpad: -----BEGIN CRASHPAD MINIDUMP-----
09-07 14:02:23.675 10162 10162 F crashpad: -----END CRASHPAD MINIDUMP-----
09-07 14:02:23.676  1752  1752 W BSTN_MapClient: empty account, retry in 1000
09-07 14:02:23.707 10162 10162 E chromium: [0907/140223.707064:ERROR:socket.cc(182)] incorrect payload size 0
09-07 14:02:23.707 10068 10083 E libc    : failed to connect to tombstoned: Operation not permitted
09-07 14:02:23.707 10162 10162 D AndroidRuntime: Shutting down VM
09-07 14:02:23.951   653  9824 I ActivityManager: Process com.amazon.webview.chromium:sandboxed_process8 (pid 10068) has died: fore TOP
09-07 14:02:23.951  1806  1806 I Zygote  : Process 10068 exited due to signal 5 (Trap)
09-07 14:02:23.952  4435  4755 W cr_ChildProcessConn: onServiceDisconnected (crash or killed by oom): pid=10068 bindings:W  S
09-07 14:02:23.954   653  9824 W ActivityManager: Scheduling restart of crashed service de.ozerov.fully/org.chromium.content.app.SandboxedProcessService8 in 2000ms
09-07 14:02:23.957   653   675 W libprocessgroup: Failed to open process cgroup uid 99008 pid 10068: No such file or directory
09-07 14:02:23.957   653   675 E libprocessgroup: Error encountered killing process cgroup uid 99008 pid 10068: No such file or directory
09-07 14:02:23.968  4435  4435 E chromium: [ERROR:aw_browser_terminator.cc(156)] Renderer process (10068) crash detected (code 5).
09-07 14:02:23.971  4435  4435 W MyWebViewClient: onRenderProcessGone
09-07 14:02:23.971  4435  4435 E MyWebViewClient: The WebView rendering process crashed! Restarting app...
09-07 14:02:23.978   653  1712 W Eve     : MEMORY_LEVEL: [10068,0]
09-07 14:02:23.978   653  1712 W Eve     :   top=de.ozerov.fully/.FullyActivity launching=false
09-07 14:02:23.978   653  1712 W Eve     :   prev=de.ozerov.fully/.ScreensaverActivity screen_on=true thermal=0
09-07 14:02:23.978   653  1712 W Eve     :   adb=true downloading=false gamemode=true
09-07 14:02:23.978   653  1712 W Eve     :   memory=0 trim=5 available=2271932KB free=530520KB
EvanMulawski commented 1 week ago

@silamon I think I found it. When navigating to the demo Dashboard from another page (e.g. Map):

EvanMulawski commented 1 week ago

@silamon Narrowed it down to 4628, which is a Sections change (https://github.com/home-assistant/frontend/commit/5a229e3c8818d1298660d67b9982474e391d989a). 4627 does not crash.

gerben-f1 commented 1 week ago

Here it crashes also on a fire tab hd 10 Solutiin for me was updating the tablet with newest software version

7.3.3.0

EvanMulawski commented 1 week ago

Here it crashes also on a fire tab hd 10 Solutiin for me was updating the tablet with newest software version

7.3.3.0

Confirmed. Just updated to 7.3.3.0 (which must be very new - not even on Amazon's Fire OS updates page) and it is no longer crashing on HA 2024.9.1. Update 7.3.3.0 packages WebView v118 versus v114 in 7.3.2.9.

ViperRNMC commented 1 week ago

Here it crashes also on a fire tab hd 10 Solutiin for me was updating the tablet with newest software version 7.3.3.0

Confirmed. Just updated to 7.3.3.0 (which must be very new - not even on Amazon's Fire OS updates page) and it is no longer crashing on HA 2024.9.1. Update 7.3.3.0 packages WebView v118 versus v114 in 7.3.2.9.

thanks for the trigger webview, update webview on mij nspanel pro and now 2024.9.1 works great

bambucha3 commented 1 week ago

@ViperRNMC What version did you update to exactly, do you have a link? Did you just install an apk using adb? I had some trouble updating my nspanel pros.. would appreciate help :)

ViperRNMC commented 1 week ago

@ViperRNMC What version did you update to exactly, do you have a link? Did you just install an apk using adb? I had some trouble updating my nspanel pros.. would appreciate help :)

Newest with adb install

https://apkpure.com/android-system-webview/com.google.android.webview/downloading

bambucha3 commented 1 week ago

@ViperRNMC What version did you update to exactly, do you have a link? Did you just install an apk using adb? I had some trouble updating my nspanel pros.. would appreciate help :)

Newest with adb install

https://apkpure.com/android-system-webview/com.google.android.webview/downloading

Thank you, it installed fine with ADB. How do you then select which webview homeassistant app uses? In Dev options I only see the old one.

ViperRNMC commented 1 week ago

https://github.com/neoblackxt/AnyWebView/releases/ https://blakadder.com/android-panel-webview/

cgilis commented 1 week ago

@ViperRNMC What version did you update to exactly, do you have a link? Did you just install an apk using adb? I had some trouble updating my nspanel pros.. would appreciate help :)

Newest with adb install https://apkpure.com/android-system-webview/com.google.android.webview/downloading

Thank you, it installed fine with ADB. How do you then select which webview homeassistant app uses? In Dev options I only see the old one.

I have the same issue, because the firmware of the NSPanel is to new. :(

piitaya commented 1 week ago

I was able to find the issue. The fix should be part of the next patch. Thank you all for isolating the problem, it helped a lot for debugging 🙏.

cgilis commented 6 days ago

Any idea when the next patch will be released? Or is it always after 2 weeks?

miketague commented 6 days ago

Any idea when the next patch will be released? Or is it always after 2 weeks?

Hopefully not, as someone who uses control panels as a huge part of their smart home, this issue had crippled my whole setup. Given that Fully Kiosk on fire tablets is the most popular method of creating control panels, or at least this is what is looks like from all the youtuibe tutorials, there must be a lot of people in the same boat.

I'm persiveering using Firefox but the UI experience is just broken. Having something that worked so well be intuitively broken overnight is anoying my family and shattering the smart home bubble.

cgilis commented 3 days ago

Any idea when the next patch will be released? Or is it always after 2 weeks?

Hopefully not, as someone who uses control panels as a huge part of their smart home, this issue had crippled my whole setup. Given that Fully Kiosk on fire tablets is the most popular method of creating control panels, or at least this is what is looks like from all the youtuibe tutorials, there must be a lot of people in the same boat.

I'm persiveering using Firefox but the UI experience is just broken. Having something that worked so well be intuitively broken overnight is anoying my family and shattering the smart home bubble.

Looks like it..

Tip: You can easily downgrade back to the previous version if your panels are not working.

In HA (addon Advanced SSH & Web Terminal) type this: ha core update --version=2024.8.3