Last modified: 2014-11-10 18:36:15 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T74115, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72115 - In VE, while adding any image using Firefox getting the error "Image corrupt or truncated" in Betalabs
In VE, while adding any image using Firefox getting the error "Image corrupt ...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
MultimediaViewer (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-16 01:08 UTC by Rummana Yasmeen
Modified: 2014-11-10 18:36 UTC (History)
14 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Screenshot (294.88 KB, image/png)
2014-10-16 01:08 UTC, Rummana Yasmeen
Details
Console log in Iceweasel 32.0.3 (117.56 KB, image/png)
2014-10-16 21:27 UTC, Greg Grossmeier
Details
Screenshot (193.74 KB, image/png)
2014-10-16 22:08 UTC, Rummana Yasmeen
Details
error message for inserted picture (295.93 KB, image/png)
2014-10-20 18:14 UTC, etonkovidova
Details

Description Rummana Yasmeen 2014-10-16 01:08:48 UTC
Created attachment 16784 [details]
Screenshot

Steps to reproduce:

1.Open any page with VE in Betalabs using Firefox
2.Go to Insert>Media
3.Search for any image and select it to add it in the page


Observed Result:
The image gets added to the page but in the console there is an error:

Image corrupt or truncated: http://upload.wikimedia.org/wikipedia/commons/1/1b/Ko_BuWe.jpg
Comment 1 Andre Klapper 2014-10-16 11:40:10 UTC
I don't see any such error in the Firefox 32 browser console when inserting the "Ko_BuWe" image in VisualEditor on http://en.wikipedia.beta.wmflabs.org.

Also, why is this under "MediaWiki General"?
Comment 2 Greg Grossmeier 2014-10-16 21:27:41 UTC
Created attachment 16790 [details]
Console log in Iceweasel 32.0.3

I can't repro in Iceweasel 32.0.3. I've attached my console log with other warnings though :)

Done on http://en.wikipedia.beta.wmflabs.org/wiki/0.7358261884200304
Comment 3 Rummana Yasmeen 2014-10-16 22:08:27 UTC
Created attachment 16792 [details]
Screenshot

Hey Greg! I just added the following image in the same page you used, and got the error:

http://en.wikipedia.beta.wmflabs.org/wiki/0.7358261884200304#mediaviewer/File:Zwaardstootplaat-Rijksmuseum_AK-MAK-1056.jpeg
Comment 4 Greg Grossmeier 2014-10-16 23:11:00 UTC
See also: http://stackoverflow.com/questions/11727219/image-corrupt-or-truncated-in-firefox

This probably isn't a Beta Cluster problem(?) so I'm moving to VE (feel free to move to where ever it really needs to be) on the assumption its a problem in the code (and I don't want it to not be addressed because it's 'hidden' in the Beta Cluster component).
Comment 5 James Forrester 2014-10-17 18:17:46 UTC
I also can't reproduce this problem (MediaViewer issue?) in Chrome, Safari or Firefox? The error as state would be from the MW media fetching/thumbnailing API it sounds like?
Comment 6 Greg Grossmeier 2014-10-20 16:31:20 UTC
From Gergo: https://bugzilla.mozilla.org/show_bug.cgi?id=646090

So, some image is corrupt (or just has had it's file extension changed, which is considered "corrupt"). Neither Mark H nor Gergo can repro. Rummana is the only person who can right now, right?

Rummana: can you repro with a clean Firefox profile?
Comment 7 Tisza Gergő 2014-10-20 16:53:29 UTC
The two images mentioned in the FF console in the screenshots:
https://commons.wikimedia.org/wiki/File:Ko_BuWe.jpg
https://commons.wikimedia.org/wiki/File:Zwaardstootplaat-Rijksmuseum_AK-MAK-1056.jpeg

The first file was loaded directly from Commons, the other from beta Commons.

I don't see why this would be a MediaViewer issue. (Was its appearence somehow correlated with using MediaViewer? MV can cause some oddities on Beta because it sometimes tries to preload thumbnails before they exist, and the resulting 404 gets cached - but this error is not related to that in any way I can see.) Some ideas:

- some sort of local issue? Happens deterministically, but no one else could reproduce...
- could be an actual image loading error: Firefox seems to emit this error if it fetches the content for an image file and it turns out not to be a valid image. Maybe the file gets truncated somehow (there were a lot of HTTP errors on beta after the HHVM switch, see e.g. bug 72162 - based on Rummana's screenshot, the file is not necessarily served by beta though, so such an error seems unlikely)
- https://bugzilla.mozilla.org/show_bug.cgi?id=941823 mentions FF errors with large files - the ones mentioned in the bug are in the 100MP range though, while the two files in the screenshots are 10MP
- there are claims that FF throws this error if you change the src of an image before it is fully loaded (e.g. http://stackoverflow.com/questions/11928878/detect-image-corrupt-or-truncated-in-firefox )

All in all, I would close this as worksforme if no one can reproduce and there are no reports of this happening in the wild.
Comment 8 etonkovidova 2014-10-20 18:14:23 UTC
Created attachment 16823 [details]
error message for inserted picture
Comment 9 etonkovidova 2014-10-20 18:21:15 UTC
I was able to reproduce the bug in FF 33. Look at the attached screenshot:  Screen Shot 2014-10-20 at 11.06.46 AM
Comment 10 etonkovidova 2014-10-20 18:29:47 UTC
The issue was reproduced in test2.
Comment 11 Greg Grossmeier 2014-10-20 18:31:06 UTC
(In reply to etonkovidova from comment #10)
> The issue was reproduced in test2.

Which confirms this is not a "Beta Cluster stability" issue.
Comment 12 Tisza Gergő 2014-10-20 19:24:14 UTC
Can you look into the contents of the HTTP response (in the Firebug network tab, or a network analysis tool like Fiddler) and check if the content is damaged somehow?
Comment 13 etonkovidova 2014-10-20 22:50:23 UTC
As far I could see, there were no errors in header request/response. However, 

there is one small thing(may be nothing): 

Image corrupt or truncated: https://upload.wikimedia.org/wikipedia/commons/3/37/African_Bush_Elephant.jpg African_Bush_Elephant.jpg


<img class="ve-ce-focusableNode-highlight-relocatable-marker" src="data:image/gif;base64,R0lGODlh…EKAAEALAAAAAABAAEAAAICTAEAOw=="></img>

And the issue still is not reproducible 100% of the time.
Comment 14 etonkovidova 2014-10-24 19:20:59 UTC
After additional investigation with Roan.

Revised steps to reproduce:
 
1. In test2 in FF - make sure that you just switched fro Read mode to Edit, or just refresh the browser window.

2. Insert - Media, type 'artist'(without quotes) to display search results.

3. In Console panel you'll see: 

Image corrupt or truncated: https://upload.wikimedia.org/wikipedia/commons/d/db/Artist_drive.JPG


In Network panel you'll see that instead of a thumbnail img - 112x149 and https://upload.wikimedia.org/wikipedia/commons/thumb/d/db/Artist_drive.JPG/112px-Artist_drive.JPG, 

the request was made for for 1536x2048 img and
GET  https://upload.wikimedia.org/wikipedia/commons/d/db/Artist_drive.JPG

The Staus code: 206(not always).

Request/Response headers:

Request headers:
Host: upload.wikimedia.org
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:33.0) Gecko/20100101 Firefox/33.0
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://test2.wikipedia.org/w/index.php?title=ET_page&redirect=no&veaction=edit
Cookie: GeoIP=US:San_Francisco:37.7898:-122.3942:v4
Connection: keep-alive

Response headers: 
Accept-Ranges:"bytes"
Access-Control-Allow-Origin:"*"
Access-Control-Expose-Headers:"Age, Date, Content-Length, X-Content-Duration, X-Cache, X-Varnish"
Age:"1652"
Connection:"keep-alive"
Content-Length:"2115604"
Content-Range:"bytes 32419-2148022/2148023"
Content-Type:"image/jpeg"
Date:"Thu, 23 Oct 2014 23:43:46 GMT"
Etag:"6eaae0b7e042739bd4a04e686eab8dea"
Last-Modified:"Mon, 07 Oct 2013 01:54:56 GMT"
Server:"nginx/1.1.19"
Via:"1.1 varnish, 1.1 varnish"
X-Cache:"cp1048 hit (2), cp1048 frontend miss (0)"
X-Object-Meta-Sha1base36:"8x65i07x23pfu6j7h8yl33asimaupwx"
X-Object-Meta-Sha1base36:"8x65i07x23pfu6j7h8yl33asimaupwx"
X-Timestamp:"1381110895.66655"
X-Trans-Id:"txc9084137ff28405983d9c-0054498c3f"
X-Varnish:"431922781 428031845, 3387585776"


If you attempt to insert again the same image -  Request URL will be correct:
https://upload.wikimedia.org/wikipedia/commons/thumb/d/db/Artist_drive.JPG/112px-Artist_drive.JPG
Comment 15 James Forrester 2014-10-27 22:19:09 UTC
Did we decide to declare this a "ghost in the machine" and move on?
Comment 16 Greg Grossmeier 2014-10-28 15:46:00 UTC
(In reply to James Forrester from comment #15)
> Did we decide to declare this a "ghost in the machine" and move on?

If Roan didn't notice the cause in the above debug, I'm not sure who ask to look deeper. It seems the wrong request is being made, right?
Comment 17 Greg Grossmeier 2014-11-10 18:21:52 UTC
Rummana/Elena: Have either of you seen this issue recently?
Comment 18 etonkovidova 2014-11-10 18:36:15 UTC
I haven't seen it recently.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links