Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preferences tab is blank #2888

Closed
ngirard opened this issue May 7, 2021 · 38 comments
Closed

Preferences tab is blank #2888

ngirard opened this issue May 7, 2021 · 38 comments
Labels
Firefox-issue bug of Firefox itself partially fixed platform specific stale no reaction got for a long term

Comments

@ngirard
Copy link

ngirard commented May 7, 2021

Using TST 3.8.1 on Firefox 88.0 and Ubuntu 21.04.

The preferences tab is completely blank:

Screenshot_20210507_065744

@piroor
Copy link
Owner

piroor commented May 7, 2021

I've tried TST 3.8.1 on Firefox 88.0 on Ubuntu 20.04LTS and they looks working as expected. The options page is shown after a while. Could you try with a clean profile?
https://github.com/piroor/treestyletab/wiki/How-to-run-Firefox-with-a-clean-profile

@ngirard
Copy link
Author

ngirard commented May 7, 2021

Hey @piroor,
it works fine within a clean profile.
I'm puzzled...

@piroor
Copy link
Owner

piroor commented May 7, 2021

I think a bisection will help you to find out the trigger of the problem.
https://github.com/piroor/treestyletab/wiki/How-to-minimize-conditions-to-reproduce-a-problem

@ngirard
Copy link
Author

ngirard commented May 7, 2021

Sure. I'm afraid I can't afford to do this now (GMT+2 here) ; will try to come back to it tonight.

Cheers, and many thanks for your time & assistance !

@ngirard
Copy link
Author

ngirard commented May 8, 2021

Just a heads up.

Since the problem occured after I upgraded both my system and TST, I suspected that the problem could be related to the system upgrade.
I tried switching from X11 to Wayland and from various rendering engines (XRender vs OpenGL), but it didn't make any difference.

Also the problem affects other preferences' tab, but not all.
For instance, the preferences tab for the "Bookmark search plus 2" extension is not affected:
Screenshot_20210508_164958

but the preferences tab for the "Copy selected tabs to clipboard extension" is:
Screenshot_20210508_165321

@ngirard
Copy link
Author

ngirard commented May 8, 2021

Nailed it.
The following CSS rule is applied to the body of the preferences #document:

:root:not(.initialized) > * {
	opacity: 0;
}

Screenshot_20210508_200100

Disabling it makes the preferences to appear:
Screenshot_20210508_200322

Hope this helps.

@irvinm
Copy link
Contributor

irvinm commented Jun 2, 2021

@ngirard so I guess your options page was not being initialized properly. Are you still seeing this or are you manually changing the CSS? (Or did you simply move to a new profile which you said was working) I'm wondering if you could close this item or if there was more to do.

@irvinm
Copy link
Contributor

irvinm commented Jun 12, 2021

@ngirard can you close this item?

@ngirard
Copy link
Author

ngirard commented Jun 12, 2021

Sorry, got overwhelmed by work.

@irvinm, this is also my interpretation that the options page isn't being properly initialized.

The screenshot I attached was the result of a manual intervention from me ; without touching anything the options page stays blank.

The defect is still present, despite upgrading TST to latest version and Firefox to v89.0.

HTH

@irvinm
Copy link
Contributor

irvinm commented Jun 12, 2021

Thanks @ngirard. Have you tried a new profile with the same versions to see if that works or not?

@ngirard
Copy link
Author

ngirard commented Jun 12, 2021

@irvinm, it's working fine with a clean profile.

@irvinm
Copy link
Contributor

irvinm commented Jun 12, 2021

It looks like things get considered initialized at this point in the process:

document.documentElement.classList.add('initialized');

