Chrome browser problem - ReferenceError: browser is not defined


I am having a problem with the Chrome browser and not Firefox.

Paused on exception
ReferenceError: browser is not defined

ReferenceError: browser is not defined
at shouldWrapAPIs (polyfill.js:228)
at polyfill.js:250

I can’t identify the cause of the problem, only that it happens in Chrome and not Firefox.

Could someone give me some help indicating what causes that problem?

It shows me in polyfill.js the following.
indicating precisely the following line
return !( instanceof Promise);

function shouldWrapAPIs()
return !( instanceof Promise);
catch (error)

return true;


As indicated by error in the line return! ( () instanceof Promise); I consider that it is an error that possibly comes from saving or storing data in the browser.

I save data in the browser with the following API

export async function setItem(key: string, value: any) {
  await Storage.set({
    key: key,
    value: value

export async function getItem(key: string) : Promise<any>{
  const { value } = await Storage.get({ key: key});
  return value;
export async function removeItem(key: string) {
  await Storage.remove({ key: key });

Is it possible that the problem comes from there?

I use the API for example as shown in the following code:

      .then((res: { data: any; }) => {
        const resquest =;
        if(resquest==="User alredy taken"){
            setItem("isRegistered", user );
            setItem("infoCompleted", false);
            setItem("clientType", "1");

Thanks in advance.

The problem was fixed by disabling Abblock

1 Like

You can actually get this error without browser even being mentioned in your code! A similar fix worked for me, disabling the “Web Threat Shield” Chrome Extension.