Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polkit setup failing (AUR install) #180

Open
kre9 opened this issue Apr 29, 2024 · 11 comments
Open

Polkit setup failing (AUR install) #180

kre9 opened this issue Apr 29, 2024 · 11 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@kre9
Copy link

kre9 commented Apr 29, 2024

Hello,
my Goldwarden instance crashes on polkit setup. I installed with AUR the newest version 0.2.15-1. Terminal output attached below.

==== AUTHENTICATING FOR org.freedesktop.policykit.exec ====
Authentication is needed to run `/usr/bin/chown root:root /usr/share/po ... actions/com.quexten.goldwarden.policy' as the super user
Authenticating as: kre
Password:
==== AUTHENTICATION FAILED ====
panic: exit status 127

goroutine 1 [running]:
github.com/quexten/goldwarden/cmd.setupPolkit()
	github.com/quexten/goldwarden/cmd/setup_linux.go:55 +0x466
github.com/quexten/goldwarden/cmd.init.func24(0xc0000ed200?, {0x56c4f3b0747a?, 0x4?, 0x56c4f3b07352?})
	github.com/quexten/goldwarden/cmd/setup_linux.go:81 +0xf
github.com/spf13/cobra.(*Command).execute(0x56c4f3f8dd60, {0x56c4f402a420, 0x0, 0x0})
	github.com/spf13/[email protected]/command.go:987 +0xab1
github.com/spf13/cobra.(*Command).ExecuteC(0x56c4f3f8c940)
	github.com/spf13/[email protected]/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:1039
github.com/quexten/goldwarden/cmd.Execute({{0x0, 0x0}, 0x0, {0xc00002ebd0, 0x2c}, 0x0, 0x0, {0x0, 0x0}, {0x0, ...}, ...})
	github.com/quexten/goldwarden/cmd/root.go:29 +0xe6
main.main()
	github.com/quexten/goldwarden/main.go:54 +0x618
@quexten
Copy link
Owner

quexten commented Apr 29, 2024

Thanks, seems like the same issue as #156, and also seems that 0.2.15 did not fix it. What does pkexec whoami output for you?

@quexten quexten added bug Something isn't working duplicate This issue or pull request already exists labels Apr 29, 2024
@kre9
Copy link
Author

kre9 commented Apr 29, 2024

it returns root

@quexten
Copy link
Owner

quexten commented Apr 29, 2024

Just to make sure, if you re-run it does it still occur? (The ==== AUTHENTICATION FAILED ==== suggests that it could just be bad password)

@kre9
Copy link
Author

kre9 commented Apr 29, 2024

Yes I ran it multiple times and tried a reinstall and it still occurs. Will ask a friend of mine to try it out tomorrow, maybe my install is just borked.

@bjhuot
Copy link

bjhuot commented Apr 30, 2024

I'd been experiencing this continuously under 0.2.13, and again after upgrading to 0.2.16 from AUR. pkexec was also failing for me , returning 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

This incident has been reported. 

Solution for me was needing to install a graphical authentication agent. I'm running on Sway currently and was able to find this mention of my issue in the NixOS project. Installing and adding mate-polkit to my config has allowed me to get through the polkit setup.

@quexten
Copy link
Owner

quexten commented Apr 30, 2024

I feel like we should catch this error and give a better error message, even though a polkit agent is described in the wiki as required.

@bjhuot
Copy link

bjhuot commented Apr 30, 2024

If I'm understanding it correctly, the bug is related to polkit & pkttyagent itself. https://gitlab.freedesktop.org/polkit/polkit/-/issues/17

@blackthorne7
Copy link

blackthorne7 commented Apr 30, 2024

Solution for me was needing to install a graphical authentication agent. I'm running on Sway currently and was able to find this mention of my issue in the NixOS project. Installing and adding mate-polkit to my config has allowed me to get through the polkit setup.

seconded. for some reason, I was having an issue running the KDE polkit agent (which is graphical). I switched to the MATE polkit agent and everything is working fine now.

@zany130
Copy link

zany130 commented May 4, 2024

same here

goldwarden setup polkit
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ====
Authentication is needed to run `/usr/bin/chown root:root /usr/share/po ... actions/com.quexten.goldwarden.policy' as the super user
Authenticating as: Andres David Ortiz (zany130)
Password:
==== AUTHENTICATION FAILED ====
panic: exit status 127

