Closed Bug 1581270 Opened 5 years ago Closed 5 years ago

browser.downloads.onCreated.addListener causing error

Categories

(WebExtensions :: Developer Tools, defect)

Desktop
All
defect
Not set
normal

Tracking

(firefox69 affected, firefox70 affected, firefox71 affected)

RESOLVED DUPLICATE of bug 1576508
Tracking Status
firefox69 --- affected
firefox70 --- affected
firefox71 --- affected

People

(Reporter: jwensley2, Unassigned)

Details

Attachments

(1 file)

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.

Attached image bug 1581270.png

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

Status: UNCONFIRMED → NEW
Component: Untriaged → Developer Tools
Ever confirmed: true
OS: Unspecified → All
Product: Firefox → WebExtensions
Hardware: Unspecified → Desktop
Version: 70 Branch → Trunk

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.

Flags: needinfo?(rob)

Closed as a duplicate, this should be the same regression we already fixed in Bug 1576508.

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(rob)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: