fastaddons / GroupSpeedDial

This repository is for tracking bugs and documentation only
Other
57 stars 5 forks source link

Latest Brave Update (Brave Version 1.60.114 ) May Have Broken GSD - Unable to Edit or Add Dials #292

Open gitsonique opened 10 months ago

gitsonique commented 10 months ago

Describe the bug After updating to latest version of Brave, unable to add to sites to Dials / Groups either through context menu or directly in the group. Only edit window border is visible.

Steps To Reproduce

Expected behavior

Device info:

Additional info Add any other info about the problem here.

Juraj-Masiar commented 10 months ago

Hello, Try to restart your browser, that often helps with random issues like this. (it sounds like the background script is not running) You can also check the runtime errors - from the main menu / Advanced / Send error logs...

gitsonique commented 10 months ago

Unfortunately, that doesn't work. I was able to add once after restarting. And the edit window came up once but the edit didn't save and adding / editing goes back to behavior previously mentioned. Did send error logs

Juraj-Masiar commented 10 months ago

Interesting... I'll check it in the morning when I get back to the office. Note that I didn't received the logs, I should probably rename the button "Send error logs..." to "Show error logs" because it doesn't send it, you need to manually send it as email or copy and paste it here :).

gitsonique commented 10 months ago

The logs don't display either. Is the file automatically, saved somewhere? I don't see in settings

Juraj-Masiar commented 10 months ago

You mean this window is empty? image

gitsonique commented 10 months ago

Correct. Nothing

Juraj-Masiar commented 10 months ago

OK I've checked the code and I see the error logs are pulled from background script too (I should change that...). Anyway, this tell us that the background script is indeed not working.

So, if restarting doesn't help, see this article for further instructions on how to fix it: https://github.com/fastaddons/GroupSpeedDial/wiki/Fixing-broken-dials-page

gitsonique commented 10 months ago

Looks like the re-install worked. Thanks for the quick responses and the extension. It's great

Juraj-Masiar commented 10 months ago

No problem :), I'm happy it works now. But it's troubling that it can break just like that...

gitsonique commented 10 months ago

I may have spoke too soon. After using browser for a bit, same issues are back.

Juraj-Masiar commented 10 months ago

Oh, not good! Does your other extensions work as expected?

Also, try to open this page: chrome://serviceworker-internals/

