Bug 473181 - The flatpak indexes no files at all.
Summary: The flatpak indexes no files at all.
Status: RESOLVED DOWNSTREAM
Alias: None
Product: Elisa
Classification: Applications
Component: baloo (show other bugs)
Version: 23.04.3
Platform: Flatpak Linux
: NOR grave
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-08 22:45 UTC by Henning
Modified: 2023-08-29 16:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henning 2023-08-08 22:45:08 UTC
The folder view works, but there are no artists or songs shown in the other tabs. I reloaded the sources multiple times, and I can open music through the folder mode, but nothing shows up in the artist, album and other tabs.

Specified App:
org.kde.elisa	23.04.3	stable	flathub

--- Software ---
OS: Fedora Linux 38.20230808.0 (Kinoite)
KDE Plasma: 5.27.6
KDE Frameworks: 5.108.0
Qt: 5.15.10
Kernel: 6.4.7-200.fc38.x86_64
Compositor: wayland

--- Hardware ---
CPU: AMD Ryzen 5 PRO 3500U w/ Radeon Vega Mobile Gfx
RAM: 13.5 GB
GPU: AMD Radeon Vega 8 Graphics
Video memory: 2048MB
Comment 1 Nate Graham 2023-08-09 19:16:16 UTC
In the settings window, what indexing mode is chosen? Does it work if you switch to the other one and restart the app?
Comment 2 Bug Janitor Service 2023-08-24 03:45:35 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Henning 2023-08-25 23:05:46 UTC
as far as I recall I tried both ways and none worked
Comment 4 Henning 2023-08-25 23:55:46 UTC
Edit: for hardening I only allowed permission on the folders actually containing music. When allowing to READ all folders in home, suddenly it found music!

Why is that like this? It cant write a log file or anything, it can only read. This makes little sense for me?
Comment 5 Henning 2023-08-25 23:56:40 UTC
and with all home allowed it seems it doesnt matter what indexing type I use, both work
Comment 6 Nate Graham 2023-08-26 00:20:04 UTC
Elisa's manifest has read-only access to the host:

https://github.com/flathub/org.kde.elisa/blob/master/org.kde.elisa.json#L13

Maybe that's not good enough and we need to add home access in addition to host access?
Comment 7 Henning 2023-08-26 00:38:07 UTC
isn't host including home? My proposal would be to remove host, as home is enough. host is /, home is /home/USERNAME right?
Comment 8 Nate Graham 2023-08-26 13:13:46 UTC
Right. But it also needs host access to see the location that disks are mounted to, so people can browse that location using the Files view.
Comment 9 Henning 2023-08-27 12:56:24 UTC
Right but I dont need it in that case as maaany laptops dont have a CD drive anymore. Anyways, specifying clear directories seems better in my opinion, I would do

flatpak override --user org.kde.elisa --reset=host --filesystem=$home:rw  --filesystem=$media:rw --filesystem=/mnt:rw --filesystem=/var/mnt:rw --filesystem=mtp:/

I think this should be enough for every music placer or not? Are there other directories?

And why should it cause the app to not find anything if I dont even have a CD drive and everything is in home? Does it use a standard KDE ~/.config/ path or something?
Comment 10 Nate Graham 2023-08-28 19:20:27 UTC
It's quite possible that we could give it RO access to home and the common places where disks show up. However that's a separate matter, not related to this bug here. If you'd like to discuss this topic, please submit a new bug report for it.

On that subject I asked some Flatpak experts and they pointed me to documentation showing that "host" permission includes "home". It sounds like you've manually changed the permissions and caused this issue in the process, so there isn't a bug in Elisa or its Flatpak packaging here. Closing the bug report.
Comment 11 Henning 2023-08-28 22:50:55 UTC
hmm, weird no this cant be. I gave Elisa permission to access my music files, thats it. No home access as I know where my music is and all apps simply only get the directories they actually need.

So there has to be some error why this does not work. It works with home access, but this has to have a different reason as its not needed to find the music files.
Comment 12 Henning 2023-08-28 22:51:37 UTC
and yes, integrating portals or just having no app with host permission anymore is a biiig flatpak goal, especially on the old apps like Libreoffice, GIMP etc
Comment 13 Nate Graham 2023-08-29 15:44:17 UTC
Now I'm confused because you said:

> Edit: for hardening I only allowed permission on the folders actually containing music.
> When allowing to READ all folders in home, suddenly it found music!

Which means that with the default permissions specified by the Flatpak manifest, it works, and it only stops working when you apply some manual hardening. I don't know exactly what you're doing, but it seems like the actions you've taken are what broke it. Which means it's not a bug in Elisa's code or Flatpak packaging, which means it's user error or a distro config issue, which means this bug is RESOLVED DOWNSTREAM. :) 

If you still need help, I'd recommend asking in https://discuss.kde.org/c/help/6.
Comment 14 Henning 2023-08-29 16:06:37 UTC
But why should it require whole home access to work? This question I want to solve. It had rw permissions to the directories that are necessary, this is all it should need, but it doesnt work.

Of course by default it would work, but having access to all your user files is not really the best option.

xdg-music for example would be a better default setting
Comment 15 Nate Graham 2023-08-29 16:11:20 UTC
If we made xdg-music the default permission in the manifest, then if the user added another location in Elisa's config window, it wouldn't work because that location would be outside of xdg-music. They would have to know that they need to manually enter another path in the Flatpak Permissions KCM and restart Elisa, and that's a pretty bad UX.
Comment 16 Henning 2023-08-29 16:36:08 UTC
of course. Thats why portals are way better but a way more complex task.

But the issue was that even though UX may be horrible, there should be no reason for it to not work.