regolith-desktop icon indicating copy to clipboard operation
regolith-desktop copied to clipboard

Ubuntu App Centre cant install apps

Open KieranReck opened this issue 1 year ago • 14 comments

Describe the bug When trying to install apps using Ubuntu's App Centre you get a rather unhelpful error message stating "something went wrong..were sorry, but we're not sure what the error is." Screenshot from 2024-10-17 08-35-29

The has happened with every app I have tried to install unsing App Centre (eg Opera, freeCAD, etc), and has also happened when I try to use App Centre to install a .deb package.

This error doesn't occur if I log out and run a standard Ubuntu session on the same install.

The point at which Regolith seems to be falling down is when App Centre tries to pop up an authentication dialog asking for your password to confirm the install. Looking in the logs this is backed up by a polkit error from snapd access.go:66: polkit error: Authorization requires interaction Screenshot from 2024-10-17 08-36-23

To Reproduce Steps to reproduce the behavior:

  • Fresh Regolith3.2 install on an already existing Ubuntu 24.04.1 setup (which has already had i3 installed previously, not sure if that is relevant).
  • Open "App Centre" and try to install anything, you get the error message

Expected behavior A clear and concise description of what you expected to happen.

  • Open App Centre
  • Find an app
  • Click "Install"
  • Enter your password in the popup authentication dialog
  • install happens

Screenshots If applicable, add screenshots to help explain your problem.

Configuration file(s) Please attach or mention any customization you've done to configuration files which might have an impact on the bug you are describing. It'll help us determine the root cause of your issue.

  • It doesn't feel like any of my customization would be related to this issue, let me know if you need more info

Installation Details

  • Regolith Install Stage: (stable)
  • Regolith Version: [3.2]
  • Host OS: [Ubuntu 24.04.1]

Additional context Add any other context about the problem here.

I looked around for solutions and I saw mention of needing to change permissions on a polkit file, however I quickly felt out of my depth trying to judge if these solutions were even related to this issue, so I didn't try any of them. I did notice that /usr/libexec/polkit-agent-helper-1 seems to have a broken link of some kind? I have included a screenshot that i'm sure you guys will understand better than I do. Screenshot from 2024-10-17 08-31-43

Please feel free to ask me to try things!

KieranReck avatar Oct 17 '24 07:10 KieranReck

Can you check if mate-polkit is running? Make sure it is, and try running pkexec. LMK if you don't get the authentication dialog.

SoumyaRanjanPatnaik avatar Nov 01 '24 05:11 SoumyaRanjanPatnaik

running systemctl status mate-polkit resulted in:

"service could not be found"

running systemctl status polkit resulted in this set of messages:

