The default bug view has changed. See this FAQ.

createObjectURL incorrect rendering

RESOLVED WORKSFORME

Status

()

Core
DOM
RESOLVED WORKSFORME
3 years ago
a year ago

People

(Reporter: Aymeric Vitte, Unassigned)

Tracking

({testcase-wanted})

25 Branch
x86
Windows Vista
testcase-wanted
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
User Agent: Mozilla/5.0 (Windows NT 6.0; rv:25.0) Gecko/20100101 Firefox/25.0 (Beta/Release)
Build ID: 20131112160018

Steps to reproduce:

Related to 944918 and 945281

Except that following http://lists.w3.org/Archives/Public/public-webapps/2013OctDec/0743.html the method has been changed: chunks are stored in IDB as Blobs and concatenated at the end.

I don't know how to produce a reduced test case but this happens for example doing:

load file, store in IDB (initial blob) --> encrypt file, store in IDB --> decrypt file, store in IDB (decrypted blob)

Let's say the file is a mp4 file, doing a.href=document.createObjectURL(decrypted blob) will not display the video, or partially and stop.

a.href=document.createObjectURL(initial blob) works.

I checked that initial blob and decrypted blob are the "same" files (same hash)

Now, refreshing the page and retrying the decrypted blob retrieved from indexedDB will work again.

This new decrypted blob is exactly the decrypted blob above that was stored in indexedDB after concatenation and for which createObjectURL did not render correctly.

So the conclusion seems to be that the concatenated blob is correctly stored in IDB but for some reasons does not render correctly with createObjectURL.

Same tests have been performed with Chrome without any problem.

The issue is still there with Nightly.
(Reporter)

Comment 1

3 years ago
Note: Chrome does not support storing Blobs in indexedDB for now, so ArrayBuffers are stored instead and concatenated as a Blob.
Component: Untriaged → Web Apps
Please attach a testcase or post a link to one.
Component: Web Apps → DOM
Product: Firefox → Core
Are you trying to reuse the same result from createObjectURL?  The URL is automatically revoked when the page is unloaded (in this case, when you refresh) so the old createObjectURL is no longer valid.  You need to call createObjectURL again with the blob that you just retrieved from indexedDB.
(Reporter)

Comment 4

3 years ago
I will post a link when available or a test case.

Not sure my description was clear:

- slice blob, decrypt chunks, concatenate decrypted chunks = decrypted_blob, store decrypted_blob in IDB (decrypted_blob2)

- createObjectURL(decrypted_blob) --> NOK, incorrect rendering

- save decrypted_blob on the disk, open with video player --> OK

- retrieve decrypted_blob2, createObjectURL(decrypted_blob2) --> OK

Conclusion: only decrypted_blob after chunk concatenation behaves incorrectly
Yeah, a link or testcase would be great.
Keywords: testcase-wanted
(Reporter)

Comment 6

3 years ago
That's not a test case, neither a link for now, but you can look at the demo video here: http://www.peersm.com

and jump to 12mn 3/4s --> We tried to hide it but if you observe correctly, after opening the video you can see that the video freezes (which does not happen with Chrome as we can see in the video too)
(Reporter)

Comment 7

3 years ago
Still not a reduced test case but you can now see the issue:

http://peersm.com/peersm
Key: 00112233445566778899aabbccddeeff

Download: d5e505e844464056f31cd30e861139dcdc5d2b39

Rename as: collusion.mp4

Open/save: the video starts and gets frozen

Save as collusion.mp4 on your disk

Open from your disk: the video works

Conclusion: createObjectURL incorrect rendering
(Reporter)

Comment 8

3 years ago
I forgot: if you refresh the page and open the video again, this will work.
Trying to follow the steps from comment 7.  I load the page.  It prompts for the key.  I put in the key.  It does some "loading" thing.  Then I put the "d5e505e844464056f31cd30e861139dcdc5d2b39" string into the "Enter url or hash name" textbox and click the "Download" button, right?  It pops up some dialog that immediately disappears, then nothing happens...
(Reporter)

Comment 10

3 years ago
Yes, sorry, I gave the wrong reference (the dialog says that the file can not be retrieved), please put: bfee6892dd7a1cc5c167aa00f4d0544fc8549e22, you can let me know by email if there are further problems.
(Reporter)

Comment 11

3 years ago
I suppose it did not work, please try it again, it's more stable now.

Question: can we stream a media right now with createObjectURL? (ie createObjectURL(Blob) augmenting the blob)
Hi Aymeric,

I have tested this issue with the provided steps from comment 7 on latest Firefox (44.0.2) release, latest Nightly (47.0a1) build and I could not reproduce it. The video played without freezing. I was able to watch the entire video without any problems.

Firefox: 47.0a1, Build ID: 20160216030245
User Agent  Mozilla/5.0 (Windows NT 6.0; rv:47.0) Gecko/20100101 Firefox/47.0
Firefox: 44.0.2, Build ID: 20160210153822
User Agent  Mozilla/5.0 (Windows NT 6.0; rv:47.0) Gecko/20100101 Firefox/44.0

Can you please test this on the latest Firefox release (44.0.2) or latest Nightly (47.0a1, https://nightly.mozilla.org/) and tell me if this still reproduces for you ? When doing this please use a new fresh Firefox profile, maybe also in safe mode (https://support.mozilla.org/en-US/kb/troubleshoot-and-diagnose-firefox-problems). 

Thanks,
Cosmin.
Flags: needinfo?(avitte)
Hi,

Considering the fact that I cannot reproduce this and the fact that the reporter did not answered to my request until now, I will mark this as Resolved-Worksforme.
If anyone can still reproduce it, feel free to reopen the issue and provide more information.

Thanks,
Cosmin.
Status: UNCONFIRMED → RESOLVED
Last Resolved: a year ago
Flags: needinfo?(avitte)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.