Closed Nexen23 closed 3 months ago
I tried clicking refresh in "inspect TST" window and these were the startup messages
I also found where iframe as the currently targeted
option was. Contrary to how-to-start-debugger wiki, it was not a button, but an option in inspector settings, which was already ticked for me. But now I don't know how to do next step - Choose /sidebar/sidebar.html from the list
(because iframe...
wasn't a button - there is no list showing up)
Probably I somehow need to switch here to /sidebar, but have no idea how
Just for the sake of more info tried to run gMetricsData.toString()
"total 962 msec
85: index: Loaded
61: init: start
543: (async) init: waiting for waitUntilCompletelyRestored, ContextualIdentities.init and configs.$loaded
544: init: prepare
1: init: Migration.migrateConfigs
23: (async) init: getting all tabs across windows
38: restoreWindowFromEffectiveWindowCache: start
3: restoreWindowFromEffectiveWindowCache: validity check: start
0: restoreWindowFromEffectiveWindowCache: validity check: signature failed.
0: restoreWindowFromEffectiveWindowCache: validity check: matching actual signature of got cache
0: restoreWindowFromEffectiveWindowCache: validity check: actual signature failed.
1: (async) rebuildAll: restore tabs in window 1 from cache
36: (async) rebuildAll: tabs in window 1
19: (async) init: rebuildAll
19: loadTreeStructure: start
130: loadTreeStructure: read stored data
0: applyTreeStructureToTabs: start
0: applyTreeStructureToTabs: preparation
56: applyTreeStructureToTabs: attach/detach
3: applyTreeStructureToTabs: collapse/expand
0: loadTreeStructure: Tree.applyTreeStructureToTabs
190: (async) loadTreeStructure: restoration for windows
191: (async) init: TreeStructure.loadTreeStructure
3: init: started listening
19: init: started initializing of context menu
211: (async) init: initializing API for other addons
206: (async) init: exporting tabs to sidebars"
log.logs.join('\n')
prints nothing
In 7th point of https://github.com/piroor/treestyletab/wiki/How-to-inspect-tree-of-tabs#how-to-collect-startup-logs-of-tst I noticed how you're supposed to change inspection to the sidebar. But there is not such button near 3-dots in my case.
Actually, there is but only when I open 3-dots menu and it is grayed out. If I switch Select an iframe as the currently targeted document
on and off - that button apprears/disappears, but still grayed out and still hides itself when I exit 3-dots menu.
Tried to see if /sidebar can be choosen on another PC - it does, that menu is working fine allowing to choose /sidebar properly
Also tried click "refresh" in Inspect window on another PC and got the same startup messages about managed storaged is not provided
and failed to send "ready" message to...
That PC is macos with TST 4.0.20 and Firefox 128.0
- Is there any error in the browser console (Ctrl-Shift-J) ?
No, nothing
* Does this problem happen with other similar addons providing sidebar panel with custom context menu items? Could you try to open the context menu with the sidebar panel provided by "Tab Sidebar"? https://addons.mozilla.org/firefox/addon/tab-sidebar-we/ If you see same problem, it looks to be a problem of Firefox itself.
Yes, that addon works fine. I also deleted all chrome.css, so that default firefox top tabs panel showed up and it's context menu also works fine, meanwhile TST right clicks at the same time - don't work
Is there any other debug info I could collect to provide more details? For example, "export" button or "show logs" in TST options doesn't work too. Maybe it has the same reason to be broken so it's better to focus on that instead? I tried to see if there is anything in browser console on click and there is! On each click there is a line:
When I open TST Options in console there are errors:
Hmm, present error information collected by you don't contain any information about the reason of the problem... It means that something completely unexpected is happen on your case.
I've added some codes to collect more detailed logs around initialization of the context menu. Could you try collecting logs with the development build? Steps:
background/tab-context-menu
and sidebar/tab-context-menu
.For example, here is the log on my environment when the context menu is shown successfully:
tst<Sidebar-1>: 17:20:43.888 sidebar/tab-context-menu: onContextMenu: start [common.js:735:13](moz-extension://c88dd328-6d50-4080-9691-ebb6ec4a3dbe/common/common.js)
tst<Sidebar-1>: 17:20:43.891 sidebar/tab-context-menu: onContextMenu:
Object { target: span.extra-items-container.front, originalTarget: span
, onInputField: null, context: null }
[common.js:735:13](moz-extension://c88dd328-6d50-4080-9691-ebb6ec4a3dbe/common/common.js)
notify context menu is overridden [tab-context-menu.js:678:11](moz-extension://c88dd328-6d50-4080-9691-ebb6ec4a3dbe/sidebar/tab-context-menu.js)
tst<Sidebar-1>: 17:20:43.896 sidebar/tab-context-menu: onContextMenu: override context as tab context menu [common.js:735:13](moz-extension://c88dd328-6d50-4080-9691-ebb6ec4a3dbe/common/common.js)
tst<BG>: 17:20:43.959 background/tab-context-menu: tab-context-menu: internally called:
Object { type: "tab-mousedown", button: 2, altKey: false, ctrlKey: false, metaKey: false, shiftKey: false, tab: {…} }
[common.js:735:13](moz-extension://c88dd328-6d50-4080-9691-ebb6ec4a3dbe/common/common.js)
tst<BG>: 17:20:43.973 background/tab-context-menu: TSTAPI.kCONTEXT_MENU_UPDATE:
Object { type: "contextMenu-update", params: (2) […] }
Object { id: "treestyletab@piro.sakura.ne.jp", url: undefined }
[common.js:735:13](moz-extension://c88dd328-6d50-4080-9691-ebb6ec4a3dbe/common/common.js)
tst<BG>: 17:20:43.976 background/tab-context-menu: TSTAPI.kCONTEXT_MENU_UPDATE:
Object { type: "contextMenu-update", params: (2) […] }
Object { id: "treestyletab@piro.sakura.ne.jp", url: undefined }
[common.js:735:13](moz-extension://c88dd328-6d50-4080-9691-ebb6ec4a3dbe/common/common.js)
tst<BG>: 17:20:43.979 background/tab-context-menu: TSTAPI.kCONTEXT_MENU_UPDATE:
Object { type: "contextMenu-update", params: (2) […] }
Object { id: "treestyletab@piro.sakura.ne.jp", url: undefined }
[common.js:735:13](moz-extension://c88dd328-6d50-4080-9691-ebb6ec4a3dbe/common/common.js)
...(similar logs)...
tst<BG>: 17:20:44.475 background/tab-context-menu: TSTAPI.kCONTEXT_MENU_UPDATE:
Object { type: "contextMenu-update", params: (2) […] }
Object { id: "treestyletab@piro.sakura.ne.jp", url: undefined }
common.js:735:13
tst<BG>: 17:20:44.477 background/tab-context-menu: TSTAPI.kCONTEXT_MENU_UPDATE:
Object { type: "contextMenu-update", params: (2) […] }
Object { id: "treestyletab@piro.sakura.ne.jp", url: undefined }
common.js:735:13
tst<Sidebar-1>: 17:20:45.229 sidebar/tab-context-menu: tab-context-menu: internally called:
Object { type: "treestyletab:contextMenu-updated", items: {…} }
common.js:735:13
tst<Sidebar-1>: 17:20:47.069 sidebar/tab-context-menu: tab-context-menu: internally called:
Object { type: "treestyletab:ping-to-sidebar", windowId: 1 }
common.js:735:13
tst<Sidebar-1>: 17:27:30.099 sidebar/tab-context-menu: tab-context-menu: internally called:
Object { type: "treestyletab:ping-to-sidebar", windowId: 1 }
I've added some codes to collect more detailed logs around initialization of the context menu. Could you try collecting logs with the development build?
Greatly appreciated! Just to make sure also cloned profile, uninstalled every extensions including TST beforehand as well as chrome*.css. (I forgot to mention before what reinstalling TST also doesn't fix right-click problem)
I also found how to get /sidebar logs in TST "Inspect" window. Button to choose it appears only after you click refresh in that window. But by default there are no logs when I right click But if I click refresh multiple times, there are duplicate instances occur (but it not always duplicates everything). Screenshot from non dev TST:
Thank you for collecting logs! I've realized that your log doesn't contain onContextMenu: ...
messages which was added by recent commits and should appear in logs from the development build. Did you use regular release build of TST after you cloned the profile? Otherwise, something looks to block the trigger event to open the context menu on your environment unexpectedly. Hmm...
No, I used provided xpi. But just to make sure, I will repeat the process, but with screenshots.
Where I got XPI:
Addons before:
Addons after:
Options (btw, they do 10 seconds load too with debug xpi):
Click:
Thanks! So your logs mean that something cancels "contextmenu" event. Could you collect logs again with one more log module sidebar/mouse-event-listener
? It will help to understand the reason of the cancel if the mouse event is canceled by TST itself.
Thanks! So your logs mean that something cancels "contextmenu" event. Could you collect logs again with one more log module
sidebar/mouse-event-listener
? It will help to understand the reason of the cancel if the mouse event is canceled by TST itself.
Sure. Here it is:
Hmm, your log said that TST worked as:
On the other hand, expected order is:
The difference is the order of 2 and 3. Could you try press down the mouse button, hold it a while, and release the button? If it shows the context menu, the problem may be caused by slowed down of TST's operations
Sorry I misunderstood your log, ignore my previous comment...
I've introduced some changes possibly affect to this issue. Could you try the development build? https://github.com/piroor/treestyletab/actions/runs/10201669419
If you still see the problem, could you try press down the mouse button, hold it a while, and release the button? It should force to TST to operate the context menu initialization same to the case on my environment so I hope it should work as expected. Otherwise we need to find something other blocker...
I've introduced some changes possibly affect to this issue. Could you try the development build? https://github.com/piroor/treestyletab/actions/runs/10201669419
If you still see the problem, could you try press down the mouse button, hold it a while, and release the button? It should force to TST to operate the context menu initialization same to the case on my environment so I hope it should work as expected. Otherwise we need to find something other blocker...
Unfortunatelly didn't work out
From what I saw, it doesn't react to initial press, only when I fully release the right click. So these logs are essentially identical
But I found something bizarre (or maybe it's intended behavior 🤷 ). If I right fast-click with my ctrl/alt pressed, there will be spam of tab-context-menu until I release ctrl/alt
Just to make sure, I tried to make clean profile (where TST works as intended) and see what logs it will give.
Thought what maybe I have strange mouse with special right click, but no. Laptop touchpad with physical right button press+hold don't give logs too until released
Thanks a lot!
No such problem with clean profile, as well as without TST.
As these results including above, something broken information in your regular profile looks to trigger this problem.
Couldn't try TST options on different profile because "export options" button at the very bottom doesn't do anything.
This also strange. The button should just download a JSON file into your Download folder and I can't imagine what blocks that.
Could you try to clear some cache information with these steps?:
C:\Users\xxx\AppData\Local\Mozilla
which contains the cache.C:\Users\xxxx\AppData\Roaming\Mozilla\Firefox\Profiles\xxxx.main
.After all please restore the profile.
One more possibility: If you use something user style sheet in TST's options, it may affect to the problem, so please clear it (after backup).
Thanks a lot!
No such problem with clean profile, as well as without TST.
As these results including above, something broken information in your regular profile looks to trigger this problem.
Couldn't try TST options on different profile because "export options" button at the very bottom doesn't do anything.
This also strange. The button should just download a JSON file into your Download folder and I can't imagine what blocks that.
Could you try to clear some cache information with these steps?:
1. Exit Firefox. 2. Delete the folder `C:\Users\xxx\AppData\Local\Mozilla` which contains the cache. 3. Go to your profile folder like `C:\Users\xxxx\AppData\Roaming\Mozilla\Firefox\Profiles\xxxx.main`. 4. Backup the profile folder. 5. Delete files in your profile: * browser-extension-data (folder) * extension-store (folder) * storage (folder) * addonStartup.json.lz4 * storage.sqlite * xulstore.json 6. Start Firefox. 7. Try to open the context menu on the sidebar.
After all please restore the profile.
Spoiler: found a file which if removed fixes right click.
Tried clearing User Styles (they were commented but still), cache, mentioned files - didn't help.
Started randomly deleting files like places.sql, content-prefs.sql e.t.c. to the point where got BSOD on FF start :)
Experimentally found out what if I delete prefs.js - right click starts working! As well as TST Options show up immediatelly and Export button works too. (btw I have 17 of other prefs-*.js files, but they don't affect the issue)
But I fail to find the culprit among it's content. At first I though about deleting 50% of options and see where it goes. But TST bricked: doesn't render tabs in the sidebar, doesn't show Options anymore (blank screen), but TST sidebar still opens up on the startup (I installed TST on that profile for experiments). Then I tried deleting all prefs except these which had treestyletab in it. TST still bricks. Do you have any pointers as to what I must not delete to stop the bricking? If so, I could bisect the problematic line after that. (if you have none - it's okay, I will try bisect anyway, it will just take much more time, file is 100kb long)
Nevertheless, here are all treestyletab* prefs in the prefs.js (I tried deleting ONLY them but didn't help, although extensions.treestyletab.tabbar.autoShow.accelKeyDown
looked promising):
Those extensions.treestyletab.*
entries in prefs.js were used by TST 0.9 and older versions. TST 2.0 and later is WebExtensions and never refers them so they are safe to delete.
I have 95KB prefs.js. Here are some entries safe to delete I think:
app.normandy.*
: information about remotely applied. app.update.*
: information about auto update of Firefox.browser.uiCustomization.state
: toolbar customization result.devtools.*
: information about developer tools.gfx*
: cached information about hardware acceleration.media.*
: cached information about media encoder/decoder plugins.numbus.*
: information about experiments of Firefox.print.*
, printer*
: cached information about printers and saved printing settings.urlclassifier.*
: cached information of safe browsing.On the other hand, here are entries dangerous to delete I think:
extensions.webextensions.ExtensionStorageIDB.migrated.*
: they need to be there to keep storage information.extensions.webextensions.uuids
: it needs to be there to keep relationship of their public IDs and internal auto-generated IDs.identity.*
: information about Firefox Sync.extensions.webextensions.*
entries look critical but they may affect to this problem.
privacy.*
entries also possibly affect to this problem - some privacy features to prevent fingerprinting may break addons.
Those
extensions.treestyletab.*
entries in prefs.js were used by TST 0.9 and older versions. TST 2.0 and later is WebExtensions and never refers them so they are safe to delete.I have 95KB prefs.js. Here are some entries safe to delete I think:
* `app.normandy.*` : information about remotely applied. * `app.update.*` : information about auto update of Firefox. * `browser.uiCustomization.state` : toolbar customization result. * `devtools.*` : information about developer tools. * `gfx*` : cached information about hardware acceleration. * `media.*` : cached information about media encoder/decoder plugins. * `numbus.*` : information about experiments of Firefox. * `print.*`, `printer*` : cached information about printers and saved printing settings. * `urlclassifier.*` : cached information of safe browsing.
On the other hand, here are entries dangerous to delete I think:
* `extensions.webextensions.ExtensionStorageIDB.migrated.*` : they need to be there to keep storage information. * `extensions.webextensions.uuids` : it needs to be there to keep relationship of their public IDs and internal auto-generated IDs. * `identity.*` : information about Firefox Sync.
extensions.webextensions.*
entries look critical but they may affect to this problem.privacy.*
entries also possibly affect to this problem - some privacy features to prevent fingerprinting may break addons.
Many thanks! It appears only extensions.webextensions.uuids
was necessary to stop bricking TST.
The cause of right-click bug was user_pref("extensions.webextensions.remote", false);
I found things like https://blog.mozilla.org/addons/2020/03/05/extensions-in-firefox-74/ and https://bugzilla.mozilla.org/show_bug.cgi?id=1613141 , but now it's a mystery how it got to my prefs in the first place :/
Nevertheless, it's still unclear why it broke only 6 months ago. I found this post https://blog.nightly.mozilla.org/2024/01/22/happy-new-year-these-weeks-in-firefox-issue-152/ But it's only typo in the comment. But just because someone saw this typo can mean that at the beggining of 2024 someone worked near "extensions.webextensions.remote" logic, so there probably some extra commits which could have affected me.
It's also quite interesting how it affected only TST in my case.
Once again, thanks a lot! I was suffering for half a year waiting either TST or Firefox fix it and now I'm free from this misery :)
I can't imagine why extensions.webextensions.remote
=false
affected only for TST on your environment, but it makes sense anyway. In old days that Firefox's multi-process architecture (the project name "electrolysis", aka e10s) was in early development, disabling e10s was a better choice to get stability and speed. But now Firefox is totally redesigned based on enabled e10s. Disabled e10s mode is not recommended because it is not tested and maintained well anymore.
I can't imagine why
extensions.webextensions.remote
=false
affected only for TST on your environment, but it makes sense anyway. In old days that Firefox's multi-process architecture (the project name "electrolysis", aka e10s) was in early development, disabling e10s was a better choice to get stability and speed. But now Firefox is totally redesigned based on enabled e10s. Disabled e10s mode is not recommended because it is not tested and maintained well anymore.
Makes sence! Thanks a lot. I'll close the issue then :)
Short description
Cannot open tab context menu since ~25.12.2023
Steps to reproduce
Expected result
Tab context menu opened (with "Pin" and other options)
Actual result
Nothing happend
Environment
Extra context
Tab context menu worked fine before I tried to update Firefox/TST in the end of 2023 to resolve another issue (TST didn't show any it's options (opened through extensions screen. Instead of options, there was a blank screen), so I couldn't change css and other preferences. Later I understood that it probably was loading very-very slowly, so I should've just waited a few minutes. Even now settings loads slowly, but it takes about 10 seconds now)
From that time I updated Firefox/TST multiple times. Problem still persists. No such problem with clean profile, as well as without TST. Also tried my chrome css on new profile - no problem with that. Couldn't try TST options on different profile because "export options" button at the very bottom doesn't do anything.
Info from TST debugging
In TST console saw: They are triggered whenever I open "Extensions -> TST -> Options". After "failed to load managed storage with 10 times retly" - visually options show up instead of a blank screen.
Clicking "export options" doesn't show any errors in the console. There are also no error when I right click on the tabs (which is the point of this issue)
I also saw "show internal logs" button in "TST options", but it also does nothing (as "export options").
It is mentions in https://github.com/piroor/treestyletab/wiki/How-to-inspect-tree-of-tabs#how-to-start-debugger-for-tree-style-tab that you can choose sidebar but I fail to find how it can be done, specifically
On the top-right corner of the debugger window, there are some buttons, so click the Select an iframe as the currently targeted document button.
- I don't see such an option