Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wake lock not working on iPhone #91

Closed
owades opened this issue Feb 8, 2022 · 6 comments
Closed

Wake lock not working on iPhone #91

owades opened this issue Feb 8, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@owades
Copy link
Member

owades commented Feb 8, 2022

No description provided.

@owades owades added the bug Something isn't working label Feb 8, 2022
@unreasonableman
Copy link
Collaborator

On my iphone XR with iOS 15.1 with web app version 0.15, the wake lock no longer prevents the device from going to sleep when a trip is running. The screen darkens when the auto-lock time in the display settings is reached, and updates to the server stop.

@unreasonableman
Copy link
Collaborator

When investigating this issue, be aware that many phones have a feature where they don't lock as long as a face is looking directly at the screen. Locking also usually doesn't happen when the phone is connected to USB and/or power.

@unreasonableman
Copy link
Collaborator

Just confirmed that wake lock works as expected for the ipad

@unreasonableman
Copy link
Collaborator

unreasonableman commented Feb 9, 2022

After some debugging it seems like nosleep.js wake lock is set on the iphone, but doesn't actually work. This GH issue seems to confirm. It mentions a workaround, which I will look into.

@unreasonableman
Copy link
Collaborator

Confirmed that issue is resolved by workaround when running server locally and publishing with ngrok. Checked on iphone XR, ipad and Moto G, also checked that device will go to sleep again after calling nosleep.disable().

@unreasonableman
Copy link
Collaborator

Fixed with PR #96

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants