Fehler: Unable to load summary from remote flathub: openat(flathub.trustedkeys.gpg): Keine Berechtigung

Hi everybody

Installing Firefox via flathub results in the error mentioned. Why?

Using Debian 10.6 on ThinkPad-Notebook T430, I installed flatpak and gnome-software-plugin-flatpak via Synaptic-Pakagemanager **, followed by the terminal-command:
:~$ sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

(** a week ago, I did it via Terminal using «sudo».)

(as mentioned on: https://flatpak.org/setup/Debian)

Installing Firefox via (https://flathub.org/) by pressing the button «Install», the Vivaldi-Browser opens a new small Download-window:
By chossing open → it opens a new Browser-Window. Clicking again on «Install», it shows the following message:
Installation von Firefox nicht möglich: Unable to load summary from remote flathub: openat(flathub.trustedkeys.gpg): Keine Berechtigung

The other way around: downloading the pakage: org.mozilla.firefox.flatpakref.

And now install it via terminal:
xxxx@yyyy:~$ flatpak install --from Downloads/org.mozilla.firefox.flatpakref
Fehler: Unable to load summary from remote flathub: openat(flathub.trustedkeys.gpg): Keine Berechtigung
xxxx@yyyy:~$

To install the pakage directly in the terminal results in the same message:
xxxx@yyyy:~$ flatpak install flathub org.mozilla.firefox
Looking for matches…
Fehler: Unable to load summary from remote flathub: openat(flathub.trustedkeys.gpg): Keine Berechtigung
xxxx@yyyy:~$

A week ago, I tried it with «sudo»:
xxxx@yyyy:~/Downloads$ sudo flatpak install flathub org.mozilla.firefox

This installation succeded (Installation complete), although not all bytes were downloaded for all packages.

To run Firefox, I had to use «sudo» again:
xxx@yyy:~$ sudo flatpak run org.mozilla.firefox
[sudo] Passwort für xxxx:
Gtk-Message: 13:46:22.394: Failed to load module “canberra-gtk-module”
Gtk-Message: 13:46:22.395: Failed to load module “canberra-gtk-module”
Gtk-Message: 13:46:23.609: Failed to load module “canberra-gtk-module”
….

Firefox got open. But running as root ??

After a restart of the notebook, Debian was broken. I had to reinstall the last Debian-backup.

A short glimps in the documentations of flatpak shows that using «sudo» is not necessary or even wrong.

So the question is, how can I install Firefox correctly via flathub ??

And what does it mean: openat(flathub.trustedkeys.gpg): Keine Berechtigung = not allowed ??? Why?

When Debian starts, I use «Gnome under Xorg», not Wayland. Are there any problems with that ?

Thanks for any reply.

With kind regards

G. Vonesch

flatpak by default works on system installation, and it depends on your distribution if it’s going to ask you for roor/sudo password to manage it. To work unprivileged, it takes --user; for example: flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo and so on.

Dear Barthalion

Thanks for your quick response.

Somehow I do not get it.
On my notebok with Debian 10.6, installation and running Firefox (flathub) works only with «sudo». Even «flatpak search » and «flatpak list» only runs with «sudo». On the other hand, «flatpak - -help» runs with and without «sudo».

Examples:
linde@burg:~$ flatpak search skype
F: Failed to parse /var/lib/flatpak/appstream/flathub/x86_64/active/appstream.xml.gz file: Fehler beim 	Öffnen der Datei »/var/lib/flatpak/appstream/flathub/x86_64/active/appstream.xml.gz«: Keine 	Berechtigung
No matches found

linde@burg:~$ flatpak list
linde@burg:~$ 	(It does not show up anything.) 

As I understood correctly, the error-message «Fehler: Unable to load summary from remote flathub: openat(flathub.trustedkeys.gpg): Keine Berechtigung» is on my side, meaning on my Debian-system ??
I found it in /var/lib/flatpak/repo/flathub.trustedkeys.gpg .

The access-rights to this file are:
linde@burg:~$ ls -la /var/lib/flatpak/repo/flathub.trustedkeys.gpg
-rw-r----- 1 root root 2888 Okt 18 14:07 /var/lib/flatpak/repo/flathub.trustedkeys.gpg
linde@burg:~$

Does it mean, that – when installing firefox (or a flathub-pakage) from your website https://flathub.org – I should be able to enter the root-Password in a not yet existing window to have access to the gpg-file ??

Following your suggestions using «–user» , I tried the following commands:

• linde@burg:~$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
  (without «--user», because I am already logged in as user.)
  
• linde@burg:~$ sudo flatpak remote-add --if-not-exists --user flathub `https://flathub.org/repo/flathub.flatpakrepo`  

(although already logged in as user, I added in the commandline «–user».)

• root@burg:~# flatpak remote-add --if-not-exists --user flathub `https://flathub.org/repo/flathub.flatpakrepo`

(here as root)

After each command, I opened Vivaldi-Browser → tried to install «Firefox» from your website: https://flathub.org → it resulted always in the error mentioned.

On the terminal, I tried the commands as user «linde»:

linde@burg:~$ flatpak install --user org.mozilla.firefox
Looking for matches…
Fehler: No remote refs found similar to ‘org.mozilla.firefox’
linde@burg:~$

linde@burg:~$ flatpak install --user flathub org.mozilla.firefox
Looking for matches…
Fehler: No remote refs found similar to ‘flathub’
linde@burg:~$

The same commands with «sudo» were resulting in:

linde@burg:~$ sudo flatpak install --user org.mozilla.firefox
Looking for matches…
Found similar ref(s) for ‘org.mozilla.firefox’ in remote ‘flathub’ (user).
Use this remote? [Y/n]: n

linde@burg:~$ sudo flatpak install --user flathub org.mozilla.firefox
Looking for matches…
Required runtime for org.mozilla.firefox/x86_64/stable (runtime/org.freedesktop.Platform/x86_64/19.08) found in remote flathub
Do you want to install it? [Y/n]: n

Not knowing what the difference is, I took the last command with «… --user flathub ….» to install firefox.

Running firefox as normal user shows:

linde@burg:~$ flatpak run org.mozilla.firefox
Fehler: app/org.mozilla.firefox/x86_64/master ist nicht installiert

Running it with sudo:

linde@burg:~$ sudo flatpak run org.mozilla.firefox
[sudo] Passwort für linde:
Gtk-Message: 20:51:50.046: Failed to load module “canberra-gtk-module”
Gtk-Message: 20:51:50.047: Failed to load module “canberra-gtk-module”
….
It takes about 33 seconds until firefox-window appears.

To compare it with the default installed firefox (68.12.0 esr) on my Debian 10.6:
linde@burg:~$ firefox
→ it takes about 2 seconds to open firefox. (without «sudo» !!).

Reading the following documentations I found on the search-machine (Internet):

  • https://ostechnix.com/how-to-install-and-use-flatpak-in-linux/
  • https://fossbytes.com/what-is-flatpak-how-to-install-flatpak-apps-ubuntu-linux/
  • https://omgubuntu.co.uk/2019/02/how-to-install-flatpak-on-ubuntu-flathub → Installation via your homepage.
  • and even on your homepage: https://flathub.org/apps/details/org.mozilla.firefox

it is never mentioned to install flatpak applications or to run, search, list them as root (sudo).

But WHY does it works on my Debian-System only as root (sudo) ???
Is it Debian-specific or just on my local Notebook ???

Furthermore, reading the article:

  • https://vitux.com/how-to-install-software-through-flatpak-on-debian-10/
    section: «Install software through Flatpak using the Software Manager UI»
    The example with «gedit» (or firefox or octave) searching in «Debian Software»
    (installed 2 pakages: software-properties-common - version 0.96.20.2-2; and
    software-properties-gtk – version 0.96.20.2-2 ) , I only get as result the software offered from debian, no results from flathub, although I have installed «gnome-software-plugin-flatpak» from Synaptic-pakagemanager. Why ??

Is there anything broken on my debian 10.6 system ??

Again: The main questions is: Why does I have to start firefox with «sudo» ? Is this the common way on debian for flathut-pakages or just on my notebook ??

What is the difference between running firefox as «normal user» and as root (sudo)? (as root: more rights, but what kind of rights and for what running a browser as root?)
And what about the security points running a browser as root?

Thanks a lot for answering, actually I do not yet get it .

With kind regards

G. Vonesch

1 Like

Dear G. Vonesch, did you solve this problem? I have the same problem.

Hi egorkin
Sorry for the delay.
The answer is: No.
I stopped using (or trying to use) Firefox on flatpak/flathub. I still use Firefox (esr) (actually 78.15.0 esr) on Debian 10.11 besides other browsers I use. Next step will be Firefox esr on Debian 11.x. Meaning that my focus isn’t any more on this problem at the moment.
Unfortunately I can’t help you more, but it seems that on other machines / systems (like yours) the problem still exists and should be solved.
I wish you happy New Year and all the best.
Kind regards
G. Vonesch

I have found a possible solution
try with

sudo apt-get remove --autoremove flatpak
sudo apt-get purge flatpak

restart system

flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo

This worked for me, in debian 10
I hope it works for you too!
(Sorry for my English, I’m still learning).