simple-tab-groups icon indicating copy to clipboard operation
simple-tab-groups copied to clipboard

STG keeps crashing on FF Nightly 136.0a1

Open mmattq opened this issue 1 year ago • 20 comments

Describe the bug STG addon keeps crashing on Firefox Nightly 136.0a1

To Reproduce Steps to reproduce the behavior:

  1. Pin the extension button to the Firefox toolbar
  2. Click on the extension button
  3. Create multiple groups
  4. Try to change groups. Firefox shows an error, STG displays weird characters (probably because DEBUG is enabled), and then it changes the group. After clicking on "Disable DEBUG", the STG addon restarts itself.

Expected behavior It should not crash.

Screenshots

Image

Image

Image

Desktop (please complete the following information):

  • OS and version: Arch Linux
  • Firefox version: 136.0a1
  • Simple Tab Groups version: 5.2

Additional context It works in FF 134.

mmattq avatar Jan 21 '25 15:01 mmattq

This happened to me occasionally before, but since 136.0a1, this has greatly increased in frequency. Currently seeing this on Nightly from 136.0a1 (2025-01-28).

Worth noting: I am using the native Tab Groups feature in parallel. I'm not sure it's related, but maybe there's some interaction between the two pieces that don't play well?

shtrom avatar Jan 28 '25 19:01 shtrom

Experiencing this issue too. Since the new native tab groups feature is active by default on nightly now i try to disabled by setting browser.tabs.groups.enabled to false in the about:config but doesn't seems fix it unfortunately

TixieSalander avatar Jan 28 '25 22:01 TixieSalander

The cause of the regression has been identified in https://bugzilla.mozilla.org/show_bug.cgi?id=1944505

In Firefox 136, the menus.update and menus.remove methods now raise an error instead of ignoring errors silently when a menu item already exists. That was changed in https://bugzilla.mozilla.org/show_bug.cgi?id=1688743

Rob--W avatar Jan 29 '25 09:01 Rob--W

Since there's numerous people already asking how to apply the fix from #1250 on their end, I've been working on making a solution available to everyone as soon as possible.

For now I've reached out to @Drive4ik directly in hopes that they'll be able to release the fix the normal way...

In the meantime, I've created a fork with a rudimentary GitHub Actions build to simply provide an installable ZIP file of the addon including the fix that ahal provided.

Disclaimer:

  • Firefox addons are generally required to be signed in order to be installed
  • The mechanisms available to avoid this are intended for addon developers and may impose security risks, so proceed at your own discretion
  • The ZIP should be considered "random code found on the internet" and is obviously risky to blindly install... So I encourage everyone to extract the ZIP and look through the provided code at their own discretion.
  • Before doing any of this, I suggest creating:
    • an STG backup, if you're still able to use your STG
    • a backup of your Firefox Profile

Instructions to use unsigned addons

The addon ZIP for my fork can be found here: https://github.com/philg-dev/simple-tab-groups-ff136/actions/runs/13212445029/artifacts/2557913117

Important Note: you need to extract this ZIP file to get the ZIP file inside of it, which can then be used for installation. Sorry for this inconvenience.

There's two ways of using unsigned addons:

  1. temporarily through "Debug Addons":
    • restarting Firefox will remove the addon
    • for an addon like STG which is very integral to your browser workflow that's probably extremely annoying
  2. permanently by allowing unsigned addons, which is:
    • inherently risky
    • only available in Firefox nightly, Developer Edition and ESR (i.e. unavailable in the normal Firefox stable release)
    • makes the most sense for using STG

