quasarframework / quasar

Quasar Framework - Build high-performance VueJS user interfaces in record time

Home Page:https://quasar.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Google Chrome extension does not open after restarting the browser

gangal86 opened this issue · comments

What happened?

Google Chrome extension does not open after restarting the browser

What did you expect to happen?

I want it to open)

Reproduction URL

no url

How to reproduce?

  1. Open BEX on Chrome

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

BEX Mode

Platforms/Browsers

Chrome

Quasar info output

No response

Relevant log output

No response

Additional context

The problem is in the file src-bex/background.js

I changed this code


chrome.runtime.onInstalled.addListener(() => {
  chrome.action.onClicked.addListener((/* tab */) => {
    // Opens our extension in a new browser window.
    // Only if a popup isn't defined in the manifest.
    chrome.tabs.create({
      url: chrome.runtime.getURL('www/index.html')
    }, (/* newTab */) => {
      // Tab opened.
    })
  })
})

to this


function openExtension() {
  chrome.tabs.create(
    {
      url: chrome.runtime.getURL('www/index.html'),
    },
    (/* newTab */) => {
      // Tab opened.
    },
  );
}

chrome.runtime.onInstalled.addListener(() => {
  openExtension();
});

chrome.action.onClicked.addListener(() => {
  openExtension();
});

And everything started to work

Hi @gangal86! 👋

It looks like you provided an invalid or unsupported reproduction URL.
Do not use any service other than Codepen, jsFiddle, StackBlitz, Codesandbox, and GitHub.
Make sure the URL you provided is correct and reachable. You can test it by visiting it in a private tab, another device, etc.
Please edit your original post above and provide a valid reproduction URL as explained.

Without a proper reproduction, your issue will have to get closed.

Thank you for your collaboration. 👏

Thanks for reporting this!
Will be available when spawning bex with q/app-vite v1.7.4 & 2.0.0-beta.4 and q/app-webpack 4.0.0-beta.6