Closed Bug 1009640 Opened 5 years ago Closed 5 years ago

"Unable to compute" error on Ebay photo uploader due to XMLHttpRequest lengthComputable == false

Categories

(Core :: DOM: Core & HTML, defect)

29 Branch
defect
Not set

Tracking

()

VERIFIED FIXED
mozilla32
Tracking Status
firefox29 - wontfix
firefox30 + verified
firefox31 + verified
firefox32 + verified
b2g-v1.3 --- unaffected
b2g-v1.3T --- unaffected
b2g-v1.4 --- fixed
b2g-v2.0 --- fixed

People

(Reporter: verdi, Assigned: smaug)

References

()

Details

(Keywords: dev-doc-complete, regression, site-compat)

Attachments

(3 files)

Users are reporting receiving an "Unable to compute" error when using the Ebay photo uploader. Clicking OK allows the upload to continue but you will often get this error multiple times during an upload.
Hmm, following the steps to reproduce at <http://community.ebay.com/t5/eBay-Picture-Hosting/unable-to-compute/m-p/20498216#M7444> I can't reproduce. But I do wonder if I'm using the "enhanced" uploader, or if this is a Windows specific issue (I'm on Mac).

This is the image uploader I was using when I tried to reproduce: https://cloudup.com/cKfDUFyj5J2, if anyone knows if that's the right uploader.
I just created an eBay account and opened the URL shown in the screenshot.
http://cgi5.ebay.com/_picupload/main?popup=1&ver=3&hostAppUrl=http%3A%2F%2Fcgi5.ebay.com

The source is http://ir.ebaystatic.com/z/mj/d4jtx2lw1a3xvbbtiupk5f3kf.js

if (d.lengthComputable) { ... } else alert('unable to compute')
Blocks: 948246
Component: General → DOM
Flags: needinfo?(bzbarsky)
Flags: needinfo?(bugs)
Product: Firefox → Core
Summary: "Unable to compute" error on Ebay photo uploader → "Unable to compute" error on Ebay photo uploader due to lengthComputable == false
This code also uses XHR.sendAsBinary which will be deprecated with Firefox 31 (Bug 939323).
Summary: "Unable to compute" error on Ebay photo uploader due to lengthComputable == false → "Unable to compute" error on Ebay photo uploader due to XHR.lengthComputable == false
Assignee: nobody → bugs
Flags: needinfo?(bugs)
Verdi, could you test Olli's try build? The uploader doesn't work for me; probably I have to sign up to be a seller.

http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/opettay@mozilla.com-cc1b92b64280/try-macosx64/firefox-32.0a1.en-US.mac.dmg
Flags: needinfo?(mverdi)
https://developer.mozilla.org/en-US/Firefox/Releases/29/Site_Compatibility#ProgressEvent.lengthComputable_returns_false_during_a_file_upload_%28regression%29
Summary: "Unable to compute" error on Ebay photo uploader due to XHR.lengthComputable == false → "Unable to compute" error on Ebay photo uploader due to XMLHttpRequest lengthComputable == false
My friend who sent this issue to me downloaded the try build and used it to upload some photos and did not get the error.
Flags: needinfo?(mverdi)
Thanks. Patch coming then.
Flags: needinfo?(bzbarsky)
Regression and break a major website. Tracking.
Attached patch patchSplinter Review
The test isn't quite good. All of test_bug435425.html has various
randomness, so catching the error with it isn't too easy.
But I don't know minimal testcase for this.

But patch should be obvious. We do know the length when the final progress is dispatched.
Attachment #8426684 - Flags: review?(bzbarsky)
Comment on attachment 8426684 [details] [diff] [review]
patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 948246
User impact if declined: Wrong event.lengthComputable value in some rare cases
Testing completed (on m-c, etc.): just landed
Risk to taking this patch (and alternatives if risky): Shouldn't be risky 
String or IDL/UUID changes made by this patch: NA
Attachment #8426684 - Flags: approval-mozilla-beta?
Attachment #8426684 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/b9bf810a727a
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Attachment #8426684 - Flags: approval-mozilla-beta?
Attachment #8426684 - Flags: approval-mozilla-beta+
Attachment #8426684 - Flags: approval-mozilla-aurora?
Attachment #8426684 - Flags: approval-mozilla-aurora+
How can I get to the initial photo uploader?
I see http://i.imgur.com/qdrLCks.png?1 and I can't reproduce the problem in a nightly before the fix.
The link in comment 4 doesn't load too.
Flags: needinfo?(mverdi)
Attached image ebay-link.png
(In reply to Paul Silaghi, QA [:pauly] from comment #20)
> How can I get to the initial photo uploader?
> I see http://i.imgur.com/qdrLCks.png?1 and I can't reproduce the problem in
> a nightly before the fix.
> The link in comment 4 doesn't load too.

I asked my friend who sent this issue to me and she said:
People are using the "Quick Listing Tool." So you'll need to switch to the more advanced lister (which most all sellers use). I've attached a screen shot of where the link should be.
Flags: needinfo?(mverdi)
Ok, I see the uploader now, but I still can't reproduce the problem in a nightly before the fix.
Verdi, it would be nice if you could ask you friend to check the below builds to be sure this bug is fixed and can be closed.
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/30.0b8-candidates/build1/
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora
ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central
I could intermittently reproduce the initial issue on Firefox 29.0.1 on Mac OS 10.9.2 and Win 7 64-bit.
On Firefox 30 beta 8, latest Aurora 31.0a2 and latest Nightly 32.0a1 2014-05-27 I didn't encounter the "unable to compute" error on Win 7 64-bit, Ubuntu 12.10 32-bit and Mac OSX 10.9.2.
Considering this, I'm removing the "verifyme" keyword, leaving the status-flags untouched so that they can be modified afterwards. (see comment 22)
Keywords: verifyme
(In reply to Paul Silaghi, QA [:pauly] from comment #22)
> Ok, I see the uploader now, but I still can't reproduce the problem in a
> nightly before the fix.
> Verdi, it would be nice if you could ask you friend to check the below
> builds to be sure this bug is fixed and can be closed.
> ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/30.0b8-candidates/
> build1/
> ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora
> ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central

My friend said she'd test these later today.
(In reply to Paul Silaghi, QA [:pauly] from comment #22)
> Ok, I see the uploader now, but I still can't reproduce the problem in a
> nightly before the fix.
> Verdi, it would be nice if you could ask you friend to check the below
> builds to be sure this bug is fixed and can be closed.
> ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/30.0b8-candidates/
> build1/
> ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora
> ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central

My friend tried all three of these builds and did not encounter the issue with any of them.
Thanks Verdi. I'm calling this verified fixed based on your friend's testing.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.