Skip to content

Error: port.onDisconnect.hasListeners is not a function

Environment

  • Ubuntu 18.04
  • Firefox 78.0.2
  • Adblock Plus 3.9 (or >= 3.0])

How to reproduce

  1. Have the extension devtools opened: about:debugging#/runtime/this-firefox > ABP "Inspect" button > Console tab
  2. Go to https://adblockplus.org (or any other page)
  3. Open the "block element" feature and pick an element from the site. Composer popup window will appear.
  4. Close the composer window (e.g. cancel button).

Observed behavior

An error with message port.onDisconnect.hasListeners is not a function will appear in the extension devtools console

Expected behavior

No error should be thrown.