Issue 159827 in chromium: duplicate XMLHttpRequest.onreadystatechange calls with 'ready' state for the same request.

69 views
Skip to first unread message

chro...@googlecode.com

unread,
Nov 7, 2012, 11:36:37 AM11/7/12
to chromi...@chromium.org
Status: Unconfirmed
Owner: ----
Labels: OS-Mac Area-Undefined Pri-2 Type-Bug

New issue 159827 by jcla...@etsy.com: duplicate
XMLHttpRequest.onreadystatechange calls with 'ready' state for the same
request.
http://code.google.com/p/chromium/issues/detail?id=159827

Chrome Version : 23.0.1271.64
URLs (if applicable) :

http://jsfiddle.net/MeXvJ/

Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari 5: ? (bug occurs on iOS 6, but is not reproducible by the means
below)
Firefox 4.x: OK
IE 7/8/9: OK

What steps will reproduce the problem?
1. Visit http://jsfiddle.net/YJU8R/
2. If you have popup windows blocked, unblock
3. Refresh or click 'Run'

What is the expected result?
1 alert window with the message 'error' should appear

What happens instead?
3 alert windows with the message 'error' appear.
If you look at the Chrome debugger console, you will see 3 _identical_ XHR
objects.

* Note that this also reproduces if you replace 'showModalDialog()'
with 'debugger;' and run the script with the debugging console open:

http://jsfiddle.net/5f37q/

Please provide any additional information below. Attach a screenshot if
possible.

This is a behavior we've observed in the wild in Chrome, Mobile Safari, and
Mobile Chrome (both on iOS 6) -- a case where a single AJAX request
triggers multiple calls to its success method. We tracked that behavior
back to multiple calls to an XHR.onreadystatechange method -- all for the
same request, and all indicating 'READY'.

For some reason it always happens in 3's.

It's very difficult for us to reproduce this in the wild -- usually it
happens when many requests are happening simultaneously -- and even then it
only happens occasionally.

The jsfiddle above was the best we could find in terms of consistently
reproducing the issue.

Sorry I don't have more info.

P.S. -- These issues might be related:
-
http://stackoverflow.com/questions/12761255/can-xhr-trigger-onreadystatechange-multiple-times-with-readystate-done
- https://bugs.webkit.org/show_bug.cgi?id=28878
- https://bugs.webkit.org/show_bug.cgi?id=90160
- http://code.google.com/p/chromium/issues/detail?id=152390 (sounds
similar, but doesn't repro for me)


chro...@googlecode.com

unread,
Dec 28, 2012, 8:02:02 AM12/28/12
to chromi...@chromium.org

Comment #2 on issue 159827 by diou.ber...@gmail.com: duplicate
XMLHttpRequest.onreadystatechange calls with 'ready' state for the same
request.
http://code.google.com/p/chromium/issues/detail?id=159827

