[Zotero 7 beta] Invoking Firefox over Zotero uses non-default profile

Hello,

I had to recently switch to the beta version of Zotero as TLS 1.3 (default for Nextcloud) isn't supported by Zotero 6 due to using an older version of Firefox. The beta version works great with one exception: For some reason, when I click on any link within Zotero, it views the link in Firefox, however the instance of Firefox uses a non-default profile. It ignores the already existing Firefox instance running in background and invokes its own Firefox with its own profile instead. I'm not sure how and why Zotero does this, but checking about:support on the Firefox instance spawned by Zotero shows that a non-default profile is being used:

https://s3.amazonaws.com/zotero.org/images/forums/u12910717/uhdpx0yqbccijrqmb3lx.png (when Firefox is started over the terminal or some launcher)

https://s3.amazonaws.com/zotero.org/images/forums/u12910717/is3dgud9461lwj6k5gds.png (when Firefox is launched by Zotero)

Did anyone experience a similar issue?

Thanks in advance.
  • Zotero uses xdg-open on Linux to open links, which is configured in the OS, so you should figure out why that opens links in a non-default profile.
  • edited March 21, 2024
    This issue does not occur when I invoke xdg-open over the terminal, ex. xdg-open https://example.org. Zotero 6 did not have this issue either.
  • It's almost definitely the flatpak. Flatpaks run in a sandbox which has all its own configuration. We generally do not recommend running Zotero from Flatpak and generally are unable to provide troubleshooting instructions for that specifically because the Flatpak environment can cause such issues.
  • I just downloaded the tarball from https://www.zotero.org/support/beta_builds and checked if the issue persists. Exact same issue, opening "Discussion Forums" over the Help menu starts a new Firefox instance with a clean profile. Because xdg-open does not seem to be the culprit, and I didn't come across this issue using Zotero 6, and it also persists in the non-Flatpak native version, I can only assume that it's a Zotero 7 bug.
  • edited March 21, 2024
    Same problem for me. Linux and firefox too
  • edited March 22, 2024
    What happens if you delete the "default" profile (assuming that's the one you don't use)?
  • @k_b_y @eporte Do you see this happen when opening links or .html files in some other way?
  • Hi,

    Thanks @dstillman it solves the problem for me +1
  • It seems like the link clicked in Zotero 7 opens a firefox window and automatically selects "default" as the profile. If this is not the profile that you normally use this is a problem. What fixed it for me was to go to about:profiles from within the firefox window where the wrong profile was selected and to find my correct profile and click "set as default profile"
  • Same problem for me Linux Debian 12 Zotero 7, no flatpack.
  • the solution by @s_beckers worked for me
  • I encountered the same issue. The @s_beckers solution worked for me too. Thanks!
  • I've discovered that the _real_ problem is that the shell script that launches Zotero sets an environment variable 'MOZ_LEGACY_PROFILES' to 1, and that environment variable 'leaks through' to Firefox when Zotero launches -- and forces Firefox into the legacy mode for determining which profile to use. (This legacy mode is pre-Firefox 67 behaviour.)

    I get the same behaviour (opening a new instance) if I run 'MOZ_LEGACY_PROFILES=1 xdg-open https://zotero.org/'.

    Basically, Zotero needs to unset this variable (and probably MOZ_ALLOW_DOWNGRADE) before it launches any programs.

    [Also, xdg-open is only used as the fallback launch option. Opening a link appears to ultimately be done by the GLib library, without involving xdg-open. AFAIK, this uses the same lookup method as xdg-open.]
  • @dmcooke: Ah, well done — thanks. We'll see what we can do.
  • Same issue here, using Zotero 7 AUR's package. The solution from @s_beckers worked for me as well
  • This happens to me on Debian, and I think it will happen to many people because the profile actually/normally used there is called "default-esr" instead of "default". This is because the default (haha...) version of Firefox in Debian is the ESR version.

    Going to "about:profiles" and removing the "default" profile helped.
  • Cross-referencing: https://forums.zotero.org/discussion/118931/zotero-7-0-8-firefox-is-default-pdf-viewer-but-zotero-opens-pdfs-into-wrong-profile#latest

    Briefly, a similar issue crops up in Windows too, when Firefox is the system PDF viewer and Zotero is configured to open PDFs there. Again, the problem is the MOZ_LEGACY_PROFILES env variable.
  • Perhaps unsurprisingly, this happens on macOS too (macOS 15, Zotero 7.0.8).
Sign In or Register to comment.