However, there is quite a few things that are done in init.js before that point. Have you tried exporting your settings and then resetting them in you main profile to see if it works. (You already know it works in a new profile but if it doesn't work in your main profile with reset options that it has something to do with the profile itself or a conflict with another addon in that profile)

The other thing you could also try is exporting your setting from TST and importing them into that new profile and ensure that things still work. If that works, it would prove it wasn't any of the options you are using with TST.

Just some thoughts ...

@piroor
Copy link
Owner

piroor commented Jun 16, 2021

I've introduced some changes 642caa9 and 546a1bf, now TST continues initialization process of the options page even if there are some failures. This is not the best solution, but I hope it should help people suffered from whilte-outed options page and they can access to available options.

@ngirard
Copy link
Author

ngirard commented Jun 16, 2021

@piroor, thank you very much for your efforts, and apologizes for not being able to devote enough time to qualify this defect any further, despite @irvinm's wise thoughts.

I might be able to find some time after june 21st if needed, though.

@confluence
Copy link

I am experiencing this issue in 3.8.3 with Firefox 89 on Ubuntu 20.04. I can't use the workaround because I can't see the #document node at all in the inspector and so I cannot edit its CSS.

@piroor
Copy link
Owner

piroor commented Jun 17, 2021

@confluence You'll need to use about:debugging to inspect DOM tree of extension options.
https://github.com/piroor/treestyletab/wiki/How-to-inspect-tree-of-tabs#how-to-start-debugger-for-tree-style-tab

@confluence
Copy link

I installed the 3.8.3.11565 release, and the issue persists. I can view the settings if I open them in a new tab (I was able to obtain the URL by right-clicking in the invisible embedded page to view the page source, and editing that URL).

@confluence
Copy link

When I uninstalled the development version and reinstalled the signed version, the problem appeared to fix itself. I'm not sure if this could have something to do with the length of the preferences page -- a freshly installed version has all the sections collapsed by default.

Thanks for the debugger tip -- I will try that if the problem reoccurs.

@irvinm
Copy link
Contributor

irvinm commented Jul 3, 2021

@piroor I think this can be closed.

@piroor piroor closed this as completed Jul 4, 2021
@ngirard
Copy link
Author

ngirard commented Jul 9, 2021

I'm afraid the problem remains here.

Firefox 89.0.2 / TST latest version / Ubuntu 21.04.

When clicking on the preferences pane, the vertical scrollbar appears fleetingly, then nothing. The pane just stays blank.

@piroor piroor reopened this Jul 14, 2021
@piroor
Copy link
Owner

piroor commented Jul 14, 2021

@ngirard Could you try inspecting what happens in the options page with the remote debugger?

@ngirard
Copy link
Author

ngirard commented Jul 14, 2021

Hey @piroor, would you mind giving a bit more specific instructions ? Thanks !

@piroor
Copy link
Owner

piroor commented Jul 14, 2021

@ngirard For example:

  • Does the root element (html) have initialized class?
    • If not, please try to add initialized to its class attribute (it is whitespace-separated list).
  • Does the root element (html) have successor-tab-support class?
  • Are any error messages reported in the "Console" tab?

@ngirard
Copy link
Author

ngirard commented Jul 14, 2021

The console tab reports:

unreachable code after codemirror-colorpicker.js:1472:4 return statement

and the referred code is

function unique_array(arrays) {
    return arrays;
    var set = {};
    var count = arrays.length;
    var it = null;
    while (count--) { // <------------------
        it = arrays[count];
        set[JSON.stringify(it)] = it;
    }

    return Object.values(set);
}

@ngirard
Copy link
Author

ngirard commented Jul 14, 2021

Does the root element (html') have initialized` class?

The state of affairs is the same as reported in my previous comment: #2888 (comment)

The html element of the preferences tab does have a successor-tab-support class as shown in my screenshot, but no initialized class.

@ngirard
Copy link
Author

ngirard commented Jul 14, 2021

Adding initialized to this element's classes gets the contents of the preferences tab to be displayed ; however its fields aren't populated.

@piroor
Copy link
Owner

piroor commented Jul 15, 2021

Thank you for inspection!

By recent changes I did, all errors in the initialization process is recovered with try-catch statements, but there is one exception: await for configs.$loaded.

try {
document.documentElement.classList.toggle('successor-tab-support', typeof browser.tabs.moveInSuccession == 'function');
initAccesskeys();
initLogsButton();
initDuplicatedTabDetection();
initLinks();
initTheme();
}
catch(error) {
console.error(error);
}
await configs.$loaded;
let focusedItem;
try {
focusedItem = initFocusedItem();
initCollapsibleSections({ focusedItem });
initPermissionOptions();
initLogCheckboxes();
initPreviews();
initExternalAddons();
initSync();
}
catch(error) {
console.error(error);
}
try {
options.buildUIForAllConfigs(document.querySelector('#group-allConfigs'));
onConfigChanged('successorTabControlLevel');
onConfigChanged('showExpertOptions');
await wait(0);
onConfigChanged('parentTabOperationBehaviorMode');
onConfigChanged('autoAttachOnAnyOtherTrigger');
onConfigChanged('syncDeviceInfo');
if (focusedItem)
focusedItem.scrollIntoView({ block: 'start' });
}
catch(error) {
console.error(error);
}
document.documentElement.classList.add('initialized');

The class of the root element of the options page has successor-tab-support but doesn't have initialized, this means that the initialization process is still awaiting configurations are completely loaded.

Could you try ext+treestyletab:options from the location bar? It will loads the options page in a regular tab. If ext+treestyletab:options in regular tabs works correctly, it may mean that something happens around inter-processes communications around embedded options page on your Ubuntu environment. I saw similar problems around options page of Thunderbird addons on Tb78, and I had to give up embedded options page on those cases.

@irvinm
Copy link
Contributor

irvinm commented Aug 5, 2021

@ngirard any updates on this?

@irvinm
Copy link
Contributor

irvinm commented Aug 24, 2021

@piroor maybe this is "stale"?

@piroor
Copy link
Owner

piroor commented Aug 24, 2021

@irvinm Thanks, this was not expired by the bot because I forgot to add "help wanted" label...

@ngirard
Copy link
Author

ngirard commented Aug 24, 2021

Visiting ext+treestyletab:options does load the options page. I'm still using the latest version of TST, this time on Firefox 91.0.1.

I spent quite some time trying to duplicate my Firefox profile and try to determine whether this could be caused by another extension, but to no avail.

I'm feeling a bit like a dead weight, being the sole person reporting this problem.

@piroor
Copy link
Owner

piroor commented Aug 25, 2021

Visiting ext+treestyletab:options does load the options page. I'm still using the latest version of TST, this time on Firefox 91.0.1.

Hmm, it is very odd - this means that something happens only when Firefox loads the options page into a subframe, in other words this looks to be caused by a bug of Firefox itself like an instability around IPC. I'm very sorry but I cannot imagine how to fix it by TST side.

@github-actions
Copy link

This issue has been labeled as "stale" due to no response by the reporter within 1 month (and 7 days after last commented by someone). And it will be closed automatically 14 days later if not responded.

@github-actions github-actions bot added the stale no reaction got for a long term label Sep 24, 2021
@github-actions
Copy link

github-actions bot commented Oct 9, 2021

This issue has been closed due to no response within 14 days after labeled as "stale", 7 days after last reopened, and 7 days after last commented.

@github-actions github-actions bot closed this as completed Oct 9, 2021
@ngirard
Copy link
Author

ngirard commented Nov 14, 2021

Just a friendly reminder than I'm still affected by this bug. TST latest, Firefox 94.0 and Ubuntu 21.10.

@Yenya
Copy link

Yenya commented May 17, 2022

OK, I see this on one (and only one) of my machines, even with a new session, even under different users (as described in #3128). It appeared immediately after I upgraded this machine to Fedora 36. When I open ext+treestyletab:options, I get the "Gah. Your tab just crashed." window. Also, when I try to open a new session, install and enable Treestyletab in it, close Firefox, and start that session again, I also get the "Gah. Your tab just crashed." window.

Odd thing is, I also upgraded two other machines to Fedora 36, and I don't see the problem there, even with existing sessions.

@Vistaus
Copy link

Vistaus commented Sep 6, 2022

I have this issue ever since the update to Firefox 104. ext+treestyletab:options loads fine, but the preferences tab in the settings is completely blank.

OS: openSUSE Tumbleweed
DE: KDE Plasma (Wayland)

@piroor
Copy link
Owner

piroor commented Sep 10, 2022

Linux specific issue looks a problem of Firefox itself. Options page embedded in about:addons is rendered in a separate child process, so it may be problemtic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Firefox-issue bug of Firefox itself partially fixed platform specific stale no reaction got for a long term
Projects
None yet
Development

No branches or pull requests

6 participants