#7313 closed defect (rejected)

ReferenceError: browser is not defined

Reported by: Slexom Assignee:
Priority: Unknown Milestone:
Module: Platform Keywords: closed-in-favor-of-gitlab
Cc: kzar, mjethani, mapx, sebastian, geo Blocked By:
Blocking: Platform: Chrome
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by kzar)


AdBlock version: 3.4.3
Chrome version: 72.0.3626.119
OS: Windows 10, 64-bit

How to reproduce

  1. Run a React app in development on localhost
  2. Open the chromeDevTool panel
  3. Reload the page

Observed behaviour

The debugger pause the page with the following exception.

"ReferenceError: browser is not defined
at eval (eval at shouldWrapAPIs (chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/polyfill.js:209:7), <anonymous>:1:1)
at shouldWrapAPIs (chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/polyfill.js:209:7)
at chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/polyfill.js:218:7"

This issue appeared 2 days ago. Disabling ABP in localhost not solve the problem. In the app I include @babel/polyfill(version 7.2.x, latest version at this moment), can it generate conflicts?

Expected behaviour

No exception is displayed.

Change History (5)

comment:1 Changed 18 months ago by Slexom

Misclicked without filling requested info.


AdBlock version: 3.4.3
Chrome version: 72.0.3626.119
OS: Windows 10, 64-bit

comment:2 Changed 18 months ago by mapx

  • Cc kzar mjethani mapx added

comment:3 Changed 18 months ago by mjethani

I'm not sure how the error is not getting handled already given that this is what shouldWrapAPIs() looks like:

function shouldWrapAPIs()
    return !(browser.storage.local.get([]) instanceof Promise);
  catch (error)

  return true;

Is it possible for you to make a standalone React app that we can use to reproduce this issue?

comment:4 Changed 18 months ago by kzar

  • Cc sebastian geo added
  • Component changed from Unknown to Platform
  • Description modified (diff)

Thanks for taking the time to file this bug report. Please could you clarify a few things?

  • When you say to "Run a React app in development on localhost" could you provide a small example project we can use to test with?
  • When you say "Open the chromeDevTool panel" do you mean open the Chrome developer tools, or to open the Chrome developer tools and then switch to the Adblock Plus pane?
  • You mentioned "AdBlock version: 3.4.3", but later talked about ABP. Are you using the Adblock Plus or AdBlock extension? (If you're using Adblock Plus, are you using the development build, or the standard release?)

comment:5 Changed 12 months ago by sebastian

  • Keywords closed-in-favor-of-gitlab added
  • Resolution set to rejected
  • Status changed from new to closed

Sorry, but we switched to GitLab. If this issue is still relevant, please file it again in the new issue tracker.

Note: See TracTickets for help on using tickets.