Bug 446314 - Discover throws errors when update list include flatpak apps, asks for password multiple times
Summary: Discover throws errors when update list include flatpak apps, asks for passwo...
Status: RESOLVED UPSTREAM
Alias: None
Product: Discover
Classification: Applications
Component: Flatpak Backend (other bugs)
Version First Reported In: 5.23.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL: https://bugzilla.opensuse.org/show_bu...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-01 09:06 UTC by MK
Modified: 2022-05-17 11:36 UTC (History)
5 users (show)

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


Attachments
An example of the described bug (380.87 KB, application/pdf)
2021-12-02 08:37 UTC, MK
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MK 2021-12-01 09:06:19 UTC
SUMMARY
When the update list includes flatpak apps an error along the lines of "this user doesn't have the privileges to update flatpak apps" is displayed BEFORE the password prompt even appears.


STEPS TO REPRODUCE
1. Be on openSUSE tumbleweed
2. Have flatpak apps in the updates list
3. Run updates

OBSERVED RESULT
An error is displayed before the password prompt, flatpak updates are ignored until the regular packages are installed, the flatpak apps are listed again and another password prompt is displayed.

EXPECTED RESULT
No errors displayed before the password promt, no double listing of apps, flawless installation of all updates regardless of source

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20211129
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2
Kernel Version: 5.15.3-1-default (64-bit)
Graphics Platform: X11
Processors: 4 × 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz
Memory: 7.7 GiB of RAM
Graphics Processor: SVGA3D; build: RELEASE; LLVM;
Comment 1 Nate Graham 2021-12-01 20:51:44 UTC
How did you install these flatpaks? Using Discover, or the command line? And were they installed systemwide or at the user level?
Comment 2 Aleix Pol 2021-12-02 02:41:18 UTC
Could you check if it's an opensuse thing? on my system flatpak update never asks for a password. Not system-wide (which is default), not user-scoped.
Comment 3 Nate Graham 2021-12-02 03:08:06 UTC
Same here.
Comment 4 Fabian Vogt 2021-12-02 07:57:18 UTC
Is polkit-default-privs installed? What's the value of POLKIT_DEFAULT_PRIVS and PERMISSION_SECURITY in /etc/sysconfig/security?
Comment 5 MK 2021-12-02 08:09:34 UTC
(In reply to Nate Graham from comment #1)
> How did you install these flatpaks? Using Discover, or the command line? And
> were they installed systemwide or at the user level?

I used Discover to install the flatpak apps, but I can't tell whether they were installed systemwide or not (I wasn't offered a choice at installation time)
Comment 6 MK 2021-12-02 08:26:28 UTC
(In reply to Fabian Vogt from comment #4)
> Is polkit-default-privs installed? What's the value of POLKIT_DEFAULT_PRIVS
> and PERMISSION_SECURITY in /etc/sysconfig/security?

I just checked, that polkit-default-privs is installed according to zypper. 

Here's the two values you asked for:
POLKIT_DEFAULT_PRIVS=""
PERMISSION_SECURITY="easy local"
Comment 7 MK 2021-12-02 08:37:16 UTC
Created attachment 144138 [details]
An example of the described bug

Attached is a series of three screenshots I captured while updating the system. 
Note the error message and the change in the update counter in the bottom left corner.
Comment 8 Fabian Vogt 2021-12-02 08:54:04 UTC
Probably https://bugzilla.opensuse.org/show_bug.cgi?id=1123722 then.

You should be able to avoid that by installing flatpaks into user storage instead of system-wide. No idea how that's handled by discover.
Comment 9 Nate Graham 2021-12-02 16:02:26 UTC
Looks like it, yeah.

Discover doesn't yet have the ability to let you install flatpaks for just the active user rather than systemwide.
Comment 10 Aleix Pol 2021-12-03 23:47:59 UTC
> Discover doesn't yet have the ability to let you install flatpaks for just the active user rather than systemwide.

@MK: Yes, in practice.

@Nate: That is not entirely true. If flatpak doesn't offer a writable system installation (e.g. fedora kinoite) it does use the user installation.
Comment 11 Nate Graham 2021-12-04 03:35:45 UTC
Oh that's cool, I didn't know that.

It's not exposed as a user-facing thing though, right?
Comment 12 Aleix Pol 2021-12-15 01:53:57 UTC
> It's not exposed as a user-facing thing though, right?

I'm pretty sure we install wherever the remote is installed (yes, remotes too can be added in the different installations).

We do not have UI for moving flathub into a user though.
Comment 13 Bug Janitor Service 2022-05-17 11:36:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/281