iOS 8 web app (standalone mode only) hangs after lock screen

Originator:cartwrid
Number:rdar://18583332 Date Originated:10/8/2014
Status:Open Resolved:
Product:iOS Product Version:iOS 8.0.2
Classification: Reproducible:Always
 
Summary:
Users of our web app who have installed it to their home screens began reporting the app "crashing" after iOS 8 was released. Further investigation revealed that the "crash" was actually the app becoming unresponsive. We were able to distill the problem down to a failure with setTimeout where any asynchronous operations (we have many of them, we are using AngularJS) would fail. See http://jsfiddle.net/24b2eLyn/1/.

Steps to Reproduce:
1. In an iOS 8 device (physical or simulated, any device works), open Safari and navigate to http://jsfiddle.net/24b2eLyn/1/
2. Add to Home Screen
3. Access the installed web app
4. Notice that messages are showing up every 3 seconds
5. Lock and unlock the device
6. The messages stop appearing

The same reproduction steps in iOS 7.1 does not have the same bug - the messages continue to appear. Furthermore, running the fiddle in Safari in iOS 8 also does not exhibit the bug. It appears to be confined strictly to standalone installed web applications in iOS 8.

Expected Results:
setTimeout timers should resume after unlock, and the passed function should be called. App functionality depending on setTimeout should continue working.

Actual Results:
setTimeout timers appear to be "blown away", and further setTimeout calls are not respected.

Version:
iOS 8.0.2

Configuration:
any iOS device running iOS 8 (physical or simulated with xcode)

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!