Nov 02 06:56:46 kieran-XPS-ubuntu systemd[1]: Started polkit.service - Authorization Manager.
Nov 02 06:56:46 kieran-XPS-ubuntu polkitd[23283]: Acquired the name org.freedesktop.PolicyKit1 on the system bus
Nov 02 06:56:47 kieran-XPS-ubuntu polkitd[23283]: Registered Authentication Agent for unix-process:6694:11878 (system bus name :1.529 [pkexec], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
Nov 02 06:56:47 kieran-XPS-ubuntu polkitd[23283]: Identity unix-group:admin' is not valid, ignoring: No UNIX group with name admin: No such file or directory
Nov 02 06:56:49 kieran-XPS-ubuntu polkitd[23283]: Operator of unix-process:6694:11878 FAILED to authenticate to gain authorization for action org.freedesktop.policykit.exec for unix-process:6694:11878 [bash] (owned by unix-user:kieran)
Nov 02 06:56:49 kieran-XPS-ubuntu polkitd[23283]: Unregistered Authentication Agent for unix-process:6694:11878 (system bus name :1.529, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)

Running pkexec prompts me to enter my password, then throws this error:

polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ====
Error executing command as another user: Not authorized

I looked up these errors online, but I didn't want to jump into things like adding my user to the admin group if that isn't the correct process, so I haven't tried anything further yet to solve these errors. Do you have any suggestions?

Additionally, I looked into polkit, polkit-mate, and authentication agents. Am I right in thinking that Regolith should have come with one already installed and running? Possibly the built in Gnome flashback authentication agent?

Treat me as a noob here, I'm still trying to get my head around all of this stuff

KieranReck avatar Nov 02 '24 07:11 KieranReck

Having the same issue here. Running Regolith 3.2 on a fresh install of Ubuntu 24.04.1.

"Ubuntu user authentication popup" does not show up (or rather it is immediately closed in a blink of a second when it was supposed to wait for a user to type in the password)

As a workaround, I run the following command and then keep the process running to show that pop-up.

/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1

eldenpark avatar Dec 11 '24 02:12 eldenpark

@SoumyaRanjanPatnaik Any further guidance on how to resolve this issue?

lcswillems avatar Dec 21 '24 23:12 lcswillems

Try installing regolith-sway-polkit and restart the session.

SoumyaRanjanPatnaik avatar Dec 21 '24 23:12 SoumyaRanjanPatnaik

@SoumyaRanjanPatnaik I'm on Regolith i3. I guess this would not work?

lcswillems avatar Dec 21 '24 23:12 lcswillems

@SoumyaRanjanPatnaik I'm on Regolith i3. I guess this would not work?

i3 session uses gnome flashback which uses gnome polkit agent. You can still try mate polkit.

SoumyaRanjanPatnaik avatar Dec 23 '24 06:12 SoumyaRanjanPatnaik

@SoumyaRanjanPatnaik I'm on Regolith i3. I guess this would not work?

i3 session uses gnome flashback which uses gnome polkit agent.

I think you can try installing mate polkit and update your i3 config to exec it during startup. You might have to kill the gnome polkit agent and well

SoumyaRanjanPatnaik avatar Dec 23 '24 06:12 SoumyaRanjanPatnaik

And with the gnome polkit it doesn't work, right?

lcswillems avatar Dec 23 '24 16:12 lcswillems

It should. Would have to debug a bit more. Can you manually try starting gnome polkit?

SoumyaRanjanPatnaik avatar Dec 24 '24 16:12 SoumyaRanjanPatnaik

In my case, policykit-1-gnome was not installed, so I did sudo apt install policykit-1-gnome.

lcswillems avatar Dec 24 '24 19:12 lcswillems

It was not? @kgilmer should we add this as a dependency to the flashback session?

SoumyaRanjanPatnaik avatar Dec 25 '24 03:12 SoumyaRanjanPatnaik

No, it was not installed. I upgraded from Ubuntu 22.04 and Regolith 2 to Ubuntu 24.04 and Regolith 3, and maybe it got lost somewhere? I remember that when I was using Ubuntu 22.04, it was working somehow.

lcswillems avatar Dec 26 '24 10:12 lcswillems

I don't see any concerning dependencies to the package, and it does look like some other DEs express a dependency upon policykit-1-gnome:

~/dev/repos$ apt list --installed | grep policykit-1-gnome

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

policykit-1-gnome/noble,now 0.105-7ubuntu5 amd64 [installed,automatic]
~/dev/repos$ apt rdepends policykit-1-gnome
policykit-1-gnome
Reverse Depends:
  Depends: cinnamon (>= 0.105-6)
 |Depends: timekpr-next
 |Depends: riseup-vpn
 |Depends: update-manager
  Recommends: unity-control-center
  Depends: ubuntu-unity-desktop
  Recommends: ubuntu-budgie-desktop-minimal
  Recommends: ubuntu-budgie-desktop
 |Depends: timekpr-next
 |Recommends: thunar
 |Depends: riseup-vpn
  Recommends: pcmanfm
 |Recommends: lightdm
  Depends: libqapt3-runtime
 |Depends: gnome-system-tools
  Suggests: cpupower-gui
  Depends: cinnamon-control-center
 |Depends: network-manager-gnome
  Depends: apper
 |Depends: update-manager

kgilmer avatar Dec 30 '24 18:12 kgilmer

Installing policykit-1-gnome did not resolve this issue for me.

jayhendren avatar Mar 18 '25 16:03 jayhendren

@kgilmer Indeed, I installed sudo apt install policykit-1-gnome last time you mentioned it and I thought it fixed the issue but it seems I still have the issue even with policykit-1-gnome. I click on "Install", it loads for 1/2 seconds, and stops, but nothing is installed.

lcswillems avatar Mar 18 '25 18:03 lcswillems

@kgilmer Indeed, I installed sudo apt install policykit-1-gnome last time you mentioned it and I thought it fixed the issue but it seems I still have the issue even with policykit-1-gnome. I click on "Install", it loads for 1/2 seconds, and stops, but nothing is installed.

Are you on sway or i3?

SoumyaRanjanPatnaik avatar Apr 23 '25 05:04 SoumyaRanjanPatnaik

Are you on sway or i3?

I'm on i3!

lcswillems avatar Apr 23 '25 07:04 lcswillems

Can you try starting the polkit agent manually? Maybe it falls to startup for some reason.

SoumyaRanjanPatnaik avatar Apr 23 '25 07:04 SoumyaRanjanPatnaik

@SoumyaRanjanPatnaik When running systemctl status polkit:

Image

I don't know if it means it runs well or something is wrong?

lcswillems avatar Apr 23 '25 09:04 lcswillems