Opened on 01/24/2016 at 07:54:00 PM

Closed on 02/11/2016 at 01:47:23 PM

Last modified on 08/15/2016 at 05:45:25 PM

#3568 closed defect (fixed)

"window.location is null" error prevents blocking pop-ups

Reported by: SMed79 Assignee: trev
Priority: P3 Milestone: Adblock-Plus-2.7.2-for-Firefox
Module: Adblock-Plus-for-Firefox Keywords:
Cc: trev, erikvold, mapx, sebastian, greiner, arthur Blocked By: #4335
Blocking: Platform: Firefox
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

Description (last modified by trev)


OS: Manjaro Linux
Firefox 43.0.4
Adblock Plus 2.7.1

How to reproduce

1- Go to
2- Click anywhere.

Observed behaviour

A pop-up opens: redirecting to redirecting to Blockable items list doesn't show a pop-up. Message "window.location is null" shows up in Error Console pointing to lib/child/utils.js line 64 (function getWindowLocation).

Expected behaviour

Pop-up should be blocked by filter ||^$popup,third-party in EasyList, no error messages.


This site hides the opener of the window using the following code:

var wnd1 ="");
var wnd2 =;
  wnd2.location = "";
}, 100);

So the actual target is being opened via an intermediate window which is immediately closed. The intermediate window being gone makes it impossible for us to retrieve the pop-up's opener, instead we get a dummy window which doesn't have a location.

Attachments (0)

Change History (20)

comment:1 Changed on 01/25/2016 at 01:11:27 PM by mapx

  • Cc trev erikvold mapx added
  • Component changed from Unknown to Adblock-Plus-for-Firefox

comment:2 Changed on 01/26/2016 at 02:04:25 PM by mapx

could be the same issue ? ==>

comment:3 Changed on 01/26/2016 at 07:30:29 PM by mapx

  • Cc sebastian greiner added

comment:4 Changed on 01/26/2016 at 07:31:46 PM by mapx

ublock has already a $popunder feature blocking this sort of ads

comment:5 Changed on 02/04/2016 at 02:39:59 AM by SMed79

another example open an popup in newtab redirect to (same click anywhere).

comment:6 Changed on 02/09/2016 at 10:46:47 PM by sebastian

If I understand the issue correctly, this isn't a regression as implied by the title, but refers to the technique that websites deploy to circumvent popup blocking by loading the actual content in the new document, while navigating the current document to a page showing advertisement. It seems that uBlock introduced a $popunder filter option to block this behavior, which seems reasonable and worth consideration.

comment:7 Changed on 02/10/2016 at 11:05:14 AM by Compuitguy


It is an old issue that is being discussed here

#2095 (Prevent background redirects)

comment:8 Changed on 02/10/2016 at 01:17:14 PM by trev

  • Description modified (diff)
  • Priority changed from Unknown to P1
  • Ready set
  • Summary changed from popup blocking broke [ABP 2.7.1] to "window.location is null" error prevents blocking pop-ups

No, this has nothing to do with background redirects, not sure where you've got it from. Both sites open regular pop-ups, triggered by click. The problem is that our code fails to see the location of the pop-up window for some reason. I updated the description and title accordingly.

comment:9 Changed on 02/10/2016 at 01:23:06 PM by trev

Looking at, window.location can only be null for a window without a docshell. To my knowledge that's supposed to be an impossible situation for Gecko, but maybe something changed...

comment:10 Changed on 02/10/2016 at 01:29:38 PM by trev

I verified that the issue is reproducible in Firefox 38, 44 and 47 - so clearly nothing relevant changed Gecko-wise.

comment:11 Changed on 02/10/2016 at 02:39:05 PM by trev

  • Description modified (diff)

comment:12 Changed on 02/10/2016 at 02:44:58 PM by Compuitguy

My comment wasn't related to this issue.

It was a response to the the previous comments about background redirects.

comment:13 Changed on 02/10/2016 at 02:53:35 PM by trev

  • Owner set to trev

comment:14 Changed on 02/10/2016 at 03:15:39 PM by trev

  • Priority changed from P1 to P3
  • Review URL(s) modified (diff)

Decreased priority given that this doesn't appear to be a regression - rather the website messing with us.

comment:15 Changed on 02/11/2016 at 01:47:23 PM by trev

  • Milestone set to Adblock-Plus-for-Firefox-next
  • Resolution set to fixed
  • Status changed from new to closed

comment:16 Changed on 02/24/2016 at 12:10:53 PM by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Fixed. The popup tab is opened for a split second, then it is closed.

ABP 2.7.2
Firefox 38.0 / Firefox 43.0.1 / Ubuntu 14.04 x64

comment:17 Changed on 02/25/2016 at 04:37:15 PM by SMed79

Some one can investigate if the data: URI popup can be handled/blocked by ABP on

Last edited on 02/25/2016 at 04:37:58 PM by SMed79

comment:18 Changed on 03/08/2016 at 09:45:49 AM by arthur

I checked it with the latest dev build on but it's not working. It does in Chrome though.

comment:19 Changed on 03/08/2016 at 09:46:48 AM by arthur

  • Cc arthur added

comment:20 Changed on 08/15/2016 at 05:45:25 PM by trev

  • Blocked By 4335 added

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 trev.
Note: See TracTickets for help on using tickets.