sendBeacon calls during page unload are staying in (pending) state
Reported by
sscha...@gmail.com,
Nov 8
|
||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36 Steps to reproduce the problem: 1. Use sendBeacon when a page is unloading What is the expected behavior? Beacon is sent out and shown as finished at some point What went wrong? Beacon is shown as pending and eventually times out, eventhough the data is sending just fine. We were on the receiving end of a support case, so I can not give too much information here, because the problem acutally happened in catchpoint. I am assuming that the Chrome API for Chrome Extensions is never sending a finished event, which would show it wrong in the devtools and would break catchpoints logic, which will continue to wait until this requests finishes by timing out and showing higher response times for a webpage. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 70.0.3538.77 Channel: stable OS Version: 10.0 Flash Version:
,
Nov 9
Thanks for filing the issue! @Reporter: If possible could you please provide sample Test file/URL that reproduces the issue which help in further triaging it in better way. Thanks!
,
Nov 9
,
Nov 9
This is a bug and I think is a duplicate. (I don't know the original bug ID) I made a patch that might fix this bug: https://chromium-review.googlesource.com/c/chromium/src/+/1122629 It will be first used on Chrome 72.0.3605.0. I am wondering if this bug still reproduce on Chrome Canary? (Version >= 72.0.3605.0) Do you use sendBeacon() from an iframe? Adding more people on CC.
,
Nov 13
I have created a reproducer: * Load the page and then just press ctrl+f5 The fiddler.png shows that fiddler got a 200 response. The devtools.png shows that the devtools are showing the sendBeacon request as pending. I have tried it with Chrome 68,69 and 70.
,
Nov 13
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 13
Okay I got it, * sendBeacon() is used in "onbeforeunload". * It is send properly and work as expected. * In the meantime the frame is removed and DevTools doesn't update the state of the request. It stays "pending". I can reproduce. Thanks! You had to use "[⋅] preserve log" to force DevTools to keep the network request of the previous document. +cc dgozman@ FYI. Removing myself. It has nothing to do with what I thought initially.
,
Nov 13
,
Nov 13
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by vamshi.kommuri@chromium.org
, Nov 8