Open Bug 1829370 Opened 1 year ago Updated 1 month ago

[ChromeOS] When Installing Addon, the pop up to 'Cancel' or 'Add' buttons not clickable - cannot install any Addon. "PopupNotifications._onButtonEvent: Button click happened before the window was focused."

Categories

(Thunderbird :: Add-Ons: General, defect)

Thunderbird 102
defect

Tracking

(Not tracked)

People

(Reporter: anjeyelf, Unassigned)

References

Details

Attachments

(2 files)

Thunderbird Support Forum has been getting several reports of the same problem when trying to install various addons.

All seems to be progressing as normal until the pop up window appears which says :

'Add name of addon? This extension will have permission to.......'
There are two buttons 'Cancel' and 'Add'

Action:
Click on 'Add' button.

Result:
Clicking on the buttons has no effect. They are unclickable.

Error console says :
PopupNotifications._onButtonEvent: Button click happened before the window was focused.

It seems Window does not have focus hence clicking not working.

Problem appears to effect:
Chromebook using Linux OS Gentoo
Ubuntu 22.04

Problem persists in Thunderbird Troubleshooting Mode /safe Mode

Several users reporting the problem in these support questions:
https://support.mozilla.org/en-US/questions/1401115
https://support.mozilla.org/en-US/questions/1411341

Image example of the pop up window where buttons are not clickable, so installation of addon fails.

Please note, this failure is not specific to an addon - it is any addon.

One user provided image of error console.

Summary: When Intalling Addon the pop up to 'Cancel' or 'Add' appeara but not clickable - cannot install any Addon → When Intalling Addon the pop up to 'Cancel' or 'Add' buttons not clickable - cannot install any Addon

I'm trying to see if there is temp workaround - I'll report back if people respond in support forum.
I'm asking those who have the problem to try the following:

As window and buttons do not have focus, try to force this by using the 'Tab' key on keyboard to navigate to see you can get the 'Add' button to have focus.

Please report back on whether this workaround to use keyboard to navigate and get focus on the 'Add' button, so allowing it be a clickable button.

Also discovered others mentioning this issue on other forums.
https://www.reddit.com/r/chromeos/comments/xxd282/is_it_possible_to_install_addons_to_crostini/
https://www.reddit.com/r/swaywm/comments/sc9egv/cannot_add_addon_to_thunderbird_because_i_cannot/

Thanks for bringing this to our attention. Is this issue "Linux only" or "Linux on Chromebook" only?

I'm getting responses in Support Forum that using the 'Tab' key on keyboard repeatedly until it highlights / gets focus on the 'Add' button, allows clicking /press enter to select and complete the install.
So there is a workaround, but it needs investigating why Linux OS is having this problem.

