Page MenuHomePhabricator

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


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:
Thank you.

Event Timeline

IKhitron created this task.Apr 1 2015, 2:17 PM
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 project: Multimedia. · View Herald TranscriptApr 1 2015, 2:17 PM
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@*:107:802 MetadataPanelScroller@*:106:332 MPP.initializeHeader@*:93:142 MetadataPanel@*:90:181 LIP.init@*:27:793 LightboxInterface@*:26:939 MultimediaViewer@*:8:360 MMVB.getViewer@*:124:37 MMVB.isCSSReady@*:116:458 MMVB.isCSSReady/<@*:116:638
Gilles added a subscriber: Gilles.Apr 2 2015, 9:38 AM

Could you please visit 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: If you could visit that and paste here what you see in the "result" panel at the bottom right, that would be great.


Gilles claimed this task.Apr 2 2015, 9:38 AM

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 :: :: :: line 30" data: no]

Gilles triaged this task as Low priority.Apr 2 2015, 12:06 PM

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

Thank you very much.

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

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.
Tgr added a subscriber: Tgr.Apr 2 2015, 1:14 PM

@IKhitron: feel free to close the bug if 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.

Gilles added a comment.Apr 2 2015, 1:32 PM

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).

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

Gilles closed this task as Resolved.Apr 3 2015, 7:28 AM

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