flathub / org.gnome.Lollypop

https://flathub.org/apps/details/org.gnome.Lollypop
5 stars 9 forks source link

Lollpop FUBAR. Almost never plays music, scans for music files on every launch, loses the music collection occasionally, errors about being unable to access files, etc. #135

Closed JaneSmith closed 3 years ago

JaneSmith commented 3 years ago

As the title says. Lately Lollpop has not been functioning properly at all. It almost never plays music, scans for music files on every launch, loses the music collection occasionally, errors about being unable to access files, etc.

I am not sure whether this is an issue with Lollypop itself, or the Flatpak package. I posted a comment on the Lollypop issue tracker and was told to report the issue against Flathub instead. As far as I can tell they don't seem to support the modern Flatpak package for some reason.

So I'm posting the issue here. Unfortunately I'm not able to provide much information beyond the description above. I can say that at times, I get error messages in the form of GNOME notifications, saying things such as:

../plugins/elements/gstfilesrc.c(532): gst_file_src_start (): /GstPlayBin:player/GstURIDecodeBin:uridecodebin0/-GstFileSrc:source: No such file "/run/user/1000/doc/e4c299e6/Music/SomeFilenameHere.mp3"

Sometimes when I open the preferences window, I see that the music collection is set to "None" instead of my preferred location. When I point it back to my preferred location, Lollypop spends a long time scanning the entire directory, but eventually it completes and I can play music again... until I close Lollypop. On the next launch, it's all broken again.

My music is not stored in the home directory, and is instead under something along the lines of /var/mnt/X/Y/Z.

Please let me know how I can provide any more information to troubleshoot this.

Eonfge commented 3 years ago

I'm sorry to hear all this, can you provide me with some extra information concerning your system? Can you give the the results of the following commands:

flatpak --version
cat /etc/*release*

My fear is, that you're running an outdated version of Flatpak itself. A month ago we updated Lollypop so its sandboxing would work better, with the side-effect that unsupported vesions of Flatpak have issues. I already mentioned that on the README here, but the problem is nasty.

JaneSmith commented 3 years ago

Sorry for the lack of information. I'm running Fedora Silverblue 33.20210212.0, my Flatpak version is 1.10.1, and my kernel version is 5.10.14-200.

Eonfge commented 3 years ago

Than it sounds like a config issue within Lollypop. Can you go to preferences and check the Collections listed?

Screenshot from 2021-02-24 19-38-10

In this screenshot, you can see my /Music folder, which is actually on /mnt/data/Music so it should be possible to mount discs and than read them.

Second step, is '/var/mnt/XYZ the default in Silverblue? According to the Flatpak specs, /var/ is blacklisted because every application can read each-others temporary files there. Could you try mounting it at /run/media or ~/ if the first step doesn't work out.

Eonfge commented 3 years ago

@JaneSmith How is it going, have you been able to work out the problem?

JaneSmith commented 3 years ago

Apologies for the late response.

My preferences window looks much the same as yours: https://i.imgur.com/Av2gNEn.png

That's how it looks most of the time, at least. Sometimes the collection list just empties on its own though, and when that happens I manually point it back to my Music folder.

/var/mnt/ is the default location for /mnt/ in Fedora Silverblue, and as I understand it that's the appropriate location for permanent mounts. I haven't yet tried mounting to another location yet as I'm automatically mounting at boot time and keep forgetting to change it, and I have a lot of important data on the drive that I need to access during the day so I don't want to mess with the mounting location while I'm using it. That's the reason for my delay in responding. Sorry about that!

I tried creating a symlink to my music directory as ~/Music, as I figured that should work the same way as just mounting there directly? At first, it appeared to work. I pointed Lollypop there in the preferences window, let it rescan, and it would play my music. I closed and reopened Lollypop a few times, and it kept working! The next day it was back to being broken again, with the same error messages as in my first post.

I'll also clarify that I've been using Lollypop for at least a year now, with all the same setup: Fedora Silverblue, Flatpak Lollypop, with my music mounted in /var/mnt/XYZ. It always used to work perfectly fine. It only broke more recently, although I'm not sure when. You did say it was updated a month ago so the sandboxing worked differently, so I expect that's when it broke.

Eonfge commented 3 years ago

I'll also clarify that I've been using Lollypop for at least a year now, with all the same setup: Fedora Silverblue, Flatpak Lollypop, with my music mounted in /var/mnt/XYZ. It always used to work perfectly fine. It only broke more recently, although I'm not sure when. You did say it was updated a month ago so the sandboxing worked differently, so I expect that's when it broke.

Correct. What you can do as a last resort, is reverting that sandboxing change:

flatpak override --user org.gnome.Lollypop --filesystem=host

This gives Lollypop the original full host access, which will include all /mnt/ locations. By default, Lollypop now only has access to XDG/Music so you'll have to use the file portal. I do struggle to understand why it stopped working, because if you can go to the options menu and select the /mnt/ music folder, it should mount it properly within the flatpak container.

Can you let me know if --filesystem=host fixes the issue, because then we al least know what wasn't the problem.

JaneSmith commented 3 years ago

It does seem to be working okay after making the --filesystem=host change.