ChromeExtension-ForceBackgroundTab icon indicating copy to clipboard operation
ChromeExtension-ForceBackgroundTab copied to clipboard

Not always working correctly in version 2.2.1

Open ImintA2 opened this issue 1 year ago • 9 comments

Before version 2.2.1, the function consistently worked without fail. However, in version 2.2.1, tabs occasionally and randomly open as foreground tabs instead of in the background.

ImintA2 avatar Dec 16 '24 20:12 ImintA2

Check the configuration of the options page and list the rules

monque avatar Dec 17 '24 15:12 monque

Like this?: 2024-12-17 23 52 29 More info: I'm using Catsxp 4.11.3 (Kernel: 131.0.6778.89).

I've reverted to an older version of the extension for now. I'm just curious if I'm the only one experiencing this issue. If that's the case, I guess I'll need to check if something on my end is causing it.

ImintA2 avatar Dec 17 '24 16:12 ImintA2

You are not alone, I'm having the same issue on Chrome 131.0.6778.140, W11.

Orevin avatar Dec 19 '24 18:12 Orevin

I've received similar feedback, but I'm unable to reproduce the issue yet.

Could you please check the extension Service Worker logs in the Chrome console?

monque avatar Dec 22 '24 15:12 monque

Could you please check the extension Service Worker logs in the Chrome console?

How do I do that? Do you mean inspecting the background js from chrome://inspect/#service-workers ? I'll try when it happens next time.

ImintA2 avatar Dec 22 '24 15:12 ImintA2

Yes, inspect the background js from chrome://inspect/#service-workers

link may like chrome-extension://dbepggeogbaibhgnhhndojpepiihcmeb/background_scripts/background.js

monque avatar Dec 23 '24 04:12 monque

So here's what I've observed:

  1. If I kept the inspection opened, the extension would actually keep on working correctly, with logs like Tab Active ######## in the console.
  2. If I then close the inspection and then open it again right away, I can see all the logs are preserved.
  3. Now, if I close the inspection and continue browsing, the extension will start to stop working randomly after a while. When this happens and I open the inspection again, the logs will all be gone with only Options loaded Object and a timestamp of just a few seconds ago.

Extension page showing the service worker as 無法使用 ('unavailable' in English?): 2024-12-23 18 13 37 the only log in the console when I open it right after the extension failed to open a tab in the background: 2024-12-23 18 13 05

ImintA2 avatar Dec 23 '24 10:12 ImintA2

It seems related to Chrome's rules on background service workers. https://stackoverflow.com/questions/66114920/service-worker-registration-failed-chrome-extension.

A new version (v2.2.2) has been submitted today. https://github.com/monque/ChromeExtension-ForceBackgroundTab/commit/d66cd411ee276c937f5341912ecba06b7b09af77

Two suggestions:

  1. Try updating Chrome to the latest version.
  2. Update the extension to v2.2.2.

Please let me know if the extension works.

monque avatar Dec 23 '24 12:12 monque

I tried v2.2.2 in dev mode, and unfortunately it still randomly stops working from time to time. Checking the Service Worker logs right after a tab failing to open in the background would revel the same - only a Options loaded entry in the console, no logs of Tab Active etc.

ImintA2 avatar Dec 23 '24 13:12 ImintA2