Firefox (Ubuntu 18.04) authority certificate import not possible

Firefox snap on Ubuntu 18.04 - all updates actually installed.
Problem described below doesn’t exist on same machine, however Firefox classic package installation.
I didn’t find existing posting which would match this problem, hence this topic creation.

Problem location
Firefox Certificate Manager > Authorities area
Pushing/Clicking “Import…” doesn’t result in any Firefox reaction - no new window opens to select certificate file to upload to Firefox.
Consequently it is not possible to import intended root certificate.
If to take a look at Firefox snap entry in Ubuntu Software app (package and snaps management), section Permissions, one can find no setting entry which could be responsible at this issue (one could try to change to fix problem).

How to fix it?
What is possible root cause?

This is bug #1913570.

Thanks for information.
Which workarounds might exist within Firefox snap?
Firefox classic package is not used on production machines this local network.

Lot of months passed since problem was realized. Used setup were continuously kept at always up-to-date state regarding software version of installed apps that period of time > no improvement till today.

Hints found in launchpad ticket kindly linked by @oSoMoN either didn’t help (myself tested those) or address bug rather different than this one. Is it possible one needs to act at snap configuration level instead in order to import to Firefox snap app? May it be Firefox GUI use is blocked intentionally by this snap app makers in order administrators/user face snap interface to accomplish this task?

I just tested this again, both on Ubuntu 18.04 and 21.10, and importing a root certificate stored on disk worked for me.

For reference, I used these commands to generate a test root certificate:

openssl genrsa -des3 -out myCA.key 2048
openssl req -x509 -new -nodes -key myCA.key -sha256 -days 1825 -out myCA.pem

And I was able to successfully import myCA.pem in Firefox from the certificates manager at about:preferences#privacy, and to inspect it afterwards at about:certificate.

@Last-one could you please describe what you’re doing, and how it fails? The browser console might have some insight into the errors.

Thanks for your come-back to my affair. Actually test proceeding didn’t changed since its introduction this thread opening.

Firefox is open

Go to Settings, then Privacy & Security area

Open Certificate Manager by click on View Certificates…

Try to import certificate from file by clicking on Import… in one of visible tabs

Certificate file was downloaded to local disk from router’s administrative interface and is stored to file .cer filename extension, there is also .crt file same location - no more remember which one is original download from router administrative interface, maybe those two.

Problem is Firefox show zero reaction on my clicks onto Import… buttons > nothing opens. As mentioned previously only snapped Firefox is affected.

How did you conduct this operation?

did you install the portal packages for your desktop as described in the bug ?

As suggested by @ogra, if no file dialog opens when clicking on the Import button, it’s most likely because you’re missing the desktop portal package that would display the dialog.

Run the following command:

sudo apt install xdg-desktop-portal-gtk

Then restart your user session, and firefox should now show the file dialog when the Import button is clicked.

1 Like

Thanks for hint. I see there was package installation stored to bash command history for gtk-less portal but not that one with gtk included. Latter one was added on your kind hint and open cert file dialog opens now. Improvement also without session restart. Thank you!

1 Like

Excellent, I’m glad this resolved the problem!