Bug 1173706

Summary: problem adding flathub repo on openSUSE 15.2
Product: [openSUSE] openSUSE Distribution Reporter: Alex Alex <sandro.it>
Component: OtherAssignee: E-mail List <screening-team-bugs>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: fabian, felix.niederwanger
Version: Leap 15.2   
Target Milestone: ---   
Hardware: x86-64   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Alex Alex 2020-07-03 18:33:22 UTC
I did a clean installation of opensuse 15.2 i updated the system and added Packman repo. Later i also added by terminal flathub repo with the following command: 
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo but the system responded to me this way:
error: While opening repository /var/lib/flatpak/repo: opendir(objects): No such file or directory
Searching on google I applied the "solution" that was recommended on reddit, basically make: 
sudo rm -r /var/lib/flatpak/repo and then run the command again to add the flathub repo. This procedure was actually successful and I was able to install some flatpak applications e.g.: spotify and it works correctly.

thank you for your attention
Comment 1 Felix Niederwanger 2020-07-04 08:56:20 UTC
I'm having the same problem on a fresh Leap 15.2 install. The problem occurred already in Tumbleweed in https://bugzilla.opensuse.org/show_bug.cgi?id=1172316 and got fixed there (according to the bug report).

phoenix@mjoelnir:~$ flatpak --version
Flatpak 1.6.3
phoenix@mjoelnir:~$ flatpak search Blargh
error: While opening repository /var/lib/flatpak/repo: opendir(objects): No such file or directory
phoenix@mjoelnir:~$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
error: While opening repository /var/lib/flatpak/repo: opendir(objects): No such file or directory
phoenix@mjoelnir:~$ ls /var/lib/flatpak/repo
phoenix@mjoelnir:~$ 

I can also confirm that the suggested workaround (delete /var/lib/flatpak/repo) works:

phoenix@mjoelnir:~$ sudo rmdir /var/lib/flatpak/repo
[sudo] password for phoenix: 
phoenix@mjoelnir:~$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
phoenix@mjoelnir:/var/lib/flatpak/repo$ flatpak search steam
Name         Description                                                                Application ID                                   Version  Branch Remotes
Steam        Manage and play games distributed by Steam                                 com.valvesoftware.Steam                          1.0.0.64 stable flathub

On Tumbleweed the Flatpak version is 1.6.4, on Leap 1.6.3
Comment 2 Fabian Vogt 2020-07-04 12:40:37 UTC
Dupe

*** This bug has been marked as a duplicate of bug 1172316 ***