browser.downloads.onCreated.addListener causing error
Categories
(WebExtensions :: Developer Tools, defect)
Tracking
(firefox69 affected, firefox70 affected, firefox71 affected)
People
(Reporter: jwensley2, Unassigned)
Details
Attachments
(1 file)
|
76.39 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0
Steps to reproduce:
Create an extension with a background script that registers a download created listener, and then download a file.
Example code:
browser.downloads.onCreated.addListener((downloadItem) => {
console.log('browser.downloads.onCreated', downloadItem);
});
Actual results:
The log message does not appear the web extension debugging console, but an error and warning appear in the browser console.
[Warning] Sending message that cannot be cloned. Are you trying to send an XPCOM object? MessageChannel.jsm:369:26
[Error] DataCloneError: The object could not be cloned. ExtensionParent.jsm:1213
Expected results:
The downloadItem for the downloaded file should be logged to the console.
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
Hi @Joseph Wensley, checked the issue on several machines & FF versions:
[Platform affected]: Windows 10, Mac OS X, Ubuntu 18.04
[FF versions]: nightly 71.0a1, beta 70.0b7, release 69.0.1
=> on all machines and FF versions I get the same messages as are presented in the description. I will add a screenshot to see how it looks in my end. Further, I will add a component, if isn't the right one please fell free to change it.
Regards,
Liviu
I can confirm this issue on Firefox 70.0b6 (Build ID 20190912160217), but not on Firefox 69.0 (20190827005903).
Here’s the complete code I used to test this: https://github.com/fuzzykiller/download-cleaner-lite/tree/test-firefox70-regression
onDownloadChanged still works as expected.
Updated•6 years ago
|
Comment 4•6 years ago
|
||
Closed as a duplicate, this should be the same regression we already fixed in Bug 1576508.
Description
•