New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 903125 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

sendBeacon calls during page unload are staying in (pending) state

Reported by sscha...@gmail.com, Nov 8

Issue description

UserAgent: 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:
 
Labels: Needs-Triage-M70
Cc: viswa.karala@chromium.org
Labels: Triaged-ET Needs-Feedback
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!
Components: Platform>DevTools>Network
Cc: nasko@google.com creis@chromium.org alex...@chromium.org arthurso...@chromium.org
Owner: arthurso...@chromium.org
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.
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.
sendBeacon.html
353 bytes View Download
fiddler.png
4.3 KB View Download
devtools.png
5.6 KB View Download
Project Member

Comment 6 by sheriffbot@chromium.org, Nov 13

Labels: -Needs-Feedback
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
Cc: dgozman@chromium.org
Owner: ----
Status: Untriaged (was: Unconfirmed)
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.
Owner: jarhar@chromium.org
Status: Assigned (was: Untriaged)
Cc: -nasko@google.com nasko@chromium.org

Sign in to add a comment