Bug 2276078 - Opening links in emails with Firefox fails if FF is already running
Summary: Opening links in emails with Firefox fails if FF is already running
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: thunderbird
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Gecko Maintainer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-04-19 16:05 UTC by Dimitris
Modified: 2024-05-27 23:56 UTC (History)
8 users (show)

Fixed In Version: thunderbird-115.10.1-4.fc39 thunderbird-115.10.1-4.fc38 thunderbird-115.11.0-1.fc41
Clone Of:
Environment:
Last Closed: 2024-04-25 01:20:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Mozilla Foundation 1862790 0 -- UNCONFIRMED Hyperlinks in Thunderbird 115 not opening browser (Debian 12 Bookworm) 2024-04-19 16:05:54 UTC

Description Dimitris 2024-04-19 16:05:23 UTC
Clicking on links in an email body fails if Firefox (set as default browser) is already running.  Thunderbird is starting a new process instead of using the already-running one.  The new process fails to start with an error popup stating that Firefox is already running.

Opening links when FF is not running works, but Firefox is already running on the desktop in the vast majority of the time.

Reproducible: Always

Steps to Reproduce:
1. Links were opening without issue under 115.9.0-1.fc39.
2. Updated just Thunderbird to 115.10.0-1.fc39.
3. Tried to open a link with FF running; Failed, got the "Firefox is already running" popup.
4. Downgraded back to 115.9.0-1.fc39.
5. Opening links works again,
Actual Results:  
Thunderbird apparently invokes FF with --no-remote or --new-instance

Expected Results:  
Should be invoking Firefox such that the existing process is used, with a new window/tab opened in it for the clicked link.

Comment 1 Dimitris 2024-04-19 16:08:17 UTC
Info I missed before: This is all under GNOME on Wayland.

Comment 2 Dimitris 2024-04-19 16:58:56 UTC
A diff of the /proc/:pid/environ between .9 and .10 shows only this added in .10:

MOZ_APP_REMOTINGNAME=mozilla-thunderbird

Other than that the only other env differences are DESKTOP_STARTUP_ID, GIO_LAUNCHED_DESKTOP_FILE_PID and XDG_ACTIVATION_TOKEN which seem normal to change per run.

Comment 3 Dimitris 2024-04-19 17:16:15 UTC
Not sure what MOZ_APP_REMOTINGNAME does.  For watever it may be worth I tried to "unset" it with a user .desktop file:

Exec=env -u MOZ_APP_REMOTINGNAME thunderbird %u

did not work (env var still present in /proc/:pid/environ) because the /usr/bin/thunderbird script checks the variable for being set.

Exec=env MOZ_APP_REMOTINGNAME=" " thunderbird %u

did seem to take effect based on /proc/:pid/environ but the behavior didn't change.

Comment 4 Julian Sikorski 2024-04-22 11:24:43 UTC
Happens on my machine as well (F39 Wayland).

Comment 5 Eike Rathke 2024-04-22 16:35:02 UTC
Removing that  export MOZ_APP_REMOTINGNAME=mozilla-thunderbird  from /usr/bin/thunderbird actually fixed things for me.

Comment 6 Dimitris 2024-04-22 17:05:06 UTC
Unfamiliar with Mercurial so haven't been able to track the reasoning for that MOZ_APP_REMOTINGNAME addition upstream, any pointers would be welcome.

Comment 8 Dimitris 2024-04-22 18:48:15 UTC
BTW I also installed thunderbird-wayland.x86_64-115.10.0-1.fc39 and started from the Wayland-specific desktop file, same issue persists.

Confirming that building a locally patched 115.10.1-1 with the setting of MOZ_APP_REMOTINGNAME removed:

diff --git a/thunderbird.sh.in b/thunderbird.sh.in
index db5e171..3299b30 100644
--- a/thunderbird.sh.in
+++ b/thunderbird.sh.in
@@ -83,12 +83,6 @@ fi
 
 __WAYLAND_X11_PLACEHOLDER__
 
-# We need to link Firefox with desktop file name
-if [ -z "$MOZ_APP_REMOTINGNAME" ]
-then
-  export MOZ_APP_REMOTINGNAME=__APP_NAME__
-fi
-
 ##
 ## Automatically installed langpacks are tracked by .fedora-langpack-install
 ## config file.

Resolves this.

Comment 9 Dimitris 2024-04-22 19:00:54 UTC
Is MOZ_APP_REMOTINGNAME something that's needed, at least in F39?  Removing it form the script with the patched build doesn't seem to have any negative effect on my (GNOME/Wayland) desktop.  Web links from email content open correctly in the already-running browser, and mailto: links from web pages open new message windows in Thunderbird as expected.

Comment 10 Dimitris 2024-04-23 05:03:21 UTC
@Eike I see you've changed to MOZ_APP_REMOTINGNAME=firefox.  I haven't had a chance to test the new build yet, so just thinking aloud here, apologies if this is noise:  Would this work if the default browser is not Firefox?  Would it need to instead be set to e.g. xdg-open to work for any default browser?

Comment 11 Eike Rathke 2024-04-23 11:00:29 UTC
That was a misunderstanding of what that variable would accomplish. Also, it does not determine what browser is called, but then affecting the firefox runtime if set overriding its remoting name.

Comment 12 Jan Horak 2024-04-23 15:55:11 UTC
This should be fixed by https://koji.fedoraproject.org/koji/buildinfo?buildID=2442624

Comment 13 Fedora Update System 2024-04-23 19:37:22 UTC
FEDORA-2024-15b892ebd3 (thunderbird-115.10.1-4.fc38) has been submitted as an update to Fedora 38.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-15b892ebd3

Comment 14 Fedora Update System 2024-04-23 19:37:25 UTC
FEDORA-2024-81c9a3fe50 (thunderbird-115.10.1-4.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-81c9a3fe50

Comment 15 Fedora Update System 2024-04-24 02:01:35 UTC
FEDORA-2024-81c9a3fe50 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-81c9a3fe50`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-81c9a3fe50

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 16 Fedora Update System 2024-04-24 03:00:21 UTC
FEDORA-2024-15b892ebd3 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-15b892ebd3`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-15b892ebd3

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 17 Fedora Update System 2024-04-25 01:20:10 UTC
FEDORA-2024-81c9a3fe50 (thunderbird-115.10.1-4.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 18 Fedora Update System 2024-05-02 01:43:38 UTC
FEDORA-2024-15b892ebd3 (thunderbird-115.10.1-4.fc38) has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 19 Fedora Update System 2024-05-27 23:48:35 UTC
FEDORA-2024-3e35153569 (thunderbird-115.11.0-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-3e35153569

Comment 20 Fedora Update System 2024-05-27 23:56:21 UTC
FEDORA-2024-3e35153569 (thunderbird-115.11.0-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


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