Open Bug 1633315 Opened 5 years ago Updated 1 month ago

sendRemoveListener on closed conduit errors spams the console

Categories

(WebExtensions :: General, defect, P3)

defect

Tracking

(firefox77 affected)

Tracking Status
firefox77 --- affected

People

(Reporter: kernp25, Unassigned)

References

Details

Attachments

(4 files)

Attached image firefox_MBxsHTOXxL.png

I know, that it is expected, that it should throw the error to the console, but it really spams the console with this error: sendRemoveListener on closed conduit simple-translate@sienori.549755894884

I also see one time in console: sendAddListener on closed conduit simple-translate@sienori.549755894554

It seems to happen often with this add-on installed: https://addons.mozilla.org/firefox/addon/simple-translate/

Flags: needinfo?(tomica)
Attached image firefox_SKYWDGguwr.png

My Browser Version: 75.0 (64-Bit)

Hello,

I have managed to reproduce the console error you encountered on the latest Nightly (77.0a1/20200429215539), Beta (76.0/20200429185419) and Release (75.0/20200403170909) under Windows 10 Pro 64-bit and Ubuntu 16.04 LTS, however, not during normal usage of the add-on.

To reproduce the error I’ve employed the following STR:

  1. Install the extension
  2. Go to about:debugging and access the add-on console via “Inspect”
  3. On the “Console” tab, refresh the page by pressing F5
    Note: Each press of F5 will produce a new set of the same error (the number after the add-on id changes with each refresh)

Are you doing anything in particular for this add-on to spam the console with the error or just normal usage of the add-on functions?

Flags: needinfo?(kernp25)

(In reply to Alex Cornestean from comment #3)

Are you doing anything in particular for this add-on to spam the console with the error or just normal usage of the add-on functions?

This add-on runs in the background and i'm using it sometimes.

Maybe there is a bug in the add-on itself?

For example.

Flags: needinfo?(kernp25)

I'm able to reproduce the scenario from Alex with many extensions (µBlock, decentraleyes, NoScript to name a few).

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → All
Hardware: Unspecified → All
Version: unspecified → Trunk

I have successfully reproduced this error.
The following listeners in the background script causes the error.

browser.storage.onChanged.addListener(() => {});
browser.contextMenus.onClicked.addListener(() => {});

I don't know how the developer can resolve this error.

Attached video ER13Go7H4p.mp4

Tested with uBlock Origin.

Is this normal, that if you open the extension popup and then closes it, it does throw the error (every time)?

Can you confirm, that open and closing the extension popup (uBlock Origin) will throw the error?

Flags: needinfo?(alexandru.cornestean)

Hello,

I can confirm the behavior stated in Comment 9 by kernp25.

Tested with uBlock Origin on the latest Nightly (78.0a1/20200504205324), Beta (77.0b1/20200504222419) and Release (75.0/20200403170909) under Windows 10 Pro 64-bit and Ubuntu 16.04 LTS.

Closing and opening the extension’s popup will throw the mentioned error.

Flags: needinfo?(alexandru.cornestean)
Severity: -- → S3
Flags: needinfo?(tomica)
Priority: -- → P3

The error message is not actionable, so we should remove it from the console.

I'm bumping the priority because it is not only logspam, it can also interfere with actual internals. As seen in bug 1640866, this bug can interrupt the cleanup of internals. Bad things could happen...

Blocks: 1640866
Priority: P3 → P2

Any progress on this?

This is an unassigned bug, so safe to say that there is no progress.

(In reply to kernp25 from comment #7)

Created attachment 9145190 [details]
ER13Go7H4p.mp4

Tested with uBlock Origin.

hi.
Did you find the reason of such behavior?

The severity field for this bug is relatively low, S3. However, the bug has 11 votes.
:mixedpuppy, could you consider increasing the bug severity?

For more information, please visit auto_nag documentation.

Flags: needinfo?(mixedpuppy)
Flags: needinfo?(mixedpuppy)
Priority: P2 → P3

When testing my extension with Event Pages ("persistent": false ), this error is logged each time the page is idle.
It is very annoying.

Any news on this bug? I get the message as well for my plugin, interestingly only after some time, about 20 seconds after Thunderbird start.

This is a serious bug for me, because sometimes my plugin stops working after it. I guess this one consequence of the "bad things" mentioned earlier. Here is a simplified version of my plugin to demonstrate the problem:

console.log("add on");

window.onload = function() {
  console.log("on load");
  browser.menus.remove("foobar_ctxVerifyAtt");

  browser.menus.create({
    id: "foobar_ctxVerifyAtt",
    title: "test",
    contexts: ["message_attachments"],
  });
}

browser.menus.onClicked.addListener(async (info, tab) => {
  if (info.menuItemId === "foobar_ctxVerifyAtt") {
      console.log("on verify");
  }
});

It adds a context menu to file attachments. I can click on the context menu one time and see the "on verify" log message. After 20 seconds, I see the "sendRemoveListener on closed conduit" message. Sometimes I can click on the menu again and it works. But then when the message appears again, the add-on doesn't work anymore. The menu is still there, but I don't see the "on verify" message, when I click on it. Sometimes I also get the message "TypeError: linkedBrowser is undefined".

Tested with Thunderbird 115.12.2 on Windows.

(In reply to Frank Buss from comment #18)

Any news on this bug? I get the message as well for my plugin, interestingly only after some time, about 20 seconds after Thunderbird start.

This is a serious bug for me, because sometimes my plugin stops working after it. I guess this one consequence of the "bad things" mentioned earlier.

The error message itself is probably a symptom rather than the root cause of your issue. I recently fixed two issues that can result in the background script becoming non-responsive to events, at bug 1905153 amd bug 1905505. Detailed write-ups are included that can help with evaluating whether they could have affected you.

The error message itself is often harmless, and more frequently triggered with event pages because that context is closed more frequently, similar to the logspam from bug 1447806.

Sometimes I also get the message "TypeError: linkedBrowser is undefined".

The error message without stack trace is not actionable, because the error is quite generic.

See Also: → 1447806

I am having the same issue, but with a different Firefox addon.
https://addons.mozilla.org/en-US/firefox/addon/download-manager/
because the default Firefox download manager sucks.
tested on the latest Firefox release channel build, v133.0.3
I get the error anytime I clock on the download manager icon to bring up its window.

I was wondering if I should have started my own bug report?
console log stack trace I think as follows..

sendRemoveListener on closed conduit download-manager@breadgrocery.github.com.549755844825 ConduitsChild.sys.mjs:122:13
_send resource://gre/modules/ConduitsChild.sys.mjs:122
removeListener resource://gre/modules/ExtensionChild.sys.mjs:688
removeListener resource://gre/modules/ExtensionChild.sys.mjs:944
register chrome://extensions/content/child/ext-storage.js:165
removeListener resource://gre/modules/ExtensionCommon.sys.mjs:2980
revoke resource://gre/modules/ExtensionCommon.sys.mjs:3002
close resource://gre/modules/ExtensionCommon.sys.mjs:3007
unload resource://gre/modules/ExtensionCommon.sys.mjs:1038
unload resource://gre/modules/ExtensionPageChild.sys.mjs:280
unload resource://gre/modules/ExtensionPageChild.sys.mjs:323
destroyExtensionContext resource://gre/modules/ExtensionPageChild.sys.mjs:495
observe resource://gre/modules/ExtensionPageChild.sys.mjs:396

This affects the Tor Browser by default, much more so now that NoScript has switched to an event page.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: