WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 204665
sendBeacon on Safari 13 seeing high failure rates
https://bugs.webkit.org/show_bug.cgi?id=204665
Summary
sendBeacon on Safari 13 seeing high failure rates
Yoav Weiss
Reported
2019-11-27 23:36:31 PST
I've been getting multiple reports that `sendBeacon` on Safari 13 (both on iOS and macOS) is seeing significantly more failure reports than previous versions. One provider that was measuring click based beacons was seeing 5x increase in failures, resulting in 1% of failures. A publishing platform that was using it to report back performance measurements was seeing a similar failure. Talking to both, they are falling back to using sync XHR in Safari, which seems like a step in the wrong direction. On top of that Simon Hearne at perf.now()[1] mentioned that as an analytics provider, he is seeing significantly slower unload times on iOS than on other platforms. That can be an indication that many folks use syncXHR instead of beacon there. [1]
https://perfnow.nl/
Attachments
Patch
(2.62 KB, patch)
2019-12-20 12:15 PST
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2019-11-28 11:44:12 PST
<
rdar://problem/57522622
>
Yoav Weiss
Comment 2
2019-12-18 11:22:48 PST
https://volument.com/blog/sendbeacon-is-broken
seems relevant
Chris Dumez
Comment 3
2019-12-20 11:09:24 PST
(In reply to Yoav Weiss from
comment #2
)
>
https://volument.com/blog/sendbeacon-is-broken
seems relevant
iOS Thanks to developer community feedback, we removed iOS from the list. This browser has known issues delivering on the promises of beacon API. The sendBeacon event itself is working, but the unload/beforeunload events are not fired. We should have used the pagehide and/or visibilitychange events instead. Unfortunately we have no data how reliable iOS is when the data is sent on these mobile-specific events.
> So testing was not correct on iOS.
Chris Dumez
Comment 4
2019-12-20 12:11:24 PST
The only change in our Beacon implementation in Safari 13 I am aware of was this one:
https://bugs.webkit.org/show_bug.cgi?id=197919
Technically, if you exit Safari, the network process will go away and Beacon loads could get interrupted in this case if there are still pending. I guess using such a Low priority for beacon makes it more likely to happen and it could in theory explain the increase in failures. I propose we revert
Bug 197919
.
Chris Dumez
Comment 5
2019-12-20 12:15:55 PST
Created
attachment 386237
[details]
Patch
Yoav Weiss
Comment 6
2019-12-20 12:57:14 PST
(In reply to Chris Dumez from
comment #3
)
> (In reply to Yoav Weiss from
comment #2
) > >
https://volument.com/blog/sendbeacon-is-broken
seems relevant > > iOS > Thanks to developer community feedback, we removed iOS from the list. This > browser has known issues delivering on the promises of beacon API. The > sendBeacon event itself is working, but the unload/beforeunload events are > not fired. We should have used the pagehide and/or visibilitychange events > instead. > Unfortunately we have no data how reliable iOS is when the data is sent on > these mobile-specific events. > > > So testing was not correct on iOS.
Yup, my bad. The methodology of this blog post was indeed flawed. The other reports still stand though.
WebKit Commit Bot
Comment 7
2019-12-20 14:59:00 PST
The commit-queue encountered the following flaky tests while processing
attachment 386237
[details]
: fetch/fetch-worker-crash.html
bug 187257
(author:
youennf@gmail.com
) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 8
2019-12-20 14:59:51 PST
Comment on
attachment 386237
[details]
Patch Clearing flags on attachment: 386237 Committed
r253847
: <
https://trac.webkit.org/changeset/253847
>
WebKit Commit Bot
Comment 9
2019-12-20 14:59:53 PST
All reviewed patches have been landed. Closing bug.
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