Bug 137503 - [iOS] WebSQL operations are not performed after device is locked
Summary: [iOS] WebSQL operations are not performed after device is locked
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 420+
Hardware: iPhone / iPad iOS 8.0
: P2 Normal
Assignee: Daniel Bates
URL: http://media.brehaut.net/files/ios8-w...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-10-07 15:34 PDT by Andrew Brehaut
Modified: 2015-05-19 13:10 PDT (History)
7 users (show)

See Also:


Attachments
[Web Archive] ios8-websql-bug.html (813 bytes, application/x-webarchive)
2014-10-25 13:31 PDT, Daniel Bates
no flags Details
Manual test (2.33 KB, patch)
2015-05-08 09:35 PDT, Daniel Bates
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Brehaut 2014-10-07 15:34:32 PDT
On a device running iOS8 (8.0.2), and a web app (includes <meta name="apple-mobile-web-app-capable" content="yes" />) is saved to the homescreen, if the device is locked (via timeout or the sleep/wake button), when the device is unlocked again, the application's websql connection is non-responsive until the application is backgrounded and relaunched. 

To reproduce: 

 * visit http://media.brehaut.net/files/ios8-websql-bug.html in mobile Safari
 * tap the 'test db' link; an alert should appear stating 'in transaction'.
 * lock the screen
 * unlock the screen
 * tap the 'test db' link again. within mobile Safari proper this should again raise the alert dialog.
 
 * save the app to the home screen.
 * tap the 'test db' link; an alert should appear stating 'in transaction'.
 * lock the screen
 * unlock the screen
 * tap the 'test db' link again. the alert should never be raised.

 * background the app and relaunch at this point and it should behave correctly again.
 
The javascript executed by the link is basically: 

	openDatabase("test", "1.0", "test", 1 * 1024 * 1024).transaction(function (tx) { alert("in transaction"); });
	
Running the same thing from any web app via a connected web inspector should produce the same results.
Comment 1 Alexey Proskuryakov 2014-10-07 21:49:10 PDT
Not sure if this is the same as <rdar://problem/18042389> (the link only works for Apple employees)
Comment 2 Daniel Bates 2014-10-25 13:31:07 PDT
Created attachment 240456 [details]
[Web Archive] ios8-websql-bug.html

Web archive of <http://media.brehaut.net/files/ios8-websql-bug.html> as it appeared on 10/25/2014.
Comment 3 Daniel Bates 2014-11-06 09:28:28 PST
<rdar://problem/18894598>
Comment 4 Daniel Bates 2015-05-06 15:09:06 PDT
(In reply to comment #3)
> <rdar://problem/18894598>

Disregard this radar. It doesn't cover the issue mentioned in this bug, which is specific to showing a modal dialog.
Comment 5 Radar WebKit Bug Importer 2015-05-06 15:09:42 PDT
<rdar://problem/20844952>
Comment 6 Daniel Bates 2015-05-08 09:28:47 PDT
I'm unable to reproduce this issue using the attached test case in shipping iOS 8.3 (12F70) on an iPhone 5s. I can confirm that this bug reproduces in iOS 8.0.2 (12A405) on an iPhone 5.
Comment 7 Daniel Bates 2015-05-08 09:35:48 PDT
Created attachment 252723 [details]
Manual test
Comment 8 Daniel Bates 2015-05-08 12:00:56 PDT
Committed r184002: <http://trac.webkit.org/changeset/184002>
Comment 9 Christopher Schimanski 2015-05-19 12:09:47 PDT
Hey Guys and first off all excuse me for interrupting! I'm writing you from germany relating to this WebKit issue.

We have an application in the german iOS Appstore. Today one of the users who downloaded that application called the support hotline from our company and said, that he is not able to use our application. It is a Cordova/Hybrid one. 

After our support assistent talked to him over half an our he forwarded that problem to us, the programmers. We tried very much till now, but we are not able to exactly tell where the problem is. 

We build an application for hunters who are able to report hunted animals with that. Therefore we guide them step by step through the report. On iPhone 5S with iOS 8.3 (12F70) we get a database error message. The iPhone 5S users are not possible to report their hunted animals because there is an issue. All other Devices are fine with that version. 

We started debugging this evening, i'll keep you up to date. If you need further information, or the name from the application (maybe you can test it?!) write me an E-Mail to sithys@me.com 

Greetings from Germany!
Christoph Schimanski
Comment 10 Brady Eidson 2015-05-19 13:10:59 PDT
(In reply to comment #9)
> Hey Guys and first off all excuse me for interrupting! I'm writing you from
> germany relating to this WebKit issue.
> 
> We have an application in the german iOS Appstore. Today one of the users
> who downloaded that application called the support hotline from our company
> and said, that he is not able to use our application. It is a Cordova/Hybrid
> one. 
> 
> After our support assistent talked to him over half an our he forwarded that
> problem to us, the programmers. We tried very much till now, but we are not
> able to exactly tell where the problem is. 
> 
> We build an application for hunters who are able to report hunted animals
> with that. Therefore we guide them step by step through the report. On
> iPhone 5S with iOS 8.3 (12F70) we get a database error message. The iPhone
> 5S users are not possible to report their hunted animals because there is an
> issue. All other Devices are fine with that version. 
> 
> We started debugging this evening, i'll keep you up to date. If you need
> further information, or the name from the application (maybe you can test
> it?!) write me an E-Mail to sithys@me.com 
> 
> Greetings from Germany!
> Christoph Schimanski

Not sure why you commented in this bug. There's no indication that the issue you are seeing is what was reported here, and there won't be as many folks paying attention since the issue reported here has been resolved.

You should file a new bug focused on only your issue.