Closed soulshake closed 7 years ago
Hi @soulshake,
Etcher requires a Polkit authentication agent to be present on the OS (which comes by default in virtually all major distributions).
The debian package requires a polkit authentication agent in order to be installed (https://github.com/resin-io/etcher/blob/master/scripts/build/debian/config.json#L43). Could it be that you installed the Etcher deb, but then removed all available polkit agents?
You should be fine after installing polkit-1-auth-agent
, policykit-1-gnome
, or polkit-kde-1
. You can probably google other authentication agents for less known desktop environments.
Etcher worked fine with sudo
given that if you have enough permissions already, then the elevation system is not ran.
Actually, let's keep this open and send a PR that improves such unfriendly error message.
Maybe @lurch or @Shou can send a quick PR for this?
@jviotti Thanks for the explanation, makes sense now. I'm using i3.
FYI, I already had policykit-1-gnome
installed (not the two others though).
I installed mate-polkit-bin
and it works perfectly now after a reboot.
I'm running Debian sid/stretch in a chroot. I have lxsession/lxpolkit installed, running and working. I installed lxqt-policykit manually and launched it to try to work around the message described herein. No dice.
My workaround was the same as @soulshake, sudo ls
to temporarily allow operations with elevated privileges. I was then able to flash an image then using the Etcher GUI.
Hello @RogueM , who let you in here?? ;-) Maybe there's a problem that https://github.com/jorangreef/sudo-prompt (or perhaps some other part of the stack) isn't aware of all the polkit agents that it should be?
no, I think I have narrowed down the issue to the chroot, at least in my case... some agents are more explicit about the issue and I don't think I can make any active.
In fact, now that I know about the issue I have tried to run synaptic
and it forever leaps into an oblivion. running synaptic-pkexec
from cli all works fine, after password prompt.
so conclusion: I don't think it's a problem either projects can/should address.
@Shou I remember you were working on this at some point. Any updates? Did you get stuck somewhere?
I did get somewhere but I didn't quite finish it, I got preoccupied with other things. I'll probably return to it after the weekend—the information you gave me in the chat was very adequate so I can't remember having any questions, but I'll get back to you if I do.
@Shou Is there a branch somewhere with the work in progress? I rather have you focusing on v2, so I can quickly finish it if you like.
Looking at it there wasn't a significant amount of work done here because I was trying to figure out how to use robot, so you can go ahead, I don't think you'll miss the work I did.
Awesome, I just sent a PR for it!
I'd like to reopen this bug for Ubuntu 18.04.1, with KDE Neon.
I get the err message (nicer format), even though polkit is installed:
polkit-kde-agent-1 is already the newest version (4:5.13.4-0xneon+18.04+bionic+build11)
Running etcher from your official repo, stable channel
@breznak thanks, we'll check it out, and reopen & fix if we find something! Meanwhile, can you post the full error message you're getting?
I'm getting the same error when trying to write Debian AMD-64 to a standard 64 gig flash drive.
The only work around is to elevate to sudo user, and then run Etcher.
I'm getting the same issue on Ubuntu 18.04. Polkit is installed:
ii libpolkit-agent-1-0:amd64 0.105-20ubuntu0.18.04.5 amd64 PolicyKit Authentication Agent API
ii libpolkit-backend-1-0:amd64 0.105-20ubuntu0.18.04.5 amd64 PolicyKit backend API
ii libpolkit-gobject-1-0:amd64 0.105-20ubuntu0.18.04.5 amd64 PolicyKit Authorization API
ii libpolkit-qt-1-1:amd64 0.112.0-5 amd64 PolicyKit-qt-1 library
ii libpolkit-qt5-1-1:amd64 0.112.0-5 amd64 PolicyKit-qt5-1 library
ii polkit-kde-agent-1 4:5.12.7-0ubuntu0.1build1~ubuntu18.04~ppa1 amd64 KDE dialogs for PolicyKit
I'd guess that because this program runs from an AppImage it's somehow not able to find or use the 'system' polkit? Anyway, it's definitely still a bug
Running with sudo works around it, e.g: sudo ./balenaEtcher-1.5.109-x64.AppImage
chrome remote desktop caused this for me :<
I got this error on i3. Running AppImage using sudo
seems to work.
I just got this on Arch/i3. As @sidml mentioned, elevating privileges worked.
This is a very old issue, but see https://github.com/balena-io/etcher/blob/master/docs/USER-DOCUMENTATION.md#no-polkit-authentication-agent-found-error-in-gnulinux for more info.
Wish the error message was a bit more clear, sudo
worked for me after finding this thread
Just check what kind of agent is on your system and actually run it. For example I'm using i3
, but I still have a polkit agent on my system. It just hasn't started.
Run it in a different shell:
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
Place it in ~/.xinitrc
if you like to have it always run, otherwise just remember to actually run the agent. :-)
No need to use sudo
.
This is a reminder to my future self and others that if you do need to run Etcher using sudo, you may need to provide an absolute path to the executable.
# does not work
$ sudo balenaEtcher-1.7.1-x64.AppImage
sudo: balenaEtcher-1.7.1-x64.AppImage: command not found
# works
$ cd ~/bin
sudo ./balenaEtcher-1.7.1-x64.AppImage
I want to also leave a note for myself that Balena Etcher is on the list of not recommended programs in the Arch Wiki and to instead use other options.
for anyone finding this... this happened to me after installing google remote desktop, and the fix was just permissions so this was the fix for me:
sudo chmod 5755 /usr/lib/policykit-1/polkit-agent-helper-1
Ubuntu 22, tried mate-polkit-bin
, polkit-1-auth-agent
, policykit-1-gnome
... none of them fixed the issue
I've found myself back at this thread after running into this issue again (Debian 12 and i3) and I can confirm that @mrquincle's suggestion to manually start polkit results in my being able to run the AppImage without requiring sudo.
I use Arch/Hyprland as my window manager (requires polkit-kde) and you have to start polkit automatically with this config command:
exec-once = /usr/lib/polkit-kde-authentication-agent-1
or you can simply run it for once from commandline like so
exec /usr/lib/polkit-kde-authentication-agent-1
Just check what kind of agent is on your system and actually run it. For example I'm using
i3
, but I still have a polkit agent on my system. It just hasn't started.Run it in a different shell:
/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
Place it in
~/.xinitrc
if you like to have it always run, otherwise just remember to actually run the agent. :-)No need to use
sudo
.
This finally worked for me on ub-22.04/i3. Thanks!
Listener adapter polkit_qt_listener_initiate_authentication
GSimpleAsyncResult: 0x55d09364b450
polkit_qt_listener_initiate_authentication callback for 0x55d093635f10
Initiating authentication
Cannot mix incompatible Qt library (5.15.11) with this library (5.15.10)
KCrash: Attempting to start /usr/lib/polkit-kde-authentication-agent-1
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = polkit-kde-authentication-agent-1 path = /usr/lib pid = 97058
KCrash: Arguments: /usr/lib/polkit-kde-authentication-agent-1
fish: Job 1, '/usr/lib/polkit-kde-authenticat…' terminated by signal SIGABRT (Abort)
I get a segfault ?
$ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 9.0 (stretch) Release: 9.0 Codename: stretch
{ Error: No polkit authentication agent found. at /usr/share/etcher-electron/resources/app.asar/node_modules/sudo-prompt/index.js:132:23 at ChildProcess.exithandler (child_process.js:225:5) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at maybeClose (internal/child_process.js:877:16) at Socket. (internal/child_process.js:334:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:493:12)
cause:
Error: No polkit authentication agent found.
at /usr/share/etcher-electron/resources/app.asar/node_modules/sudo-prompt/index.js:132:23
at ChildProcess.exithandler (child_process.js:225:5)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Socket. (internal/child_process.js:334:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:493:12),
isOperational: true }
Attention Oops, seems something went wrong. [Retry]
Mar 11 10:42:30 patamushka dunst[7910]: g_variant_unref: assertion 'value->ref_count > 0' failed Mar 11 10:42:30 patamushka dunst[7910]: g_variant_unref: assertion 'value->ref_count > 0' failed Mar 11 10:42:30 patamushka dunst[7910]: g_variant_unref: assertion 'value->ref_count > 0' failed
Mar 11 10:42:24 patamushka sudo: aj : a password is required ; TTY=pts/1 ; PWD=/home/aj ; USER=root ; COMMAND=/usr/bin/env ELECTRON_RUN_AS_NODE=1 IPC_SERVER_ID=etcher-server-9763 IPC_CLIENT_ID=etcher-client-9763 SKIP=1 /usr/share/etcher-electron/etcher /usr/share/etcher-electron/resources/app.asar/lib/child-writer/writer-proxy.js /usr/share/etcher-electron/resources/app.asar /home/aj/Downloads/resin-blinky-1.24.1-2.8.3-eef8cf4afe02.img --drive /dev/mmcblk0 --unmount --check