Firefox not opening file chooser dialog for importing certificates

Bug #1913570 reported by Ronald Huetter
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
firefox (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

When installed as a snap, firefox won't open the file chooser dialog for importing a certificate authority. However, it is working when installed using apt.

How to reproduce:
1. Install firefox as snap
2. Navigate to Preferences | Privacy & Security | Certificates | View Certificates
3. Select Authorities
4. Click Import ...
   -> A file selector dialog should open to import a certificate, but nothing happens.

Environment:
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu55
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: Budgie:GNOME
Date: Thu Jan 28 11:43:55 2021
DistroRelease: Ubuntu 21.04
InstallationDate: Installed on 2021-01-15 (12 days ago)
InstallationMedia: Ubuntu-Budgie 21.04 "Hirsute Hippo" - Alpha amd64 (20210115)
ProcCpuinfoMinimal:
 processor : 3
 vendor_id : GenuineIntel
 cpu family : 6
 model : 42
 model name : Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz
 stepping : 7
 microcode : 0x2f
 cpu MHz : 3701.000
 cache size : 8192 KB
 physical id : 6
 siblings : 1
 core id : 0
 cpu cores : 1
 apicid : 6
 initial apicid : 6
 fpu : yes
 fpu_exception : yes
 cpuid level : 13
 wp : yes
 flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc cpuid pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx hypervisor lahf_lm pti ssbd ibrs ibpb stibp tsc_adjust arat md_clear flush_l1d arch_capabilities
 bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit
 bogomips : 7402.00
 clflush size : 64
 cache_alignment : 64
 address sizes : 43 bits physical, 48 bits virtual
 power management:
ProcEnviron:
 SHELL=/bin/bash
 LANGUAGE=en_US
 LC_ADDRESS=de_DE.UTF-8
 LC_NAME=de_DE.UTF-8
 LC_MONETARY=de_DE.UTF-8
 LC_PAPER=de_DE.UTF-8
 LANG=en_US.UTF-8
 TERM=xterm-256color
 LC_IDENTIFICATION=de_DE.UTF-8
 LC_TELEPHONE=de_DE.UTF-8
 LC_MEASUREMENT=de_DE.UTF-8
 XDG_RUNTIME_DIR=<set>
 LC_TIME=de_DE.UTF-8
 PATH=(custom, no user)
 LC_NUMERIC=de_DE.UTF-8
ProcVersionSignature: Ubuntu 5.8.0-36.40+21.04.1-generic 5.8.18
Snap: firefox 84.0.2-1 (stable)
Tags: hirsute
Uname: Linux 5.8.0-36-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
_MarkForUpload: True

Tags: snap
tags: added: snap
Revision history for this message
Ronald Huetter (user-0209) wrote :

Related to #1911649

Revision history for this message
Olivier Tilloy (osomon) wrote :

It works for me here, I wonder if this might be caused by the missing XDG portal.

Can you share the output of the following command?

    apt policy xdg-desktop-portal*

Changed in firefox (Ubuntu):
status: New → Incomplete
Revision history for this message
Ronald Huetter (user-0209) wrote :

Output of apt policy xdg-desktop-portal*:

xdg-desktop-portal-backend:
  Installed: (none)
  Candidate: (none)
  Version table:
xdg-desktop-portal-tests:
  Installed: (none)
  Candidate: 1.8.0-2
  Version table:
     1.8.0-2 500
        500 http://de.archive.ubuntu.com/ubuntu hirsute/universe amd64 Packages
xdg-desktop-portal-dev:
  Installed: (none)
  Candidate: 1.8.0-2
  Version table:
     1.8.0-2 500
        500 http://de.archive.ubuntu.com/ubuntu hirsute/main amd64 Packages
        500 http://de.archive.ubuntu.com/ubuntu hirsute/main i386 Packages
xdg-desktop-portal-gtk:
  Installed: (none)
  Candidate: 1.8.0-1
  Version table:
     1.8.0-1 500
        500 http://de.archive.ubuntu.com/ubuntu hirsute/main amd64 Packages
xdg-desktop-portal-kde:
  Installed: (none)
  Candidate: 5.20.90-0ubuntu1
  Version table:
     5.20.90-0ubuntu1 500
        500 http://de.archive.ubuntu.com/ubuntu hirsute/universe amd64 Packages
xdg-desktop-portal-wlr:
  Installed: (none)
  Candidate: 0.1.0-3
  Version table:
     0.1.0-3 500
        500 http://de.archive.ubuntu.com/ubuntu hirsute/universe amd64 Packages
xdg-desktop-portal:
  Installed: (none)
  Candidate: 1.8.0-2
  Version table:
     1.8.0-2 500
        500 http://de.archive.ubuntu.com/ubuntu hirsute/main amd64 Packages

Revision history for this message
Ronald Huetter (user-0209) wrote :

I tried:
sudo apt-get install -y xdg-desktop-portal

It didn't cure the problem, right after install. Re-installed firefox didn't make it work either. After reboot everything was working.

Question is, where did I loose this xdg-desktop-portal, but I'm quite sure it wasn't there from the initial install, because I see the same behaviour on some other test system.

Revision history for this message
Fifi Cek (fifi-cek) wrote :

Any workarounds in Firefox snap existing?

Revision history for this message
Fifi Cek (fifi-cek) wrote :

That's interesting, this ticket was opened for Firefox package while the observations here locally are for Ubuntu 18.04 Firefox snap is affected, Firefox classic package not.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for firefox (Ubuntu) because there has been no activity for 60 days.]

Changed in firefox (Ubuntu):
status: Incomplete → Expired
Revision history for this message
frigo (rigault-francois) wrote :

I hit this bug too with firefox 94.0.1-1 / Ubuntu 20.04.3 LTS (Focal Fossa)

when trying to import my certificate from /etc/ssl/certs/toto.crt, that has previously been installed with update-ca-certificates, "nothing happens" as you describe

when opening the Browser Console, and repeating the action, I get an error:

message: "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIX509CertDB.importCertsFromFile]"

we can see what happens by looking in the snap:
snap run --shell firefox
cat /etc/ssl/certs/toto.crt
: No such file or directory

this is a symlink that points to a folder under /usr/local/share/ca-certificates which is not accessible by the snap.

Fix it: copy the file under $HOME where it can be imported... hth

Revision history for this message
Olivier Tilloy (osomon) wrote :

François, this is a different (although related) issue: this bug report was about firefox not even opening a file selection dialog to pick a certificate file, which was resolved after installing xdg-desktop-portal. The problem you're describing is that after selecting the certificate file, firefox fails to actually import it. I can observe the same problem, so that's definitely a bug. Would you mind filing an upstream bug at https://bugzilla.mozilla.org/enter_bug.cgi#h=dupes|Firefox to track the problem, making sure to include "snap" in the bug title, and marking it as blocking https://bugzilla.mozilla.org/show_bug.cgi?id=1665641 ?

Thanks in advance!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.