Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#4386 closed defect (fixed)

Document domain determined incorrectly after a redirect

Reported by: mapx Assignee: trev
Priority: P2 Milestone: Adblock-Plus-1.12.4-for-Chrome-Opera-Safari
Module: Platform Keywords:
Cc: trev, kzar, sebastian, greiner Blocked By:
Blocking: Platform: Chrome
Ready: yes Confidential: no
Tester: Unknown Verified working: yes
Review URL(s):

Description (last modified by trev)


windows 10
chrome 53
ABP 1.12.2

How to reproduce

Observed behaviour

  • the page is not whitelisted

Expected behaviour

  • the page should be whitelisted, the ads visible, should be exactly as in ABP for firefox

If I remove from whitelisted domains and add
the landing page:

...will be whitelisted !

on forum:


chrome.webNavigation.onBeforeNavigate isn't being triggered after the redirect, it's merely being triggered for the original URL. It seems that we are using the wrong callback here - we shouldn't get the original URL in the first place because there is no document associated with it. Also, I suspect that onBeforeNavigate doesn't actually mean that the previous document is unloaded or that the navigation will definitely occur.

What to change

The chrome.webNavigation.onCommitted callback seems more appropriate here, as this one will only fire when the current document is replaced - which is what we need.

Change History (8)

comment:1 Changed 4 years ago by trev

  • Priority changed from Unknown to P1
  • Ready set
  • Summary changed from different behaviour in ABP firefox / chrome regarding whitelisting domains to Document domain determined incorrectly after a redirect

I can confirm this, seems to be a timing issue. The requests are being attributed to the wrong document URL, also visible in our Developer Tools panel (document domain is being shown as - but only if I open Developer Tools when the page is loading already, having it open from the start makes things work correctly.

comment:2 Changed 4 years ago by trev

For reference, I reproduced this with the latest repository state on Chrome 52 and Mac OS X. I cannot really imagine this not being a regression however, probably caused by some internal Chrome change.

comment:3 Changed 4 years ago by trev

  • Description modified (diff)
  • Owner set to trev

comment:4 Changed 4 years ago by kzar

  • Review URL(s) modified (diff)

comment:6 Changed 4 years ago by trev

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

comment:7 Changed 4 years ago by sebastian

  • Priority changed from P1 to P2

comment:8 Changed 4 years ago by rraceanu

  • Verified working set

Issue no longer occurs, domains are whitelisted after redirect, verified on ABP version, Chrome 41,45,51,53,54.

Note: See TracTickets for help on using tickets.