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

thunderbird: cannot open links in Firefox: "Your Firefox profile cannot be loaded" #3759

Closed
rsramkis opened this issue Nov 18, 2020 · 12 comments
Labels
sandbox-ipc Opening links and talking to programs outside of the sandbox (see #6462)

Comments

@rsramkis
Copy link

rsramkis commented Nov 18, 2020

Bug

When opening a web link in an e-mail in Thunderbird, Firefox attempts to launch but then reports the error "Your Firefox profile cannot be loaded. It may be missing or inaccessible."

Steps:

  1. Open Thunderbird.
  2. Open E-mail.
  3. Click on weblink in e-mail.
  4. Firefox error message shows "Your Firefox profile cannot be loaded. It may be missing or inaccessible.".

Expected Behavior
The previous behavior with firejail enabled (sudo firecfg) a web link in a Thunderbird e-mail would open a new instances of Firefox with a new user profile (none of my bookmarks showing'.

Environment
Kernel: 5.4.74-1-MANJARO x86_64 Up: 1h 07m Mem: 1696.7/11862.6 MiB (14.3%)
Storage: 465.76 GiB (11.4% used) Procs: 197 Shell: Zsh inxi: 3.1.08

Firefox 82.0.3
Thunderbird 68.12.0

Bugs I am trying to find a solution in:

#3579
#2336
#3471 (comment)

@rusty-snake
Copy link
Collaborator

Firefox must be already running for all of these to work. If firefox is open, it should work out-of-the-box with firejail 0.9.64 and thunderbird.

@rsramkis
Copy link
Author

Previously Firefox did not already need to be open. It would spawn its own instance on demand. This was ideal not only for web links in an e-mail but also clicking on links in ebooks.

I already verified that if I open Firefox before hand, then click on link in e-mail in Thunderbird that the link opens correctly.

Do we have documentation which mentions this is the expected behavior? Thanks.

@rusty-snake
Copy link
Collaborator

The issue is that firefox then runs inside the other sandbox (e.g. thunderbirds). That something we simply don't support. Since thunderbird and firefox have very similar profiles, it's maybe enough to add whitelist ${HOME}/.mozilla. However some thing will still break in firefox (e.g. web-cam, local documentation, ...) and it's less secure as firefox has full D-Bus access and can read and write in ~/.gnupg.

@rsramkis
Copy link
Author

Thanks for providing your feedback.

Based on your observations, if my default web browser in Gnome was not Firefox but Vivaldi (which does not have a firefox\thunderbird profile), then should my expectation then be that Vivaldi will automatically launch when I click on a link in Thunderbird?

@rusty-snake
Copy link
Collaborator

If your default browser is vivaldi/chromium/opera/... this would not work unless you drastically weaken your thunderbird.profile. IDK if/how it works with a running vivaldi/… since I (and the most other firejai users) use firefox.

@rsramkis
Copy link
Author

Thanks for the information. It does not bother me to manually launch a web browser.

But from a usability stand point I would have bugged this. The competition (Mac OS) does not behave this way and it has some sophisticated Apparmor setup on its own for security. An end user seeing a "no profile" error is misleading. Espcially since it never behaved this way a couple months ago.

Closing this issue.

@rsramkis rsramkis reopened this Nov 19, 2020
@rsramkis
Copy link
Author

Just noticed something. I ran the following command from terminal to change my default web browser in Gnome to vivaldi:

"xdg-settings set default-web-browser vivaldi-stable.desktop"

Then I rebooted, launched Thunderbird, and clicked on an e-mail which had a web link. Vivaldi launched with no errors in sandbox mode (because it did not show any of my bookmarks). This is exactly how Firefox used to behave.

@rusty-snake
Copy link
Collaborator

open a new instances of Firefox with a new user profile (none of my bookmarks showing'.

Uhh, somehow over read this. nowhitelist ${HOME}/.mozilla/firefox/profiles.ini should work I think. However, keep in mind that this can still make trouble.

@rsramkis
Copy link
Author

Hi Rusty,

I'm not sure what I should do with the string "nowhitelist ${HOME}/.mozilla/firefox/profiles.ini". I assume it needs to go into a configuration file?

Note I did read bug:
#3482

@rsramkis
Copy link
Author

rsramkis commented Nov 20, 2020

I was able to find the a file /etc/firejail/thunderbird.profile. It contained these lines:

`# These lines are needed to allow Firefox to load your profile when clicking a link in an email
noblacklist ${HOME}/.mozilla
whitelist ${HOME}/.mozilla/firefox/profiles.ini
read-only ${HOME}/.mozilla/firefox/profiles.ini

noblacklist ${HOME}/.cache/thunderbird
noblacklist ${HOME}/.gnupg
`

It looks like it is already setup to allow for web links to be open based on the comment line.

Source:
#3291

@rusty-snake
Copy link
Collaborator

I'm not sure what I should do with the string "nowhitelist ${HOME}/.mozilla/firefox/profiles.ini". I assume it needs to go into a configuration file?

Short: add the nowhitelist to your thunderbird.local

mkdir ~/.config/firejail
echo "nowhitelist ${HOME}/.mozilla/firefox/profiles.ini" >> ~/.config/firejail/thunderbird.local

It looks like it is already setup to allow for web links to be open based on the comment line.

Long: out of #3291 support to open firefox from thunderbird was added by default. But firefox must be running. Your old never supported behaviour was broken by this because ~/.mozilla now appear in the sandbox.

@rsramkis
Copy link
Author

Thanks for your feed back. I will go with the recommended configuration.

@kmk3 kmk3 changed the title Thunderbird | Open Link in e-mail causes Firefox to report "Your Firefox profile cannot be loaded. It may be missing or inaccessible." thunderbird: cannot open links in Firefox: "Your Firefox profile cannot be loaded" Sep 4, 2024
@kmk3 kmk3 added the sandbox-ipc Opening links and talking to programs outside of the sandbox (see #6462) label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sandbox-ipc Opening links and talking to programs outside of the sandbox (see #6462)
Projects
None yet
Development

No branches or pull requests

3 participants