Open Bug 1836603 Opened 1 year ago Updated 7 months ago

Snap/XFCE X11: Error when launching Firefox with profile that is already open

Categories

(Core :: Widget: Gtk, defect)

Firefox 113
x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: markjballard, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 obsolete file)

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0

Steps to reproduce:

This started occurring after I upgraded to Ubunu 22.04 (Xubuntu) running Firefox 113.

The problem is that I can no longer open webpages with a single Firefox profile on multiple workspaces.

This is necessary for a productive workflow when operating as a knowledge-worker. Indeed, Firefox has become an especially useful workflow tool since it started accommodating workspaces a few years ago.

This workflow was possible with Firefox under Ubuntu 20.04:

  • You use different workspaces for different tasks.
  • You typically have multiple current tasks open at once on different workspaces.
  • Upon switching to a new task, you leave the present one where it was, to come back to it soon: all its Firefox tabs, files, browser windows and other tools remain open on its workspace.
  • The new task requires a new Firefox window on a new workspace.

Ordinarily in this or any situation, you launch Firefox with a keyboard shortcut. When Firefox opens it launches all windows that had been open on different workspaces, with all their tabs, precisely as they were. It was a brilliant productivity tool.

So to reproduce, launch Firefox when it is already running either with:

(i) The operating system's default shortcut

I.e. executing:

$ exo-open --launch WebBrowser

(ii) launch Firefox either:

[a] with a command issued by the taskbar launcher, or
[b] on the command line with a profile that is already open, or
[c] via the profile manager using a profile that is already open.

I.e., like one of these:

$ firefox -P profile-name

$ /snap/bin/firefox -ProfileManager --no-remote

$ env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/firefox_firefox.desktop /snap/bin/firefox -ProfileManager %u

Or simply: $ firefox

Actual results:

I get an error:

"Firefox is already running, but is not responding. To use Firefox, you must first close the existing Firefox process, restart your device, or use a different profile."

This is ruinous to my knowledge workflow.

It means I can only use one instance of Firefox on one workspace (presuming they are different instances - perhaps the issue is that they once were and are now not?). There is a workaround but it destroys my workflow.

This is the workaround I a have to follow as a result:

[1.] To launch Firefox instance I must first close the existing instance. To do that, I must find it.

  • To do that I must find the workspace it is on.

  • Naturally, I make use of Firefox's profile manager, and the facility it provides to use different profiles for different categories of task (keeping, say, work and personal data in different profiles).

  • That means there are usually multiple profiles open each with multiple windows launched independently on different workspaces.

  • Finding which workspace and which profile is therefore onerous.

[2.] When I do find the offending profile, I do not want to close it because I will lose the present state of the task I was using it for. I can solve the problem by opening a new window from that one that is already open.

  • Then I must move the new window to the workspace where my current task is open. That is onerous.
Component: Widget: Gtk → Security: Process Sandboxing
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

I restated the bug report because the CMS turned my neat sub-bullets into code blocks!

Please read my second message and not the first.

(I tried to edit it, and it posted a second message....)

Component: Security: Process Sandboxing → Widget: Gtk

This started occurring after I upgraded to Ubunu 22.04 (Xubuntu) running Firefox 113.
...This workflow was possible with Firefox under Ubuntu 20.04

I believe the main change that would be relevant for you is that in Ubuntu 20.04 Firefox was a normal package and in Xubuntu 22.04 it looks like Firefox is packaged as a Snap by default. Can you confirm this difference, i.e. that you went from a normal build to the Snap one?

Flags: needinfo?(markjballard)

You are correct. I was using Xubuntu 20.04 before the upgrade. It was running Firefox from a snap.

The old system was running whatever version of Firefox was current at around 15 May 2023.

Flags: needinfo?(markjballard)

Works for me on KDE X11, Debian Testing.
$ snap run firefox -P snaptest
$ snap run firefox -P snaptest # opens second window

A profile can be used by once instance at a time. If a second instance wants to use the same profile, it sees the profile's "lock" file, tries to ask the already running instance via dbus to open another window, and shows a popup if it fails.

$ MOZ_LOG="nsDBusRemoteClient:5" snap run firefox -P snaptest

[(null) 8129: Main Thread]: D/nsDBusRemoteClient nsDBusRemoteClient::nsDBusRemoteClient
[(null) 8129: Main Thread]: D/nsDBusRemoteClient nsDBusRemoteClient::Init
[(null) 8129: Main Thread]: D/nsDBusRemoteClient nsDBusRemoteClient::SendCommandLine
[(null) 8129: Main Thread]: D/nsDBusRemoteClient nsDBusRemoteClient::DoSendDBusCommandLine()
[(null) 8129: Main Thread]: D/nsDBusRemoteClient DBus destination: org.mozilla.firefox.c25hcHRlc3Q_
[(null) 8129: Main Thread]: D/nsDBusRemoteClient DBus path: /org/mozilla/firefox/Remote
[(null) 8129: Main Thread]: D/nsDBusRemoteClient DBus interface: org.mozilla.firefox
[(null) 8129: Main Thread]: D/nsDBusRemoteClient failed to get DBus reply
[(null) 8129: Main Thread]: D/nsDBusRemoteClient DoSendDBusCommandLine FAILED
[(null) 8129: Main Thread]: D/nsDBusRemoteClient nsDBusRemoteClient::~nsDBusRemoteClient
[(null) 8129: Main Thread]: D/nsDBusRemoteClient nsDBusRemoteClient::Shutdown

(firefox:8129): Gtk-WARNING **: 13:46:13.204: Theme parsing error: gtk.css:1:21: Failed to import: Fehler beim Öffnen der Datei »/home/darkspirit/snap/firefox/2751/.config/gtk-3.0/colors.css«: No such file or directory
Gtk-Message: 13:46:13.233: Failed to load module "colorreload-gtk-module"
Gtk-Message: 13:46:13.233: Failed to load module "window-decorations-gtk-module"
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.

$ MOZ_LOG="nsDBusRemoteClient:5" snap run firefox -P snaptest

[(null) 8535: Main Thread]: D/nsDBusRemoteClient nsDBusRemoteClient::nsDBusRemoteClient
[(null) 8535: Main Thread]: D/nsDBusRemoteClient nsDBusRemoteClient::Init
[(null) 8535: Main Thread]: D/nsDBusRemoteClient nsDBusRemoteClient::SendCommandLine
[(null) 8535: Main Thread]: D/nsDBusRemoteClient nsDBusRemoteClient::DoSendDBusCommandLine()
[(null) 8535: Main Thread]: D/nsDBusRemoteClient DBus destination: org.mozilla.firefox.c25hcHRlc3Q_
[(null) 8535: Main Thread]: D/nsDBusRemoteClient DBus path: /org/mozilla/firefox/Remote
[(null) 8535: Main Thread]: D/nsDBusRemoteClient DBus interface: org.mozilla.firefox
[(null) 8535: Main Thread]: D/nsDBusRemoteClient DoSendDBusCommandLine OK
[(null) 8535: Main Thread]: D/nsDBusRemoteClient nsDBusRemoteClient::~nsDBusRemoteClient
[(null) 8535: Main Thread]: D/nsDBusRemoteClient nsDBusRemoteClient::Shutdown

Blocks: snap
Summary: Error when launching Firefox with profile that is already open → Snap/XFCE X11: Error when launching Firefox with profile that is already open
Attachment #9387608 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: