wallpanel-android icon indicating copy to clipboard operation
wallpanel-android copied to clipboard

WallPanel does not stay open reliably

Open mag1024 opened this issue 3 years ago • 14 comments

First and foremost: thanks, Mister, for writing such a useful app :)

I've been struggling to get WallPanel to stay open on a Fire Table HD 10 (OS version 9, SDK 28). This happens both at stock, and after some debloating with the Fire Toolbox), currently running 0.9.5.9 -- but I tried a bunch of other versions as well.

The symptoms that I've observed is that after some number of hours of running well, I find the tablet with on the home screen. Initially I thought it was an issue with staying in the foreground, not a crash, because the "Wall Panel running...." notification was present in that shade. I tied using the app pinning option, but it did not help.

Recently I got around to dumping the logs and found this, which would seem to imply that this is a crash after all:

pid: 22487, tid: 22487, name: r.iot.wallpanel  >>> com.thanksmister.iot.wallpanel <<<
09-13 14:04:03.796   631 24171 V CrashDescriptorUtil: signal 5 (SIGTRAP), code -6 (SI_TKILL), fault addr --------
09-13 14:04:03.796   631 24171 V CrashDescriptorUtil: Abort message: '[FATAL:crashpad_client_linux.cc(667)] Render process (22753)'s crash wasn't handled by all associated  webviews, triggering application crash.

This post on stack overflow seems to indicate that should be possible survive such events by installing a onRenderProcessGone handler. Seems worth trying?

Please let me know what additional information I can provide to facilitate debugging.

(Currently I'm working around the issue with the 'Autostart and StaY!' app set to respawn Wall Panel on crashes, but that's obviously not a very satisfying solution :)

mag1024 avatar Sep 14 '21 03:09 mag1024

+1! I experience exactly the same issue on a Fire HD 10 (2019) debloated with the Fire Toolbox. It happens about two times a day and is really annoying. Until this is fixed, I will also try the workaround with 'Autostart and StaY!'. Thanks to @mag1024

MiBe17 avatar Sep 15 '21 13:09 MiBe17

You need to try with the latest pre-release version, it has fixed an issue with MQTT causing the app to crash (or the background service which keeps the app from closing). https://github.com/thanksmister/wallpanel-android/releases/tag/v0.9.6.0

thanksmister avatar Sep 15 '21 14:09 thanksmister

I will try this out! Thanks, Mister! 😀

MiBe17 avatar Sep 15 '21 17:09 MiBe17

Upgrading to 0.9.6.0 does not solve the problem for me. The app still crashes after a few hours.

mag1024 avatar Sep 16 '21 04:09 mag1024

Same for me. However, when I disable MQTT completely, this issue does not occur anymore. So it seems to be definitively related to MQTT. Maybe @mag1024 you can also try it out and confirm this?

MiBe17 avatar Sep 16 '21 06:09 MiBe17

Disabling MQTT does not fix the problem for me -- the app still crashes after a while. The render process crashes in the log seem like a pretty strong lead -- @thanksmister, any thoughts on that?

mag1024 avatar Sep 16 '21 23:09 mag1024

Disabling MQTT does not fix the problem for me -- the app still crashes after a while. The render process crashes in the log seem like a pretty strong lead -- @thanksmister, any thoughts on that?

Seems like it’s crashing in the webpage rendering?

thanksmister avatar Sep 19 '21 13:09 thanksmister

I have one MQTT crash for the new version with Android 10 device.

Fatal Exception: java.lang.RuntimeException Unable to start service info.mqtt.android.service.MqttService@c6ab670 with Intent { cmp=com.thanksmister.iot.wallpanel/info.mqtt.android.service.MqttService }: java.lang.RuntimeException: android.os.DeadSystemException

thanksmister avatar Sep 19 '21 13:09 thanksmister

Seems like it’s crashing in the webpage rendering?

Yes, and there's supposed to be a way to handle issues with the rendering process with onRenderProcessGone without having them kill the app. Is that something Wall Panel should do?

Is the background service supposed to monitor / restart the app? If so, it doesn't seem to be working. When I see these crashes, the app is gone, but the service seem to continue to run -- at least the "WallPanel running..." notification is still present.

mag1024 avatar Sep 19 '21 18:09 mag1024

Maybe we can try to catch the WebView render error and handle it properly rather than crashing. You can set the app as the home app and it should also restart if crashed. But the proper approach is to handle the crash.

thanksmister avatar Sep 24 '21 14:09 thanksmister

I think the MQTT message probably has a bad format causing crashes because it cannot parse the MQTT as json. You can leave MQTT on and just turn off your HA automations that’s are send data like weather or sun.

thanksmister avatar Sep 24 '21 14:09 thanksmister

Glad I am not the only one struggling with this, anything ever get figured out? I have been trying to figure this out as well and was about to give up on having wall panels; but will try the 'Autostart and StaY!' app and see how that works!

esmoyer avatar Jul 16 '23 20:07 esmoyer

@esmoyer, this repository is abandoned. Try TheTimeWalker/wallpanel-android. MQTT handling there has had some fixes.

mag1024 avatar Jul 17 '23 03:07 mag1024

Thanks @mag1024, I could have sworn I had that one bookmarked but obviously had this one instead. I'll head over that way!

esmoyer avatar Jul 17 '23 11:07 esmoyer