goroutine 1 [running]:
github.com/quexten/goldwarden/cmd.setupPolkit()
	github.com/quexten/goldwarden/cmd/setup_linux.go:55 +0x466
github.com/quexten/goldwarden/cmd.init.func24(0xc000139200?, {0x581e3ed8147a?, 0x4?, 0x581e3ed81352?})
	github.com/quexten/goldwarden/cmd/setup_linux.go:81 +0xf
github.com/spf13/cobra.(*Command).execute(0x581e3f207d60, {0x581e3f2a4480, 0x0, 0x0})
	github.com/spf13/[email protected]/command.go:987 +0xab1
github.com/spf13/cobra.(*Command).ExecuteC(0x581e3f206940)
	github.com/spf13/[email protected]/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:1039
github.com/quexten/goldwarden/cmd.Execute({{0x0, 0x0}, 0x0, {0xc00002ec00, 0x30}, 0x0, 0x0, {0x0, 0x0}, {0x0, ...}, ...})
	github.com/quexten/goldwarden/cmd/root.go:29 +0xe6
main.main()
	github.com/quexten/goldwarden/main.go:54 +0x618
	

but polkit setup seems to be working as it does correctly bring up a polkit prompt whenever goldwarden needs my password.

this seems to be an issue with kde's polkit agent? FWIW:

pacman -Qi polkit-kde-agent
Name            : polkit-kde-agent
Version         : 6.0.4-1

it should be noted that even though it "fails" to setup polkit goldwarden still successfully gives a polkit prompt whenever it needs my users password and it seems to work fine.

no idea how to switch polkit agents so don't know if that eliminates the "issue"

pkexec whoami also returns
root
for me

@blackthorne7
Copy link

same here

goldwarden setup polkit
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ====
Authentication is needed to run `/usr/bin/chown root:root /usr/share/po ... actions/com.quexten.goldwarden.policy' as the super user
Authenticating as: Andres David Ortiz (zany130)
Password:
==== AUTHENTICATION FAILED ====
panic: exit status 127

goroutine 1 [running]:
github.com/quexten/goldwarden/cmd.setupPolkit()
	github.com/quexten/goldwarden/cmd/setup_linux.go:55 +0x466
github.com/quexten/goldwarden/cmd.init.func24(0xc000139200?, {0x581e3ed8147a?, 0x4?, 0x581e3ed81352?})
	github.com/quexten/goldwarden/cmd/setup_linux.go:81 +0xf
github.com/spf13/cobra.(*Command).execute(0x581e3f207d60, {0x581e3f2a4480, 0x0, 0x0})
	github.com/spf13/[email protected]/command.go:987 +0xab1
github.com/spf13/cobra.(*Command).ExecuteC(0x581e3f206940)
	github.com/spf13/[email protected]/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:1039
github.com/quexten/goldwarden/cmd.Execute({{0x0, 0x0}, 0x0, {0xc00002ec00, 0x30}, 0x0, 0x0, {0x0, 0x0}, {0x0, ...}, ...})
	github.com/quexten/goldwarden/cmd/root.go:29 +0xe6
main.main()
	github.com/quexten/goldwarden/main.go:54 +0x618
	

but polkit setup seems to be working as it does correctly bring up a polkit prompt whenever goldwarden needs my password.

this seems to be an issue with kde's polkit agent? FWIW:

pacman -Qi polkit-kde-agent
Name            : polkit-kde-agent
Version         : 6.0.4-1

it should be noted that even though it "fails" to setup polkit goldwarden still successfully gives a polkit prompt whenever it needs my users password and it seems to work fine.

no idea how to switch polkit agents so don't know if that eliminates the "issue"

pkexec whoami also returns root for me

Are you using Plasma? I'm sure there's a way to change the polkit agent there, but it's possible that it would break something else in your DE.

it might be worth opening a bug report on the plasma desktop gitlab.

@KweezyCode
Copy link

same here, Manjaro Unstable branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

6 participants