Over the past month or so, I’ve noticed that every morning when I woke up, my phone would display a message along the lines of “please wait while your phone starts” during the first unlock. It looks like the a soft crash of the entire system UI. At first I had no clue what was causing it, so I eventually did a complete wipe of my phone and reinstalled every app from scratch (no backup). The first night I didn’t get around to installing the HA app, and I didn’t see a reboot. The next night (after installing the HA app), the issue came back, so I uninstalled it again and it hasn’t rebooted overnight for 5 days is a row.
I mentioned this to my wife the other day, and she told me that she was actually seeing the issue on her phone as well (also a Galaxy S20) but didn’t think anything of it. I uninstalled the HA app from her phone, and her reboots stopped also.
It seems like something is causing our phones to soft-crash the android runtime overnight - typically happens between 4-6am local time (pacific). Has anyone else come across this? We’re both running stock OneUI 4.1.
I found another issue that had to do with OneUI crashes (https://github.com/home-assistant/android/issues/2287) but that was occurring when using the device controls menu, whereas the error I’m seeing happens in the background, seemingly on its own. I don’t have any automations running at that time - either in Home Assistant or directly on the phone that would cause an interaction with that system device menu.
Yup, I already started completely fresh - performed a factory reset of the phone and also ensured that before reinstalling the HA app, all the app data was deleted as per the linked docs (since I know that the play store likes to back up app settings, I made sure before the factory reset to wipe the app’s storage/cache manually).
I was trying to get logs, but it seems difficult since the phone reboots over a 2-3 hour period while we are sleeping. I got a dump (adb bugreport) from the next morning after one night of it rebooting, but couldn’t find anything relevant in there myself, but the dataset is somewhat large (~20-30MB).
Regrettably, I don’t have the companion app logs yet due to the wipe/reinstall last night. I will leave the app installed overnight & hopefully any system ui crashes will be somewhat noticeable in the HA companion logs. I was also thinking of trying to leave a logcat running overnight if that would help you debug further.
Regardless, I’ll update this ticket as soon as I get the companion logs.
in teh companion app logs you may see a Recent Crash tab when it occurs that may have some data to help, I have not heard of this case so it does indeed sound unique. When you said you cleared data before reinstalling the app those steps are not correct. You need to clear data after you install the app so it starts with a fresh slate, reinstalling always triggers autobackup.
Sorry, might have slightly misspoken; I wiped data/cache after installing. I’m fairly certain it correctly reset the app, as I had to log in again and go through the entire app onboarding flow again (set device name, set up sensors, etc. (and also see a new refresh token from the android app in my user profile).
ok you may want to try either a logcat reader app, you can even try the beta app to see if the issue is resolved there. Without having the logs its very difficult to figure out whats happening. I assume you already made sure the device and apps like webview are up to date?
Yup, I’ll definitely get the logs posted as soon as it happens again (for better or worse, it’s only ever while the phone is asleep between ~ 4-6am ).
In the interim, definitely glad to provide all the other pertinent info:
Android System Webview v104.0.5112.97 (appears to be latest stable released)
OneUI: 4.1 build SP1A.210812.016.G981U1UES2FVF3 (I think latest stable with 7/1 security patch)
I can also try installing the beta to see if anything changed. Perhaps I’ll install the beta on my wife’s phone to see if it still occurs & will leave mine w/ current stable to potentially capture the logs.
Thanks again for the assistance already w/ trying to debug this!
Regrettably, it looks like the companion app logs begin right when I unlock my phone for the first time after the system ui crash. I woke up at 6:38am PDT, and sure enough the HA logs start at 6:38:16.813. Based on the system uptime stats, it looks like it crashed around 2am last night.
What would be the best way to persist logs overnight? I have a server that is on 24/7 - is there any way for the phone to send the log data there (e.g. could I run adb logcat on the server with the device on the same network & wireless debugging & pipe that to a file)?
Perhaps it is still just coincidence, but yesterday I uninstalled the HA app from my wife’s phone again (to install the beta, but never got around to doing that piece), and once again without the HA app, her phone didn’t reboot overnight.
This is happening to me too on a Samsung S22 Ultra - I uninstall the app and my phone doesn’t reboot at all, but when I have the app installed, it reboots a few times randomly per day.
I can’t figure out whats happening or why the app is doing this, but its definitely that app - Sometimes my phone freezes for a second when I have HA companion app installed whilst I’m using a different app, so its doing something in the background thats locking my phone up.
I found this thread because I am having the same issue… Been trying to figure out for 6 months why my phone has been restarting usually in the morning on first use. Installed home assistant app on my wife’s phone for the first time yesterday and her phone rebooted today. I am in moto edge + , she is in moto one ace.
Just a couple additional data points that are likely not helpful, but…i am using an S21 plus, and my wife is using an S9. No issues here with either device.