(In reply to John Bieling (:TbSync) from comment #4)

Thanks for bringing this to our attention. Is this issue "Linux only" or "Linux on Chromebook" only?

The majority of people - virtually all reports are those using Linux on Chromebook - Crostini - Gentoo
But one person was using Ubuntu 22.04

I'm trawling through the Support Forum to see if there are more reports which may help with info.

I am able to reproduce this 100% of the time using Thunderbird 115.3.2 on fedora rawhide with sway as my desktop

Exactly the same problem (error: "PopupNotifications._onButtonEvent: Button click happened before the window was focused"), cannot work around with TAB.

Using org.mozilla.Thunderbird 115.4.1 Flatpak package on openSUSE/Tumbleweed.

Summary: When Intalling Addon the pop up to 'Cancel' or 'Add' buttons not clickable - cannot install any Addon → When Installing Addon, the pop up to 'Cancel' or 'Add' buttons not clickable - cannot install any Addon

All,

I have a temporary workaround until it can be fixed:

[https://drive.google.com/file/d/1-fZZFBwcprEJIkEcyAhn4w67fGw8EF1E/view?usp=drive_link]

You can load your favorite add-on by going into this temporary add-on area and install from a file, and it works just fine. The only problem is it goes away when you exit Thunderbird. If there were a way to install a temporary add-on and then give it a permanent home Somehow, then that would work better, but I can't figure that out.

Enjoy!

In my case it was related to poorly working DBus and something like https://github.com/flatpak/xdg-desktop-portal-gtk/issues/332

Anje, can you still reproduce?

Flags: needinfo?(anjeyelf)
Summary: When Installing Addon, the pop up to 'Cancel' or 'Add' buttons not clickable - cannot install any Addon → When Installing Addon, the pop up to 'Cancel' or 'Add' buttons not clickable - cannot install any Addon. "PopupNotifications._onButtonEvent: Button click happened before the window was focused."

I can still reproduce and can't get tabs or accessible features on my Pixelbook to get to the 'Add' prompt when trying to add a Thunderbird extension. Details:
Google Chrome: Version 119.0.6045.212 (Official Build) (64-bit)
Platform: 15633.69.0 (Official Build) stable-channel atlas
Channel: stable-channel
Firmware Version: Google_Atlas.11827.198.0
ARC Enabled: true
ARC: 11189745
Enterprise Enrolled: false
Developer Mode: false

Dupe of bug 1399937, regression caused by bug 1343571 comment #7. See screenshot at the end of https://support.mozilla.org/en-US/questions/1411341, that shows "Button click happened before the window was focused" from here:
https://hg.mozilla.org/mozilla-central/rev/34554df9f50c.
Please also read bug 1399937 comment #37 and bug 1399937 comment #43.

Does sideloading work in this case? Here's how you test it:

Set pref extensions.startupScanScopes to 5 (don't forget to hit enter after changing the value). Then copy the extension you want to install to the extensions directory in your profile. Start TB. You will get a notification in the top right corner on the application menu (hamburger menu). Click on it and follow the prompts.

(In reply to Wayne Mery (:wsmwk) from comment #11)

Anje, can you still reproduce?

I never had a problem because I use Windows OS.
I reported the issue because I saw so many people exhibiting this issue in the Support Forum, but they were all using Linux OS.
Many using Chromebook but issue not exclusive to Chromebook, but all were using Linux versions.

Flags: needinfo?(anjeyelf)

Hi all,

Betterbird has FIXED this bug! I can now load addons/extensions.

I recently learned about Betterbird.

Betterbird is a fine-tuned version of Mozilla Thunderbird.

I brought this bug to their attention last week as it appears in both applications.

They reviewed the bug report and collected some information from me regarding my Chrome OS Linux.

They were quickly able to identify where the bug was, and how to fix it.

Betterbird built a test version with the fix included so I could try it out.

It worked!

Betterbird will be rolling the fix into their next release, which should be available soon. Perhaps in a couple of weeks.

You can read about it in their latest release notes.

Happy New Year!

I guess the idea is that unless the window is focused the click shouldn't be processed (to avoid possible scenarios where you'd get tricked to install something). If no focus, the code currently makes the window focused instead.
Does a second click slightly later then work, for people affected?

(In reply to Magnus Melin [:mkmelin] from comment #18)

I guess the idea is that unless the window is focused the click shouldn't be processed (to avoid possible scenarios where you'd get tricked to install something). If no focus, the code currently makes the window focused instead.
Does a second click slightly later then work, for people affected?

I have tried many times and many ways. You can wait, click again. Nothing works.

So far, for me, the only solution that works is whatever the Betterbird developers changed in the code.
They did something, exactly what I do not know. It took them less than one day to fix this bug.
All I do know is I'm happily running with all of my addons. The program works as it is supposed to now.

I'm simply very tired of waiting for Thunderbird developers to implement the same fix. I don't know why it's not as simple to fix as Betterbird made it seem. After looking at all of the information in this bugzilla report they knew immediately what the problem was and how to fix it and they implemented that fix in less than one day.

(In reply to Magnus Melin [:mkmelin] from comment #20)

While https://github.com/Betterbird/thunderbird-patches/blob/main/115/bugs/1829370-add-on-installation-non-focused-linux.patch "fixes" the non-working buttons it's disabling the security fix cited here: https://bugzilla.mozilla.org/show_bug.cgi?id=1399937#c37

OK, thanks for letting me know, I will pass your information on to BB.

I'm not a developer, just a frustrated end user.

(In reply to Magnus Melin [:mkmelin] from comment #20)

While https://github.com/Betterbird/thunderbird-patches/blob/main/115/bugs/1829370-add-on-installation-non-focused-linux.patch "fixes" the non-working buttons it's disabling the security fix cited here: https://bugzilla.mozilla.org/show_bug.cgi?id=1399937#c37

Correct.

Basically just a rollback of https://hg.mozilla.org/mozilla-central/rev/34554df9f50c for Linux.
Note that the rollback was done in TB's (somewhat unmaintained) fork of that code (GlobalPopupNotifications.jsm was forked from Toolkit's PopupNotifications.jsm).
That's not optimal, since according to bug 1399937 comment #37 that code closes a potential vulnerability. It's unclear whether the vulnerability is present in TB and whether it's worth breaking add-on install to mitigate it.

All that said, we got Leo to try add-on install in Firefox and he reported that it's working despite:
https://searchfox.org/mozilla-central/rev/24ea2579c4a94d5da8db4bb529cbefe5e5e3c2d3/toolkit/modules/PopupNotifications.sys.mjs#1935-1942
which is the same code present in TB:
https://searchfox.org/comm-central/rev/f27f9eb40ed2d957d309b02f7540895b37427637/mail/modules/GlobalPopupNotifications.jsm#1522-1529

So a proper investigation is required to find out why the same code behaves differently in FF when compared to TB.

All,

Betterbird has officially released a new for 2024 update that includes this fix, minus the security issue/concern that was raised by Magnus Melin [:mkmelin].

I'm running the new version on my Chromebook Linux, and extensions/addons install normally and work!

There are instructions in the Support section for importing your Thunderbird profile into Betterbird. This way there is no need to start from scratch.

Leo.

The Thunderbird team is looking into this, but we decided to not roll back the security fix as a quick solution because we do not want to put a large group of our users at risk. We are aware that a small group of users is currently experiencing inconvenience and we want to assure you that we are looking for a proper solution.

(In reply to John Bieling (:TbSync) from comment #24)

The Thunderbird team is looking into this, but we decided to not roll back the security fix as a quick solution because we do not want to put a large group of our users at risk. We are aware that a small group of users is currently experiencing inconvenience and we want to assure you that we are looking for a proper solution.

My understanding is that this release does not compromise security as described here: https://bugzilla.mozilla.org/show_bug.cgi?id=1399937#c37

100% of people using Chromebook Linux suffer from this bug.

Please do review.

Thanks.

Please note that we took Magnus' criticism on board and revised the patch, so "putting a large group of users at risk" doesn't appear to be accurate. Additionally, the forked code in question has not been maintained in years and no security fixes have been backported from the original M-C version. Also note that bug 1343571, which introduced the code in the original M-C version, was not a "security bug".

My understanding is that this release does not compromise security as described here: https://bugzilla.mozilla.org/show_bug.cgi?id=1399937#c37

That comment states the exact opposite:

Just for the record, the "corner case fix" is an important security patch that prevents attackers from obtaining device permissions through phishy popup-windows. It should (and will) not be backed out under any circumstances.

I bought a Chromebook and was able to set up the environment with the help from Leo. I am able to confirm the bug (TB 115.7.0).

I will try to debug this.

Leo was able to install Firefox on the Chromebook and confirmed that it is working there. But that is the native version of Firefox, installed from the app store (I think that is a mobile version?) and not thru the penguin terminal / developer environment, right?

Has anybody been able to install firefox in the developer environment and if so, how?

Flags: needinfo?(Leowankerddd)

(In reply to John Bieling (:TbSync) from comment #29)

Leo was able to install Firefox on the Chromebook and confirmed that it is working there. But that is the native version of Firefox, installed from the app store (I think that is a mobile version?) and not thru the penguin terminal / developer environment, right?

Has anybody been able to install firefox in the developer environment and if so, how?

John,

I am not running the Google Play app store version of Firefox.
The version I have installed is from "Flatpak" https://flatpak.org/ is the info on Flatpak apps.

The software gets installed from https://flathub.org/apps/org.mozilla.firefox

First, make sure the Flatpak app platform is installed:
sudo apt install flatpak

To install the real Linux Mozilla Firefox run:

flatpak install flathub org.mozilla.firefox

To run from terminal:

flatpak run org.mozilla.firefox

Firefox will get added to the menu after a few minutes.

This will refresh the menu:
sudo update-desktop-database

Hope this helps.

Reach out if you run into any bumps.

Leo.

(In reply to John Bieling (:TbSync) from comment #29)

Leo was able to install Firefox on the Chromebook and confirmed that it is working there. But that is the native version of Firefox, installed from the app store (I think that is a mobile version?) and not thru the penguin terminal / developer environment, right?

Has anybody been able to install firefox in the developer environment and if so, how?

(In reply to John Bieling (:TbSync) from comment #28)

I bought a Chromebook and was able to set up the environment with the help from Leo. I am able to confirm the bug (TB 115.7.0).

I will try to debug this.

Hi John,

Just checking in to see if there has been any progress?

Thanks.

Flags: needinfo?(Leowankerddd)

Same problem for me, Thunderbird version 115.10.1 64-bit installed via Flatpak on ChromeOS version 123.0.6312.112.
Try to install any ad-on and neither the Add or Cancel buttons work.
The error console reports this:
PopupNotifications._onButtonEvent: Button click happened before the window was focused

Any progress on this? I run Gentoo, just updated to 115.10.1 (64-bit), and still unable to install.
How in the world with all the available testing methods does something that used to work no longer work in this day?!

This bug is mainly about ChromeOS and running Thunderbird inside the developer environment, which is a special kind of Linux with a weird window manager, which breaks Thunderbird. Currently we have no resources to fix this.

If you encounter this bug on a vanilla Gentoo (not on ChromeOS), could you please try Comment #10?

Summary: When Installing Addon, the pop up to 'Cancel' or 'Add' buttons not clickable - cannot install any Addon. "PopupNotifications._onButtonEvent: Button click happened before the window was focused." → [ChromeOS] When Installing Addon, the pop up to 'Cancel' or 'Add' buttons not clickable - cannot install any Addon. "PopupNotifications._onButtonEvent: Button click happened before the window was focused."

Some people managed to get the 'Add' button focused by clicking on the 'Tab' key on keyboard until it focused on the 'Add' button.
For anyone with this bug, please try that method.

I tried that, it doesn't work. Tab key does not seem to change focus when the popup is displayed.
I can click on the Add and Cancel buttons and see that they are triggered, but the popup does not close and the add-ins are not added.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: