Opened 17 months ago

Closed 16 months ago

Last modified 16 months ago

#6586 closed defect (fixed)

Cannot read property '_dispatch' of undefined exceptions in background console

Reported by: kzar Assignee: sebastian
Priority: P2 Milestone: Adblock-Plus-3.1-for-Chrome-Opera-Firefox
Module: Platform Keywords:
Cc: sebastian, Ross, mjethani Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/29752559
https://codereview.adblockplus.org/29777646

Description

Environment

Chrome 65, Adblock Plus devenv built from dc2d273b5a49.

How to reproduce

  1. Open the background console.
  2. Browse to http://csp.kzar.co.uk/

Observed behaviour

This exception shows in the background console multiple times a tab is opened.

Error in event handler for runtime.onMessage: TypeError: Cannot read property '_dispatch' of undefined
    at port.on (chrome-extension://ffiagampjdjojfgakjeeoipjmfmkahnn/lib/adblockplus.js:6545:41)
    at Port._onMessage (chrome-extension://ffiagampjdjojfgakjeeoipjmfmkahnn/lib/adblockplus.js:2326:22)
    at ext._EventTarget._dispatch (chrome-extension://ffiagampjdjojfgakjeeoipjmfmkahnn/ext/common.js:41:22)
    at browser.runtime.onMessage.addListener (chrome-extension://ffiagampjdjojfgakjeeoipjmfmkahnn/ext/background.js:611:26)
    at wrapper (chrome-extension://ffiagampjdjojfgakjeeoipjmfmkahnn/polyfill.js:153:20)

Expected behaviour

No exceptions shown in the background console.

Notes

This seems to be a regression caused by [​https://hg.adblockplus.org/adblockpluschrome/rev/58b0498f57cc 58b0498f57cc].

Change History (12)

comment:1 Changed 17 months ago by sebastian

I cannot reproduce this one either. Perhaps also related to the new new tab page? Never mind, I misread the issue. Apparently, I forogt about this code path.

Last edited 17 months ago by sebastian (previous) (diff)

comment:2 Changed 17 months ago by sebastian

  • Owner set to sebastian

comment:3 Changed 17 months ago by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:5 Changed 17 months ago by sebastian

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

comment:6 Changed 16 months ago by Ross

The original exception is fixed but another now occurs (in Chrome 66, could not reproduce in Chrome 49):

Error in event handler for webRequest.onBeforeRequest/20: TypeError: Failed to construct 'URL': Invalid URL
    at browser.webRequest.onBeforeRequest.addListener.details (chrome-extension://ldcecbkkoecffmfljeihcmifjjdoepkn/lib/adblockplus.js:6980:39)

comment:7 Changed 16 months ago by sebastian

I can reproduce it on Chrome 66 (but not on Chrome 65). It seems if the initiator is unknown it is set "null" (string) since Chrome 66, while previously it was just undefined in that case.

Last edited 16 months ago by sebastian (previous) (diff)

comment:8 Changed 16 months ago by sebastian

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:9 Changed 16 months ago by sebastian

  • Review URL(s) modified (diff)
  • Status changed from reopened to reviewing

comment:10 Changed 16 months ago by abpbot

A commit referencing this issue has landed:
Issue 6586 - Handle intiator of "null" on Chrome >=66

comment:11 Changed 16 months ago by sebastian

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

comment:12 Changed 16 months ago by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Fixed.

ABP 3.0.4.2044
Firefox 59 / 55 / 51 / Windows 10
Chrome 66 / 58 / 49 / Windows 7
Opera 52 / 45 / 36 / Windows 10

Note: See TracTickets for help on using tickets.