question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android Sleep confidence freezing on android 11

See original GitHub issue

Home 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: afbeelding

Battery temps: afbeelding

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:closed
  • Created 2 years ago
  • Comments:24 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
dshokouhicommented, May 6, 2021

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.

1reaction
dshokouhicommented, Apr 29, 2021

Is there anything in the logs? Otherwise I will see if I can just format the whole phone and restart.

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.

Would you mind removing the other log, as it included sensitive data 😃

done 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to prevent apps from 'sleeping' in the background on ...
On the next screen, select Unrestricted, which will allow the app in question to run with far fewer limits while in the background....
Read more >
[Android Q Beta] Pixel 3a freeze and shutdown in sleep mode ...
Pixel 3a and 3a XL shuts down when going in deep sleep. After 10-15 min of ideling with proximity sensor covered screen goes...
Read more >
Release notes - Sleep as Android User manual
Documentation site for Sleep as Android (a sleep tracking, sleep cycle Android app)
Read more >
Pixel 2 XL freezes on Lock Screen (Android 11)
Everything seems to be fine, I was even able to update to Android 11 however, as soon as it locks the screen, it...
Read more >
(Solved) Android 11 Samsung "Deep Sleep" Wi-Fi ... - SecureW2
Tap or long press and remove the app from Deep Sleep. Recommended: You should add SecureW2 JoinNOw MultiOS to the “Never Sleeping Apps”...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found