WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
182874
Service Worker occasionally becomes unresponsive
https://bugs.webkit.org/show_bug.cgi?id=182874
Summary
Service Worker occasionally becomes unresponsive
Thomas Steiner
Reported
2018-02-16 07:33:17 PST
Created
attachment 334040
[details]
Relevant screenshots Note: This is not reliably reproducible. Environment: iPhone X, iOS 11.3 Beta 2, Build 15E5178f. Steps to trigger: 1) Use iPhone, browse for a while :-/. 2) Open
https://airhorner.com/
. 3) Repeat-load to make sure Service Worker is installed, and activated. 4) Use iPhone, browse for a while :-/. 5) Connect to Dev Tools, note how Service Worker is not detected (screenshot: sw_not_detected.png). 6) To check if the Service Worker is there, in the console, run: navigator.serviceWorker.getRegistration().then(r=>document.body.innerHTML = `scope: ${r.scope}`) See the scope logged to the screen (screenshot: sw_scope.jpg). 7) To check if there is stuff in the cache, in the console, run: caches.keys().then(k=>caches.open(k[0])).then(c=>c.keys()).then(c=>document.body.innerHTML = `<pre>${JSON.stringify(c.map(u=>u.url), null, 2)}</pre>`) See the cache keys logged to the screen (screenshot: cache_keys.jpg). 8) Go offline, try to reload, see it fail (screenshot: offline_failure.jpg). 9) Reboot iPhone. 10) Open
https://airhorner.com/
. 11) Connect to Dev Tools, note how Service Worker now is detected (screenshot: sw_detected.png). 12) Go offline, try to reload, see it get stuck (screenshot: stuck_loading.jpg). 13) Use iPhone, browse for a while :-/ . 14) Go offline, try to reload, see it succeed (screenshot: offline_success.jpg).
Attachments
Relevant screenshots
(7.22 MB, application/zip)
2018-02-16 07:33 PST
,
Thomas Steiner
no flags
Details
Screenshot: offline sort of working, but still triggering the turn off airplane mode alert.
(488.51 KB, image/png)
2018-02-21 21:03 PST
,
Thomas Steiner
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2018-02-16 13:02:06 PST
Thanks for the report Thomas. It might be the storage process was jetsamed hence why it is triggering while browsing. If you can take a sysdiagnose and send it by email, we would be able to confirm this.
Thomas Steiner
Comment 2
2018-02-17 11:31:16 PST
For people following along: I have sent a sysdiagnose via email.
Radar WebKit Bug Importer
Comment 3
2018-02-18 15:09:46 PST
<
rdar://problem/37655926
>
youenn fablet
Comment 4
2018-02-18 18:27:15 PST
(In reply to Thomas Steiner from
comment #2
)
> For people following along: I have sent a sysdiagnose via email.
Thanks Thomas. Looking at it, there are some storage process jetsams. This issue is now fixed. We were also not handling correctly some failing install cases that could explain the service worker to be alive but without any data, in case storage process was jetsamed in the middle of the install for instance. Next beta should help a lot there. I also saw some older logs like: "com.apple.WebKit.Storage Failed to open Service Worker registration database: <private>" This could signal some issues in making service worker registration persistent, which does not seem related to the symptoms you described.
youenn fablet
Comment 5
2018-02-20 20:44:18 PST
Thomas, if you have time, iOS beta 3 is out and may be more reliable. Let us know if you still encounter any issue.
Thomas Steiner
Comment 6
2018-02-21 21:03:32 PST
Created
attachment 334437
[details]
Screenshot: offline sort of working, but still triggering the turn off airplane mode alert.
Thomas Steiner
Comment 7
2018-02-21 21:12:26 PST
I have done some tests (limited time due to work-related travel): - Airhonrner.com as the playground offline test sort of works, but still triggers the “turn off airplane mode” dialogue, which is confusing. - Trivago.com as the more advanced test then didn’t work at all. They simply might have broken it, more testing required. What is really confusing is that added to home screen apps still relaunch from scratch every single time when switching between apps and are not kept running. This also adds some sort of splash screen as a requirement. I know Safari since forever supports a meta tag to specify a splash screen, it would be nice if it fell back to the manifest-based approach to stitch together a splash screen based on the description, icon, and theme-related properties. Sorry if this are just short observations, as I wrote I’m traveling. Let me know where specifically you want me to go in more detail or what to test.
Thomas Steiner
Comment 8
2018-02-21 21:17:12 PST
Quick addendum: trivago works fine inside of Safari, it seems the problem is limited to launches from the home screen. This issue seems fixed according to
https://bugs.webkit.org/show_bug.cgi?id=182070
. Did this fix not make it into Beta 3?
Chris Dumez
Comment 9
2018-02-21 21:30:26 PST
(In reply to Thomas Steiner from
comment #8
)
> Quick addendum: trivago works fine inside of Safari, it seems the problem is > limited to launches from the home screen. This issue seems fixed according > to
https://bugs.webkit.org/show_bug.cgi?id=182070
. Did this fix not make it > into Beta 3?
That fix went into seed 3. I did not test trivago from home screen yet and I did try airhorner.com from home screen and it was working.
Ryosuke Niwa
Comment 10
2018-02-21 21:58:15 PST
I can assure you that the bug reproduces in beta 3 for Web.app. You need to go to airplane mode before opening the app when the app is closed, then tap it on the home screen to open it. The prompt shows up. Anyway see <
rdar://problem/37774338
>.
Thomas Steiner
Comment 11
2018-02-21 22:02:03 PST
Let me clarify: above in
https://bugs.webkit.org/show_bug.cgi?id=182874#c7
I was specifically referring to this use case, apps launched from home screen, which seems to concern Web.app / SFSafariViewController specifically. Sorry for not having made this clear. The *in-Safari* tests all worked fine so far. The problem described in the present bug happened occasionally and was not reliably reproducible, but for now it seems solved. 👏
Ryosuke Niwa
Comment 12
2018-02-22 16:11:13 PST
(In reply to Thomas Steiner from
comment #11
)
> Let me clarify: above in
https://bugs.webkit.org/show_bug.cgi?id=182874#c7
I > was specifically referring to this use case, apps launched from home screen, > which seems to concern Web.app / SFSafariViewController specifically. Sorry > for not having made this clear. > > The *in-Safari* tests all worked fine so far. The problem described in the > present bug happened occasionally and was not reliably reproducible, but for > now it seems solved. 👏
The issue with
https://airhorner.com/
here appears to be that it's trying to talk to Google analytics. Since we have no way of discerning that network request from some other important network request the website makes.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug