Page MenuHomePhabricator

Calling localStorage.getItem fails in MediaViewer with NS_ERROR_FILE_CORRUPTED
Closed, ResolvedPublic

Description

It's about a week I can see something weird. In about 50% times I'm clicking wiki picture (to see the file in Common or local ns-6), it doesn't work. Instead, I can see always the same error: http://www.cs.bgu.ac.il/~khitron/wiki/pictures/Screenshot9.jpg.
Thank you.

Event Timeline

IKhitron raised the priority of this task from to Needs Triage.
IKhitron updated the task description. (Show Details)
IKhitron added a project: MediaViewer.
IKhitron added subscribers: IKhitron, Amire80.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Could you paste that error here as text please (you can edit the task description), so it could be found by search engines? Which browser is this about? Thanks!

I use Mozilla.

Error loading MediaViewer: MPSP.initialize@https://bits.wikimedia.org/uk.wikipedia.org/load.php?debug=false&lang=uk&modules=jquery.color%2CcolorUtil%2Cfullscreen%7Cmmv%7Cmmv.ThumbnailWidthCalculator%2Clightboximage%2Clightboxinterface%2Cmodel%2Cprovider%2Crouting%2Cui%7Cmmv.logging.Api%2CAttributionLogger%2CDimensionLogger%2CPerformanceLogger%2CViewLogger%7Cmmv.model.Image%2CIwTitle%2CLicense%2CRepo%2CTaskQueue%2CThumbnail%2CThumbnailWidth%2CUser%7Cmmv.ui.canvas%2CcanvasButtons%2Cdescription%2Cdialog%2Cdownload%2CmetadataPanel%2Cpermission%2CprogressBar%2CstripeButtons%2CtruncatableTextField%2CviewingOptions%7Cmmv.ui.download.dialog%7Cmmv.ui.reuse.dialog&skin=vector&version=20150401T061529Z&*:107:802 MetadataPanelScroller@https://bits.wikimedia.org/uk.wikipedia.org/load.php?debug=false&lang=uk&modules=jquery.color%2CcolorUtil%2Cfullscreen%7Cmmv%7Cmmv.ThumbnailWidthCalculator%2Clightboximage%2Clightboxinterface%2Cmodel%2Cprovider%2Crouting%2Cui%7Cmmv.logging.Api%2CAttributionLogger%2CDimensionLogger%2CPerformanceLogger%2CViewLogger%7Cmmv.model.Image%2CIwTitle%2CLicense%2CRepo%2CTaskQueue%2CThumbnail%2CThumbnailWidth%2CUser%7Cmmv.ui.canvas%2CcanvasButtons%2Cdescription%2Cdialog%2Cdownload%2CmetadataPanel%2Cpermission%2CprogressBar%2CstripeButtons%2CtruncatableTextField%2CviewingOptions%7Cmmv.ui.download.dialog%7Cmmv.ui.reuse.dialog&skin=vector&version=20150401T061529Z&*:106:332 MPP.initializeHeader@https://bits.wikimedia.org/uk.wikipedia.org/load.php?debug=false&lang=uk&modules=jquery.color%2CcolorUtil%2Cfullscreen%7Cmmv%7Cmmv.ThumbnailWidthCalculator%2Clightboximage%2Clightboxinterface%2Cmodel%2Cprovider%2Crouting%2Cui%7Cmmv.logging.Api%2CAttributionLogger%2CDimensionLogger%2CPerformanceLogger%2CViewLogger%7Cmmv.model.Image%2CIwTitle%2CLicense%2CRepo%2CTaskQueue%2CThumbnail%2CThumbnailWidth%2CUser%7Cmmv.ui.canvas%2CcanvasButtons%2Cdescription%2Cdialog%2Cdownload%2CmetadataPanel%2Cpermission%2CprogressBar%2CstripeButtons%2CtruncatableTextField%2CviewingOptions%7Cmmv.ui.download.dialog%7Cmmv.ui.reuse.dialog&skin=vector&version=20150401T061529Z&*:93:142 MetadataPanel@https://bits.wikimedia.org/uk.wikipedia.org/load.php?debug=false&lang=uk&modules=jquery.color%2CcolorUtil%2Cfullscreen%7Cmmv%7Cmmv.ThumbnailWidthCalculator%2Clightboximage%2Clightboxinterface%2Cmodel%2Cprovider%2Crouting%2Cui%7Cmmv.logging.Api%2CAttributionLogger%2CDimensionLogger%2CPerformanceLogger%2CViewLogger%7Cmmv.model.Image%2CIwTitle%2CLicense%2CRepo%2CTaskQueue%2CThumbnail%2CThumbnailWidth%2CUser%7Cmmv.ui.canvas%2CcanvasButtons%2Cdescription%2Cdialog%2Cdownload%2CmetadataPanel%2Cpermission%2CprogressBar%2CstripeButtons%2CtruncatableTextField%2CviewingOptions%7Cmmv.ui.download.dialog%7Cmmv.ui.reuse.dialog&skin=vector&version=20150401T061529Z&*:90:181 LIP.init@https://bits.wikimedia.org/uk.wikipedia.org/load.php?debug=false&lang=uk&modules=jquery.color%2CcolorUtil%2Cfullscreen%7Cmmv%7Cmmv.ThumbnailWidthCalculator%2Clightboximage%2Clightboxinterface%2Cmodel%2Cprovider%2Crouting%2Cui%7Cmmv.logging.Api%2CAttributionLogger%2CDimensionLogger%2CPerformanceLogger%2CViewLogger%7Cmmv.model.Image%2CIwTitle%2CLicense%2CRepo%2CTaskQueue%2CThumbnail%2CThumbnailWidth%2CUser%7Cmmv.ui.canvas%2CcanvasButtons%2Cdescription%2Cdialog%2Cdownload%2CmetadataPanel%2Cpermission%2CprogressBar%2CstripeButtons%2CtruncatableTextField%2CviewingOptions%7Cmmv.ui.download.dialog%7Cmmv.ui.reuse.dialog&skin=vector&version=20150401T061529Z&*:27:793 LightboxInterface@https://bits.wikimedia.org/uk.wikipedia.org/load.php?debug=false&lang=uk&modules=jquery.color%2CcolorUtil%2Cfullscreen%7Cmmv%7Cmmv.ThumbnailWidthCalculator%2Clightboximage%2Clightboxinterface%2Cmodel%2Cprovider%2Crouting%2Cui%7Cmmv.logging.Api%2CAttributionLogger%2CDimensionLogger%2CPerformanceLogger%2CViewLogger%7Cmmv.model.Image%2CIwTitle%2CLicense%2CRepo%2CTaskQueue%2CThumbnail%2CThumbnailWidth%2CUser%7Cmmv.ui.canvas%2CcanvasButtons%2Cdescription%2Cdialog%2Cdownload%2CmetadataPanel%2Cpermission%2CprogressBar%2CstripeButtons%2CtruncatableTextField%2CviewingOptions%7Cmmv.ui.download.dialog%7Cmmv.ui.reuse.dialog&skin=vector&version=20150401T061529Z&*:26:939 MultimediaViewer@https://bits.wikimedia.org/uk.wikipedia.org/load.php?debug=false&lang=uk&modules=jquery.color%2CcolorUtil%2Cfullscreen%7Cmmv%7Cmmv.ThumbnailWidthCalculator%2Clightboximage%2Clightboxinterface%2Cmodel%2Cprovider%2Crouting%2Cui%7Cmmv.logging.Api%2CAttributionLogger%2CDimensionLogger%2CPerformanceLogger%2CViewLogger%7Cmmv.model.Image%2CIwTitle%2CLicense%2CRepo%2CTaskQueue%2CThumbnail%2CThumbnailWidth%2CUser%7Cmmv.ui.canvas%2CcanvasButtons%2Cdescription%2Cdialog%2Cdownload%2CmetadataPanel%2Cpermission%2CprogressBar%2CstripeButtons%2CtruncatableTextField%2CviewingOptions%7Cmmv.ui.download.dialog%7Cmmv.ui.reuse.dialog&skin=vector&version=20150401T061529Z&*:8:360 MMVB.getViewer@https://bits.wikimedia.org/uk.wikipedia.org/load.php?debug=false&lang=uk&modules=ext.cite%2CnavigationTiming%7Cext.echo.base%2Coverlay%7Cext.echo.overlay.init%7Cext.eventLogging.subscriber%7Cext.flaggedRevs.advanced%7Cext.gadget.ReferenceTooltips%2Ccollapserefs%2Cedittop%7Cext.imageMetrics.loader%7Cext.uls.eventlogger%2Cinterlanguage%7Cext.visualEditor.targetLoader%7Cext.wikimediaEvents.deprecate%2Cstatsd%7Cjquery.checkboxShiftClick%2CgetAttrs%2Chashchange%2Chidpi%2ChighlightText%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%2CscrollTo%2Csuggestions%7Cmediawiki.action.view.postEdit%7Cmediawiki.api.watch%7Cmediawiki.cookie%2Chidpi%2CsearchSuggest%2Ctemplate%2Ctoc%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.ui.anchor%2Cicon%7Cmmv.Config%2CHtmlUtils%2Cbootstrap%7Cmmv.bootstrap.autostart%7Cmmv.logging.ActionLogger%2CDurationLogger%2CLogger%7Coojs%7Cschema.Echo%2CEchoInteraction%2CEchoMail%2CNavigationTiming%2CSaveTiming%2CUniversalLanguageSelector&skin=vector&version=20150401T142242Z&*:124:37 MMVB.isCSSReady@https://bits.wikimedia.org/uk.wikipedia.org/load.php?debug=false&lang=uk&modules=ext.cite%2CnavigationTiming%7Cext.echo.base%2Coverlay%7Cext.echo.overlay.init%7Cext.eventLogging.subscriber%7Cext.flaggedRevs.advanced%7Cext.gadget.ReferenceTooltips%2Ccollapserefs%2Cedittop%7Cext.imageMetrics.loader%7Cext.uls.eventlogger%2Cinterlanguage%7Cext.visualEditor.targetLoader%7Cext.wikimediaEvents.deprecate%2Cstatsd%7Cjquery.checkboxShiftClick%2CgetAttrs%2Chashchange%2Chidpi%2ChighlightText%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%2CscrollTo%2Csuggestions%7Cmediawiki.action.view.postEdit%7Cmediawiki.api.watch%7Cmediawiki.cookie%2Chidpi%2CsearchSuggest%2Ctemplate%2Ctoc%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.ui.anchor%2Cicon%7Cmmv.Config%2CHtmlUtils%2Cbootstrap%7Cmmv.bootstrap.autostart%7Cmmv.logging.ActionLogger%2CDurationLogger%2CLogger%7Coojs%7Cschema.Echo%2CEchoInteraction%2CEchoMail%2CNavigationTiming%2CSaveTiming%2CUniversalLanguageSelector&skin=vector&version=20150401T142242Z&*:116:458 MMVB.isCSSReady/<@https://bits.wikimedia.org/uk.wikipedia.org/load.php?debug=false&lang=uk&modules=ext.cite%2CnavigationTiming%7Cext.echo.base%2Coverlay%7Cext.echo.overlay.init%7Cext.eventLogging.subscriber%7Cext.flaggedRevs.advanced%7Cext.gadget.ReferenceTooltips%2Ccollapserefs%2Cedittop%7Cext.imageMetrics.loader%7Cext.uls.eventlogger%2Cinterlanguage%7Cext.visualEditor.targetLoader%7Cext.wikimediaEvents.deprecate%2Cstatsd%7Cjquery.checkboxShiftClick%2CgetAttrs%2Chashchange%2Chidpi%2ChighlightText%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%2CscrollTo%2Csuggestions%7Cmediawiki.action.view.postEdit%7Cmediawiki.api.watch%7Cmediawiki.cookie%2Chidpi%2CsearchSuggest%2Ctemplate%2Ctoc%7Cmediawiki.page.ready%7Cmediawiki.page.watch.ajax%7Cmediawiki.ui.anchor%2Cicon%7Cmmv.Config%2CHtmlUtils%2Cbootstrap%7Cmmv.bootstrap.autostart%7Cmmv.logging.ActionLogger%2CDurationLogger%2CLogger%7Coojs%7Cschema.Echo%2CEchoInteraction%2CEchoMail%2CNavigationTiming%2CSaveTiming%2CUniversalLanguageSelector&skin=vector&version=20150401T142242Z&*:116:638

Could you please visit http://www.whatsmybrowser.org/ and copy the link it provides here, so that we could get more information about your browser? Short of that, browser, version and operating system are the main things we need.

Looking at the error in particular, it references a function which checks local storage capabilities. Do you know if you've specifically disabled local storage or have installed an extension on your browser that has something to do with it?

Lastly, I've put this jsfiddle together: http://jsfiddle.net/f3asq9sj/ If you could visit that and paste here what you see in the "result" panel at the bottom right, that would be great.

Thanks!

Here you are.
Sorry, I don't know.

Local storage present
Local storage present (2)
getItem function present
getItem function present (2)
Attempting to fetch foo
Failed to fetch foo : [Exception... "File error: Corrupted" nsresult: "0x8052000b (NS_ERROR_FILE_CORRUPTED)" location: "JS frame :: http://fiddle.jshell.net/f3asq9sj/show/ :: :: line 30" data: no]

Thank you very much for your report. It indicates that your copy Firefox has a corrupted file, presumably the file used to store local storage information.

I'll fix Media Viewer to make it work in the situation you've run into, but it's probably best that you reinstall Firefox, as you might run into similarly strange bugs on other websites.

Change 201447 had a related patch set uploaded (by Gilles):
Catch exceptions thrown by localStorage.getItem

https://gerrit.wikimedia.org/r/201447

Change 201447 merged by jenkins-bot:
Catch exceptions thrown by localStorage.getItem

https://gerrit.wikimedia.org/r/201447

Tgr renamed this task from Error loading MediaViewer to Calling localStorage.getItem fails in MediaViewer with NS_ERROR_FILE_CORRUPTED.Apr 2 2015, 1:12 PM
Tgr set Security to None.

@IKhitron: feel free to close the bug if http://en.wikipedia.beta.wmflabs.org/wiki/Lightbox_demo works for you (the fix will reach the live version in two weeks).

I can't register: every name I use is "very short", even with 14 symbols.

You don't need to register, you can just visit that page as an anonymous user and click on any image. If Media Viewer opens, the bugfix was successful (and will propagate to live wikipedias in 2 weeks, as @Tgr just said).

Thanks.
Indeed, I have no problems to open image (tried a lot) in this page.

The bug will be fixed on wikipedias in 2 weeks, thanks for your help.