Closed Bug 1369146 Opened 3 years ago Closed 3 years ago

WebExtensions: chrome.downloads.download will not download blob created in background script

Categories

(WebExtensions :: General, defect, P3)

53 Branch
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: yogeshuchate, Assigned: aswan)

Details

(Whiteboard: [investigating], triaged)

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0
Build ID: 20170518000419

Steps to reproduce:

While downloading the blob content like below code,


var pdfLink ="<html><body onload=myFunction()>	<script>function myFunction(){  window.location.assign('https://local.xyz.com/record/)}</script></body></html>"

var blob = new Blob([pdfLink], {
				    type: 'data:text/html;charset=utf-8'
				});
				var finalUrl= URL.createObjectURL(blob);


In Background.Js downloading the blob like below,

browser.downloads.download({url: finalUrl,filename:"abc.html"},function(download) {
			
			browser.downloads.onChanged.addListener(function (download) {
				console.log( download.state);
			});
			
		});

I am getting  below error as,









Actual results:

Security Error: Content at moz-extension://27e3d23f-12a6-4893-9849-97a7991c3b1a/_generated_background_page.html may not load data from blob:https://local.xyz.com/05fc9018-291d-47c3-ad21-291765aad500.

and after that Below message 

Unchecked lastError value: Error: Type error for parameter options (Error processing url: Error: Access denied for URL blob:https://local.xyz.com/05fc9018-291d-47c3-ad21-291765aad500) for downloads.download.




Expected results:

Not sure, But it should download the blob content. 
"Couple of month back it was working fine."
Component: Untriaged → WebExtensions: Compatibility
Product: Firefox → Toolkit
Component: WebExtensions: Compatibility → WebExtensions: General
duping
Flags: needinfo?(amckay)
I was thinking this would just be a dupe to bug 1271345, but I notice you asked the reporter to file a new bug. So I guess I shouldn't dupe?
Flags: needinfo?(amckay) → needinfo?(aswan)
I don't think this is a duplicate, bug 1271345 was fixed in 49 and this bug is being reporting in 53.
Flags: needinfo?(aswan)
Any update on this issue?

Thanks In Advance!
If there any updates, they will be added to the bug. It's unassigned at this point so its unlikely that anything will happen until a contributor takes it on board or it gets triaged.
Assignee: nobody → aswan
Priority: -- → P3
Whiteboard: [investigating], triaged
I suspect a relation to bug 1331176, but am not entirely certain about that.
I am unable to reproduce this in a recent Nightly.  If you can still reproduce this can you please attach a complete working example?
Flags: needinfo?(yogeshuchate)
Feel free to reopen this with a complete working example if you can reproduce.
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Flags: needinfo?(yogeshuchate)
Resolution: --- → WORKSFORME
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.