Bug 256280
Summary: | Webkit PWA in Bad State After Opening in-PWA Webkit Tab | ||
---|---|---|---|
Product: | WebKit | Reporter: | goehdavi |
Component: | WebCore Misc. | Assignee: | youenn fablet <youennf> |
Status: | RESOLVED FIXED | ||
Severity: | Blocker | CC: | webkit-bug-importer, youennf |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 16 | ||
Hardware: | iPhone / iPad | ||
OS: | iOS 16 |
goehdavi
When we use window.open(url, "_blank") to bring up a new Safari tab/window with our PWA we see that the document.visibilityState is not updated and then returning to the PWA from the webview/tag results in fetch calls failing with Unhandled Promise Rejection: AbortError: Fetch is aborted. All fetch calls fail until the PWA is refreshed or closed and then opened again.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
goehdavi
Upon further investigation it seems document.visibilityState is updated and that clicking Done from the Safari window does not cause the issue. It is only caused when handoff javascript executes in the other window (calls to window.opener.postMessage). We are unsure why this breaks all fetch calls.
Radar WebKit Bug Importer
<rdar://problem/108884055>
goehdavi
It appears the issue is related to the service worker becoming unresponsive. Our service worker has no fetch handler but all network calls failed when a redirect was performed in the new safari tab. Resetting the service worker (unregistering the service worker and then refreshing the page) resolved the issue.
youenn fablet
Pull request: https://github.com/WebKit/WebKit/pull/13639
EWS
Committed 263901@main (7a4f94728cde): <https://commits.webkit.org/263901@main>
Reviewed commits have been landed. Closing PR #13639 and removing active labels.
EWS
Committed 264076@main (f1665400b299): <https://commits.webkit.org/264076@main>
Reviewed commits have been landed. Closing PR #13740 and removing active labels.