13

Firefox is unable to load module

I've been trying to setup a smartcard reading device, and I've gotten stuck twice on the same place.

When it comes to configuring the Security Device on Firefox, I can't access the .so file. Firefox merely shows the error "Alert: Unable to add module", but I've noticed that when I try to browse my files manually, trying to access the /usr directory returns an error (sometimes, I seem to not be able to get it consistently).

It also happens that the software I installed for the digital certificate tried to open an html with Firefox, which is located in /usr/share/, and Firefox doesn't seem to be able to load that either. It returns a "Can't open file".

Steps followed

  1. Open Firefox
  2. Settings → Privacy and Security → Security Devices → Load
  3. Insert path /usr/lib/libpkcs11-dnie.so and try to load (yes, I've checked that the file does actually exist)
  4. Receive Alert: Unable to add module error

Relevant information

  • Ubuntu 22.04
  • I'm on the latest snap version of Firefox: 100.0.1-1
  • Trying to setup the digital certificate for my Spanish ID (DNIe)
Nabiu
  • 303

1 Answers1

6

(This answer is thanks to a comment and blog post from Enric Mieza)

The problem is the Snap version of Firefox from Ubuntu 22.04. Installing the Extended Support Release of Firefox fixes this (firefox-esr).

To do this in an Ubuntu 22.04 system, follow the next steps (make sure to have admin privileges):

  1. Remove the snap version of Firefox with:
snap remove firefox
  1. Add the PPA from the Mozilla team and install the ESR version of Firefox:
apt install software-properties-common -y
add-apt-repository ppa:mozillateam/ppa
apt install firefox-esr
  1. (Optionally) Add a symbolic link to the firefox-esr binary so that it properly opens the installation instructions included in the libpkcs11-dnie package:
ln -s /usr/bin/firefox-esr /usr/bin/firefox
Nabiu
  • 303