To temporarily install an unsigned addon: (I don't recommend this, but you can use this for testing)

  • visit: about:debugging
  • on the left select "This Firefox"
  • select "Load Temporary Add-on..."
  • select the addon ZIP file (or alternatively the manifest.json file after extracting the ZIP)

To permanently install an unsigned addon: (I recommend this, as it is more practical)

  • make sure you're using Firefox nightly, Developer Edition or ESR
  • visit about:config
  • change property xpinstall.signatures.required to false
  • more details, see Extension Signing on Mozilla Wiki
  • visit about:addons
  • click on the gear-wheel icon below the search bar
  • select "Install Add-on From File..."
  • select the addon ZIP file

Further Notes

  • in the ZIP I've used the original manifest.json and bumped the addon version from 5.2 to 5.2.1
    • this way people don't need to remove their official 5.2 STG installation beforehand (i.e. it can be installed to upgrade an already installed STG 5.2 to the fixed 5.2.1)
    • this way people should ideally automatically get an update once @Drive4ik has the time to publish a new version to AMO
  • if I don't hear back from @Drive4ik in the next few days, I'll try to get an unlisted signed version of the fixed addon...
    • this could then be used by people on Firefox stable release (which is nearing v136 and thus will break the addon)
    • this will most likely have myself as the author and a slightly different name to avoid confusion about the code's origin
    • this will most likely be a temporary solution with no auto-updating mechanisms whatsoever
    • more instructions about that will follow, when/if I go down that rabbit hole...
  • once a fix is available as a signed addon - either provided officially by @Drive4ik or by me or somebody else - you should remember to revert xpinstall.signatures.required back to true (default) to avoid unnecessary security risks
  • my fork also contains:
    • changes to make the project build on the latest Node.js (v23.x) because I didn't want to go through the headache of setting up a v18 environment, which is almost end-of-support anyway
    • minor (non-breaking) updates to dependencies

I hope this helps. Any feedback is welcome.

philg-dev avatar Feb 08 '25 05:02 philg-dev

Hi, worrying to see there are problems with STG in upcoming releases. It's one of my favourite add-ons in Firefox. It would be reassuring if people like @philg-dev could contribute to the codebase and make official releases of the add-on.

@Drive4ik I hope you're doing well? Can you give us an update on the status of STG development?

Also, now that Firefox will officially support native tab grouping in one of the upcoming releases, it would be great to be able to use STG to create workspaces. So each workspace (= simple tab group) would contain tabs and/or groups. Comparable to workspaces in Vivaldi. When I create a "FF tab group" in Firefox and switch to another "STG group", the "FF tab group" is seen in every other group. It would be better to assign a "FF tab group" to a "STG group" and have it hidden when switching to another "STG group". If you get what I mean 😅

rubycape avatar Feb 08 '25 19:02 rubycape

Also, now that Firefox will officially support native tab grouping in one of the upcoming releases, it would be great to be able to use STG to create workspaces. So each workspace (= simple tab group) would contain tabs and/or groups. Comparable to workspaces in Vivaldi. When I create a "FF tab group" in Firefox and switch to another "STG group", the "FF tab group" is seen in every other group. It would be better to assign a "FF tab group" to a "STG group" and have it hidden when switching to another "STG group". If you get what I mean 😅

@rubcap what you're describing is discussed in #1237 already. As of now, the main priority is to keep the addon operational in this issue here.

philg-dev avatar Feb 08 '25 20:02 philg-dev

Thank you all for your help. @Rob--W @philg-dev Can you please tell me why this error may appear if the menu has been created and is functioning? After all, I just made a mapping in the code, so that it was impossible to call the deletion of the menu that is not created. I immediately see the error and fix it. But here it turns out that the menu is created, it works, but the call of deletion with passing the menu id causes an error. Strange.

@rubcap Yeah, I'm still working on the addon, just had a lot of major work piled up lately. I'm currently working on synchronizing tabs, groups, settings via Github Gist. #291

Drive4ik avatar Feb 09 '25 22:02 Drive4ik

@Drive4ik glad to hear back from you!

Unfortunately, I haven't taken a look at the error much. Since it's an upstream change that went from failing silently to instead throw an exception on FF136+, I would assume that even beforehand there was something kinda wrong. So my assumption was, that browser.menus.remove and/or browser.menus.update are somehow called on non-existent menu elements.

So if you say, you've made sure that those functions are never called before a menu is created, maybe they're somehow called multiple times, similar to a double-free or some kind of race condition that tries to trigger an update after delete.

I've mostly just taken a look at Rob's bugzilla tickets, at ahal's pull request and searched the addon's codebase for browser.menus.remove and browser.menus.update to verify that ahal's changes are comprehensive. In that regard everything seemed fine to me. (See also my comment on the PR)

If you would like any specific assistance feel free to let me know, then I could see if I can dive deeper into the code. However, I'm basically completely unfamiliar with Vue currently.

philg-dev avatar Feb 10 '25 03:02 philg-dev

Glad to hear from you as well, @Drive4ik !

Hope a (temporary) fix can be deployed soon before users start switching to (lesser) alternatives 😉. FF 136 is only 3 weeks away.

rubycape avatar Feb 10 '25 06:02 rubycape

@Drive4ik any news on when the fix is going to be released to the AMO? I haven't seen a version bump in the manifest.json yet, so I'm still nervous for the upcoming FF136 stable release.

philg-dev avatar Feb 12 '25 15:02 philg-dev

I figured out what the problem was. Indeed, I was deleting a menu that was no longer there. Now I am doing a little refactoring of the code, and in the next few days there will be a release. @philg-dev

Drive4ik avatar Feb 13 '25 00:02 Drive4ik

@Drive4ik what a relief! Thank you so much for the update 🙌

TixieSalander avatar Feb 13 '25 01:02 TixieSalander

Image

Made the 5.3 release. Please check if all is well with the menu, and if there is (not) an error, please reopen this issue.

Thank you all for your patience!

@mmattq @Rob--W @philg-dev @ahal @rubcap @TixieSalander

Drive4ik avatar Feb 13 '25 23:02 Drive4ik

Thanks! Do you accept donations?

mmattq avatar Feb 14 '25 09:02 mmattq

Image

Made the 5.3 release. Please check if all is well with the menu, and if there is (not) an error, please reopen this issue.

Thank you all for your patience!

@mmattq @Rob--W @philg-dev @ahal @rubcap @TixieSalander

Hello

And how do I install this zip?

ozzyjr avatar Feb 14 '25 14:02 ozzyjr

@ozzyjr it's waiting for review by the AMO. It's not officially available yet, but it will hopefully get approved and published soon - then you will just receive it as an update to your installed version of STG.

If you're on Firefox stable, I would highly recommend just waiting a few days until you just get the update from AMO automatically. I'm fairly confident that the AMO approval should go through before 136 comes to stable.

If you're already on Firefox 136+ on Nightly or Developer Edition and need the fix ASAP, you can follow my guide and use the ZIP I've provided in the meantime or build the addon yourself from the current master.

You can monitor the STG AMO Page and / or the version in your installed addons to see when it's released.

philg-dev avatar Feb 14 '25 21:02 philg-dev

Fantastic work, @Drive4ik and @philg-dev and others involved! This extension is amazing, and being able to run the fork (to get rid of the error popup) until the final fix is approved by Mozilla is a very acceptable compromise.

diogobaeder avatar Feb 21 '25 17:02 diogobaeder

@mmattq In version 5.5 in the addon settings will be a tab “About the program” there will be information about donations. Thank you very much! @ozzyjr Until this zip file is signed by Mozilla, you can't just put it in your browser.

I don't know why, but the test still hasn't been passed. Admins did not indicate anything, no objections or clarifications. Maybe they don't have enough working people to check, that's why it takes so long. I'll wait until Tuesday-Wednesday, then I'll write to them.

P.S. Those warnins about android version, which addon does not support, do not pay attention.

Image

Drive4ik avatar Feb 22 '25 14:02 Drive4ik

Image

All Good .. Thanks

MAK-01 avatar Feb 25 '25 18:02 MAK-01

@mmattq In version 5.5 in the addon settings will be a tab “About the program” there will be information about donations. Thank you very much!

Man, one year later and still can't donate! :)

mmattq avatar Mar 16 '26 11:03 mmattq