Flathub Won't Install

Flathub won’t install anymore. It’s always worked in the past.

When I copy from flathub’s instructions (flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo) and paste the repo install code into terminal, I now get:

error: While opening repository /var/lib/flatpak/repo: opendir(objects): No such file or directory

Can anyone help me get this resolved?

Thank you much for help you can provide.

same problem in Leap 15.2 RC with flatpak 1.6.3.

Maybe related to this bug report?

You may consider upgrading to Tumbleweed. It uses the latest stable software versions and now works reliable. You need not upgrade every few days. Upgrading at your own pace works fine.

Erm, this is about Tumbleweed, isn’t it? :wink:

The mentioned bug report was filed against Tumbleweed as well.
And it contains a workaround:

As per: https://www.reddit.com/r/openSUSE/comments/gtvvv5/flathub_repo_link_broken/fsex6r3/
Removing /var/lib/flatpak/repo/ before trying to add a repo fixes the issue. When adding the repo, the necessary folders and files are created now.

I never worked around. Just did a copy and paste. Flatpak works indeed:

erlangen:~ # flatpak remotes
Name    Options
flathub system
erlangen:~ # flatpak search firefox
Name          Description               Application ID            Version       Branch       Remotes
Firefox       Firefox Web Browser       org.mozilla.firefox       76.0.1        stable       flathub
erlangen:~ # flatpak install Firefox
Looking for matches…
Found similar ref(s) for ‘Firefox’ in remote ‘flathub’ (system).
Use this remote? [Y/n]: 
Similar refs found for ‘Firefox’ in remote ‘flathub’ (system):

   1) app/org.mozilla.firefox/x86_64/stable
   2) app/org.mozilla.Firefox.BaseApp/x86_64/stable

Which do you want to use (0 to abort)? [0-2]: 1
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]: 

org.mozilla.firefox permissions:
    ipc       network       pcsc       pulseaudio       x11      devices      file access [1]      dbus access [2]      system dbus access [3]

    [1] xdg-download
    [2] org.a11y.Bus, org.freedesktop.FileManager1, org.freedesktop.Notifications, org.freedesktop.ScreenSaver, org.gnome.SessionManager, org.gtk.vfs.*, org.mpris.MediaPlayer2.org.mozilla.firefox
    [3] org.freedesktop.NetworkManager

        ID                                              Branch            Op           Remote            Download
 1. ✓] org.freedesktop.Platform.GL.default             19.08             i            flathub            84.6 MB / 85.1 MB
 2. ✓] org.freedesktop.Platform.Locale                 19.08             i            flathub            23.5 MB / 318.2 MB
 3. ✓] org.freedesktop.Platform.VAAPI.Intel            19.08             i            flathub             8.6 MB / 8.7 MB
 4. ✓] org.freedesktop.Platform.openh264               2.0               i            flathub           857.5 kB / 916.8 kB
 5. ✓] org.freedesktop.Platform                        19.08             i            flathub           193.2 MB / 238.3 MB
 6. ✓] org.mozilla.firefox.Locale                      stable            i            flathub           524.0 kB / 48.2 MB
 7. ✓] org.mozilla.firefox                             stable            i            flathub            79.4 MB / 84.5 MB

Installation complete.
erlangen:~ # flatpak list
Name                          Application ID                                Version           Branch          Installation
Freedesktop Platform          org.freedesktop.Platform                      19.08.10          19.08           system
default                       org.freedesktop.Platform.GL.default                             19.08           system
Intel                         org.freedesktop.Platform.VAAPI.Intel                            19.08           system
openh264                      org.freedesktop.Platform.openh264                               2.0             system
Firefox                       org.mozilla.firefox                           76.0.1            stable          system
erlangen:~ # 

Well, AIUI the bug seems to be that flatpak doesn’t download the necessary files if the directory /var/lib/flatpak/repo/ exists (but is empty).

You probably already have those files from an earlier version that maybe didn’t have this bug or didn’t create the directory on installation.

I’m just guessing here though, I don’t use Tumbleweed so cannot check.

There obviously have been other people with that problem though, as the links to the bug report and reddit show.

Thank you very much for this hint!

Several months ago i did a new Tumbleweed installation and when i tried to add a flatpak package i ran into the problem described in #1. However i did not bother to look deeper into it.

Today i tried the workaround mentioned in the bugreport and it works for me!