Problems with ajax executions in chrome, the URL
(http://bernardosilva.com.br/bug/ajax/) the problem can be tested.

It's a simple code, when the alert is run from the onreadystatechange
function the number of responses to the requests are multiplied. Rare are
the times when the alert with the number of responses is equal to the
request.

The base code for the test sample is contained in the w3c
http://www.w3schools.com/ajax/default.asp

Reports of this problem
https://bugs.webkit.org/show_bug.cgi?id=28878
https://bugs.webkit.org/show_bug.cgi?id=90160
https://code.google.com/p/chromium/issues/detail?id=162837
https://code.google.com/p/chromium/issues/detail?id=159827
https://code.google.com/p/chromium/issues/detail?id=152390

A javascript solution to this problem can be found in
http://bernardosilva.com.br/bug/ajax/solution.html


chro...@googlecode.com

unread,
Oct 2, 2013, 12:20:53 AM10/2/13
to chromi...@chromium.org
Updates:
Labels: Cr-Blink-XHR

Comment #4 on issue 159827 by tyos...@chromium.org: duplicate
XMLHttpRequest.onreadystatechange calls with 'ready' state for the same
request.
http://code.google.com/p/chromium/issues/detail?id=159827

(No comment was entered for this change.)

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

chro...@googlecode.com

unread,
Mar 6, 2015, 2:31:29 AM3/6/15
to chromi...@chromium.org
Updates:
Labels: Needs-Feedback

Comment #5 on issue 159827 by yhi...@chromium.org: duplicate
XMLHttpRequest.onreadystatechange calls with 'ready' state for the same
request.
https://code.google.com/p/chromium/issues/detail?id=159827

I cannot reproduce. An alert with 'got it' is shown once.

chro...@googlecode.com

unread,
Mar 6, 2015, 2:32:31 AM3/6/15
to chromi...@chromium.org

Comment #6 on issue 159827 by yhi...@chromium.org: duplicate
XMLHttpRequest.onreadystatechange calls with 'ready' state for the same
request.
https://code.google.com/p/chromium/issues/detail?id=159827

I cannot reproduce the issue. 1 alert window with 'got it' is shown.

chro...@googlecode.com

unread,
Aug 3, 2015, 3:43:02 AM8/3/15
to chromi...@chromium.org
Updates:
Status: WontFix

Comment #7 on issue 159827 by yhi...@chromium.org: duplicate
XMLHttpRequest.onreadystatechange calls with 'ready' state for the same
request.
https://code.google.com/p/chromium/issues/detail?id=159827

Close this issue because I couldn't reproduce it. Feel free to reopen.

chro...@googlecode.com

unread,
Aug 5, 2015, 1:26:39 AM8/5/15
to chromi...@chromium.org

Comment #8 on issue 159827 by fun...@gmail.com: duplicate
XMLHttpRequest.onreadystatechange calls with 'ready' state for the same
request.
https://code.google.com/p/chromium/issues/detail?id=159827

Like he said, it can't be reproduced consistently. You should try harder
before closing an issue.

chro...@googlecode.com

unread,
Aug 5, 2015, 1:39:39 AM8/5/15
to chromi...@chromium.org

Comment #9 on issue 159827 by yhi...@chromium.org: duplicate
XMLHttpRequest.onreadystatechange calls with 'ready' state for the same
request.
https://code.google.com/p/chromium/issues/detail?id=159827

> #8
Do you succeed to reproduce the issue with the latest Chrome?

chro...@googlecode.com

unread,
Aug 6, 2015, 10:08:16 AM8/6/15
to chromi...@chromium.org

Comment #10 on issue 159827 by yhi...@chromium.org: duplicate
XMLHttpRequest.onreadystatechange calls with 'ready' state for the same
request.
https://code.google.com/p/chromium/issues/detail?id=159827

If the issue is reproducible, please tell me. Then I will reopen the bug.
Currently I'm not sure if the issue exists or has been fixed in this three
years. I'm sorry I didn't start the investigation at that time.

chro...@googlecode.com

unread,
Aug 6, 2015, 10:24:18 AM8/6/15
to chromi...@chromium.org

Comment #11 on issue 159827 by sigbjo...@opera.com: duplicate
XMLHttpRequest.onreadystatechange calls with 'ready' state for the same
request.
https://code.google.com/p/chromium/issues/detail?id=159827

just another data point, but the times I've looked at this issue over the
past two years, I've not been able to repro. The implementation of
XMLHttpRequest (and Blink) has changed a fair bit since the issue was
reported in 2012.

https://code.google.com/p/chromium/issues/detail?id=162837#c6 also reports
a non-repro from 2014 (using M32).

chro...@googlecode.com

unread,
Aug 7, 2015, 10:56:17 PM8/7/15
to chromi...@chromium.org

Comment #12 on issue 159827 by diou.ber...@gmail.com: duplicate
XMLHttpRequest.onreadystatechange calls with 'ready' state for the same
request.
https://code.google.com/p/chromium/issues/detail?id=159827

I tested the Chrome 44.0.2403.130 m and the problem did not occur.

chro...@googlecode.com

unread,
Aug 9, 2015, 9:12:27 PM8/9/15
to chromi...@chromium.org

Comment #13 on issue 159827 by yhi...@chromium.org: duplicate
XMLHttpRequest.onreadystatechange calls with 'ready' state for the same
request.
https://code.google.com/p/chromium/issues/detail?id=159827

> #12

Thank you for verifying.
Reply all
Reply to author
Forward
0 new messages