Opened on 07/07/2017 at 10:37:48 AM

Closed on 08/16/2017 at 10:48:33 AM

Last modified on 09/13/2017 at 03:13:03 PM

#5386 closed defect (fixed)

Errors when using ABP WebExt build and devtools panel

Reported by: Ross Assignee: mjethani
Priority: P2 Milestone: Adblock-Plus-1.13.4-for-Chrome-Opera
Module: Platform Keywords:
Cc: trev, jsonesen, mjethani, sebastian, greiner, Ross Blocked By: #5590
Blocking: Platform: Firefox
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):



Firefox 55 (Developer).

How to reproduce

  1. Install the WebExt build of ABP.
  2. Select [ABP] > [Options]. Add a custom filter.
  3. Visit
  4. Inspect the page, open the ABP DevTools panel.
  5. Refresh the page.
  6. Select [ABP] > [Options]. Try to add a custom filter.

Observed behaviour

After installing ABP, the following error is in the console:

ReferenceError: ext is not defined include.postload.js:609:3

After opening the DevTools panle there are various errors and exceptions such as:

response is undefined include.preload.js:473

Opening the ABP Options page after opening the DevTools panel then shows a options page with no subscriptions or filters, and does not let the user add subscriptions or filters.

Expected behaviour

Errors not to occur. Opening DevTools panel not to cause errors and break using the ABP Options page.

Attachments (1) (2.7 KB) - added by mjethani on 07/21/2017 at 07:59:10 PM.
Example extension

Download all attachments as: .zip

Change History (23)

comment:1 Changed on 07/07/2017 at 10:57:15 AM by sebastian

  • Cc trev jsonesen mjethani sebastian added
  • Component changed from Unknown to Platform

comment:2 Changed on 07/07/2017 at 01:40:01 PM by mjethani

I'm able to reproduce this.

After you open the DevTools panel and reload the page, the response to get-selectors will be undefined. I'm trying to dig deeper to find out why this is. It seems like some kind of bug in Firefox given the value passed to sendResponse is in fact not undefined.

comment:3 Changed on 07/07/2017 at 02:34:52 PM by mjethani

  • Owner set to mjethani

comment:4 Changed on 07/07/2017 at 02:44:16 PM by sebastian

  • Priority changed from Unknown to P2
  • Ready set

comment:5 Changed on 07/07/2017 at 03:22:25 PM by mjethani

  • Review URL(s) modified (diff)

comment:6 Changed on 07/07/2017 at 03:22:41 PM by mjethani

  • Status changed from new to reviewing

comment:7 Changed on 07/21/2017 at 12:37:53 PM by mjethani

I have been unable to reproduce this behavior in Firefox with a simple barebones extension (see attached). Either the way things are set up in ABP is very peculiar and Firefox is unable to deal with it correctly, or we have a bug in our code (more likely) and somehow it only manifests in Firefox.

Investigating further.

Changed on 07/21/2017 at 07:59:10 PM by mjethani

Example extension

comment:8 follow-up: Changed on 07/21/2017 at 08:15:39 PM by mjethani

Alright, I had missed out the important part in my test. I've uploaded a new where you can see the problem. This looks like a bug in Firefox, I'll report it there.

If we follow the Chrome API, content scripts aren't supposed to communicate with devtools panels directly:

Messaging between the DevTools page and content scripts is indirect, by way of the background page.

But the real question is why the devtools panel is listening for messages like that in the first place. A content script can't send messages to a devtools panel anyway, and the only way for the background page to send a message is using a long-lived connection.

I believe ext/content.js has been included in devtools-panel.html by error.

comment:9 Changed on 07/21/2017 at 08:45:50 PM by mjethani

  • Review URL(s) modified (diff)

comment:10 Changed on 07/21/2017 at 10:45:42 PM by mjethani

Filed a bug in Firefox: #1383310.

comment:11 in reply to: ↑ 8 Changed on 07/25/2017 at 12:18:01 PM by mjethani

Replying to mjethani:

I believe ext/content.js has been included in devtools-panel.html by error.

It's not an error after all.

I'm going back to the original fix.

comment:12 Changed on 08/02/2017 at 06:26:36 PM by greiner

  • Cc greiner added

comment:13 Changed on 08/16/2017 at 10:46:06 AM by abpbot

comment:14 Changed on 08/16/2017 at 10:48:33 AM by mjethani

  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:15 Changed on 08/30/2017 at 09:06:21 AM by trev

  • Blocked By 5590 added

comment:16 Changed on 09/05/2017 at 10:18:35 PM by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-next

comment:17 Changed on 09/11/2017 at 06:57:17 AM by Ross


Chrome 49 / 60 / Windows 7
Opera 36 / 46 / Windows 7

Firefox 55 / Windows 7

comment:18 Changed on 09/11/2017 at 03:12:42 PM by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

comment:19 Changed on 09/11/2017 at 05:36:49 PM by Ross

  • Summary changed from Errorswhen using ABP WebExt build and devtools panel to Errors when using ABP WebExt build and devtools panel

comment:20 Changed on 09/11/2017 at 07:07:37 PM by sebastian

  • Cc Ross added

Note that the earliest supported version is Firefox 50, however, the first version supporting the devtools API is Firefox 54. So you might also want to make sure that the "Adblock Plus" developer tools panel works on Firefox 54, and while it is not available in earlier versions of Firefox, you might still want to make sure that these changes at least don't break anything on Firefox 50.

comment:21 Changed on 09/13/2017 at 11:25:33 AM by Ross

The DevTools panel appears to work correctly in Firefox 54. The only issue I noticed is the icon colour (#5659). Doesn't appear to break things on Firefox 50.

comment:22 Changed on 09/13/2017 at 03:13:03 PM by mjethani

The incorrect icon color when the focus is away from the ABP devtools panel appears to be a bug in Firefox 54.

Add Comment

Modify Ticket

Change Properties
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from mjethani.
Note: See TracTickets for help on using tickets.