Android Sleep confidence freezing on android 11
See original GitHub issueHome Assistant Android version: Beta-672-a016525-full and tried on 2021.4.1
Android version: 11
Phone model: Oneplus 7 pro
Home Assistant version: 2021.4.6
Last working Home Assistant release (if known): 2021.4.6
Description of problem: When I ran android 10 on my phone the sleep confidence worked perfectly fine. But for now, after upgrading 11 it works sometimes and then freezes. I tried force stopping the application but that doesn’t work. I tried removing the app and reinstalling everything. Didn’t work Only thing that works, rebooting the phone. This is what you see in the screenshot.
Traceback (if applicable, to get the logs you may refer to: https://companion.home-assistant.io/docs/troubleshooting/faqs/#android-crash-logs):
Screenshot of problem:
Battery temps:
Additional information: I made sure that the app isn’t being killed and keeps running in the background. As can be seen, my battery temperature keeps working just fine.
Issue Analytics
- State:
- Created 2 years ago
- Comments:24 (10 by maintainers)
Top GitHub Comments
I usually always refer people to dontkillmyapp.com as they do a lot of research on this topic.
https://dontkillmyapp.com/oneplus
Since you said only this one sensor is impacted and as the data is only provided by Google I don’t suspect the issue is related ot the app being killed. If that were the case then simply opening up the app will re-register with Google sleep API and data will continue but you mentioned you had to reboot the device for it to work so thats not really killing the app. Sounds more like some type of corruption or software bug on Google’s end.
I don’t see any errors in the logs its like google just stopped sending those updates. You mentioned it happened after an OS update…can you check that play services is up to date? Thats the only thing I can think of since the sleep API is a google service.
One other odd bit that you mentioned was even when you force stop the app the issue was not fixed. You had to reboot the device for it to work. For the app itself it doesn’t matter if you are force stopping or restarting the phone. In those cases we always register for updates. Force stopping is really what should kick start again and if you look at the logs after a force stop you should see it re-registering for updates.
done 😃