Opened on 02/26/2019 at 05:51:14 PM

Closed on 08/29/2019 at 05:43:18 PM

#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)

Environment

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.

Attachments (0)

Change History (5)

comment:1 Changed on 02/26/2019 at 05:54:03 PM by Slexom

Misclicked without filling requested info.

Environment

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

comment:2 Changed on 02/28/2019 at 02:12:20 PM by mapx

  • Cc kzar mjethani mapx added

comment:3 Changed on 02/28/2019 at 05:33:11 PM by mjethani

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

function shouldWrapAPIs()
{
  try
  {
    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 on 02/28/2019 at 05:50:11 PM 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 on 08/29/2019 at 05:43:18 PM 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.

Add Comment

Modify Ticket

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