And look for: imfeikbeimbfpmgfkkmjekabdehiiajc (it's my extension ID)

And copy and paste here the block that contains this ID.

gitsonique commented 10 months ago

So, checking chrome://serviceworker-internals/, there are only a few extensions. What is strange and I think why that might be is it is looking ../Library/Application Support/BraveSoftware/Brave-Browser/Default (2) which seems like there is a second Default profile. But when I check I do not see that. Searching for GSD extension I do see two folders that look to be the same though. Not sure if that means anything. Other extensions seem to be working.

Screenshot 2023-11-09 at 12 27 13 PM
Juraj-Masiar commented 10 months ago

But did you find my extension ID in the chrome://serviceworker-internals page? If yes, please copy and paste the text there here. The files on the drive are fully handled by the browser so I can't say if what you see there is OK or not.

The issue is somehow related to not working service worker (the background script). Did you changed some Brave settings recently? Maybe you could try to reset Brave settings: brave://settings/reset

gitsonique commented 10 months ago

Sorry, I thought it was clear. No, I do not see your extension. As mentioned, there are only 3 items in the list and GSD is not one of them. I haven't changed any settings but as mentioned I did update. Looking through release notes, I do not see anything obvious that would impact service worker. https://brave.com/latest/

Juraj-Masiar commented 10 months ago

If you disable and enable the extension, will the service worker reappear? If not, try to reinstall it again and see if the service worker it there.

I think this may be caused by this bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1271154 And it seems to be affecting only Linux users (so also MacOS). That would explain why there is not more people complaining.

Note that my extension doesn't handle service worker life, it's fully controlled by the browser so there is not much I can do :(

gitsonique commented 10 months ago

It does reappear after disable / enable.

Juraj-Masiar commented 10 months ago

Hmm... at least there is an easy way to fix it :) Let's see how it will last. The good news is, the bug is still active and has high priority and a lot of stars, so there is a good chance it will get fixed in near future!

gitsonique commented 10 months ago

It does look like this could be related to that bug which isn't a real good sign being that it has been open for some time.

gitsonique commented 10 months ago

Right, I guess that is where we are. Thanks again, for the help and quick responses..

Juraj-Masiar commented 10 months ago

No problem. Please keep me in the loop when it breaks again. And maybe you notice some pattern that could help prevent it...

gitsonique commented 10 months ago

One thing that I do notice; after restarting you can add / edit a dial but once you save that is when you will have to disable / enable again. After any edit. fyi

Juraj-Masiar commented 10 months ago

Even while the dials page is opened? Like, you can't edit two dials if you wanted because it breaks after the first edit is saved?

I would guess, something crashes and un-registers the service worker. But I would say it should be impossible. Let's try one more experiment:

  1. open this page: chrome://extensions/?id=imfeikbeimbfpmgfkkmjekabdehiiajc
  2. in the upper right corner enable "Developer mode"
  3. at the bottom of the page, enable "Collect errors" switch
  4. and lastly, in the section "Inspect views", click the row that says "service worker"
  5. it will open new "DevTools" window - keep it opened somewhere on the side and try to edit dials. While the "DevTools" window is opened, the service worker should not even go to sleep, so let's see if it somehow affects it. It should also print errors if anything breaks.
gitsonique commented 10 months ago

Correct. While on the same page without leaving. A couple of observations:

Juraj-Masiar commented 10 months ago

Interesting... I have there a code that should prevent worker from being killed while the dials page is opened but I can see even here that it's not working and the worker is killed after 30 seconds. Still, it's not an issue because the worker will wake up again when it receives a message. But in your case, it's somehow completely unregistered, which should be impossible.

In any case, as a workaround, I could implement a special option that would keep the service worker active all the time (this is how extensions used to work not long ago, so it's fine).

Let's try a proof of concept first:

  1. click the "service worker" in the extensions page to open DevTools window
  2. in the Console tab, paste this code and press Enter:
    self.setInterval(() => browser.tabs.getCurrent(), 2e4)
  3. then close the window This should keep the worker running until you restart browser.
gitsonique commented 10 months ago

That seems to be working. Added / edited several dials, no issue.

gitsonique commented 9 months ago

Hey, Juraj. I just wanted to check in with you on this one. Are you planning on a permanent solution for this? I really like this extension and it would great to have an update but until then I will keep using this work around. Thanks again

Juraj-Masiar commented 9 months ago

Hello, Is this still an issue? I did released an update (already weeks back) that prevents service worker (the background script) from being killed while the dials page is opened, so that should help a bit. But... if in your case the service worker will never wake up again, then this will need a different fix. In any case, this is clearly a browser issue, especially if reinstalling my extension didn't fixed it. Could you try to install a different brave version? For example the Brave Beta: https://brave.com/download-beta/ It should use a new profile so whatever bugs there are now should disappear. And if they don't disappear, then it would mean it's either bug in Brave, or some other software is interfering with Brave.

Also, did you tried to delete manually the extension from the drive? You could try to uninstall it and then look for folders with name that contains "imfeikbeimbfpmgfkkmjekabdehiiajc" and deleting them. Although, not waking up service worker is again something that a browser should do, not extension.

gitsonique commented 8 months ago

Yeah, this is still an issue. I re-installed to latest version Brave, GSD and tried a new profile as well. It's weird that it just started happening. It was fine for a long time. Not sure where to go from here.

Juraj-Masiar commented 8 months ago

ok, I see what I can do, I'll try to add some special secret option that will keep the service worker alive. I plan to release new version next week, so I'll try to include it in the 24.7 release.

Juraj-Masiar commented 7 months ago

Done! New version 24.7 has been finally approved in Chrome store, you should receive this update soon. In this version, in the popup window (or in the Options page), you can find a secret "bug" icon that shows a secret setting, try to enable it: image

I'm sorry it took me so long to release it, I had to deal with some unexpected issues in my other addon.

gitsonique commented 7 months ago

Awesome. Thanks for the update.