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

RESOLVED WORKSFORME

Status

()

Toolkit
WebExtensions: General
P3
normal
RESOLVED WORKSFORME
3 months ago
2 months ago

People

(Reporter: Yogesh, Assigned: aswan)

Tracking

53 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [investigating], triaged)

(Reporter)

Description

3 months ago
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."

Updated

3 months ago
Component: Untriaged → WebExtensions: Compatibility
Product: Firefox → Toolkit

Updated

3 months ago
Component: WebExtensions: Compatibility → WebExtensions: General

Comment 1

2 months ago
duping
Flags: needinfo?(amckay)

Comment 2

2 months ago
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)
(Assignee)

Comment 3

2 months ago
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)
(Reporter)

Comment 4

2 months ago
Any update on this issue?

Thanks In Advance!

Comment 5

2 months ago
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.

Updated

2 months ago
Assignee: nobody → aswan
Priority: -- → P3
Whiteboard: [investigating], triaged
I suspect a relation to bug 1331176, but am not entirely certain about that.
(Assignee)

Comment 7

2 months ago
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)
(Assignee)

Comment 8

2 months ago
Feel free to reopen this with a complete working example if you can reproduce.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 months ago
Flags: needinfo?(yogeshuchate)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.