balena-io / etcher

Flash OS images to SD cards & USB drives, safely and easily.
https://etcher.io/
Apache License 2.0
29.75k stars 2.11k forks source link

Etcher can't detect by polkit daemon #2567

Open ask6155 opened 5 years ago

ask6155 commented 5 years ago

I tried to flash an iso and it couldn't detect my Polkit daemon. I use i3wm so I still don't quite understand about Polkit. I have the Polkit base package installed and the qt5 and gnome frontends installed but it still doesn't detect any authentication agents

here is some info from Log:

{"stack":"Error: No polkit authentication agent found\n    at Object.exports.createError 
(/usr/lib/etcher/lib/shared/errors.js:253:17)\n    at Object.exports.createUserError 
(/usr/lib/etcher/lib/shared/errors.js:292:18)\n    at sudoPrompt.execAsync.then.catch.catch.catch.catch  
(/usr/lib/etcher/lib/shared/permissions.js:244:18)\n    at tryCatcher 
(/usr/lib/etcher/node_modules/bluebird/js/release/util.js:16:23)\n    
at /usr/lib/etcher/node_modules/bluebird/js/release/catch_filter.js:34:37\n    
at tryCatcher (/usr/lib/etcher/node_modules/bluebird/js/release/util.js:16:23)\n    
at Promise._settlePromiseFromHandler (/usr/lib/etcher/node_modules/bluebird/js/release/promise.js:504:31)\n
at Promise._settlePromise (/usr/lib/etcher/node_modules/bluebird/js/release/promise.js:561:18)\n
at Promise._settlePromise0 (/usr/lib/etcher/node_modules/bluebird/js/release/promise.js:606:10)\n    
at Promise._settlePromises (/usr/lib/etcher/node_modules/bluebird/js/release/promise.js:681:18)\n    
at Async._drainQueue (/usr/lib/etcher/node_modules/bluebird/js/release/async.js:138:16)\n    
at Async._drainQueues (/usr/lib/etcher/node_modules/bluebird/js/release/async.js:148:10)\n    
at Async.drainQueues (/usr/lib/etcher/node_modules/bluebird/js/release/async.js:17:14)\n    a
t <anonymous>\n    at process._tickCallback 
(internal/process/next_tick.js:188:7)","message":"No polkit authentication agent found","description":
"Please install a polkit authentication agent for your desktop environment of choice to continue","report":false}
thundron commented 5 years ago

While we look into it, you could maybe have a look here

brownjohnf commented 5 years ago

Could you also post the output of ps -efwww | grep polkit and sudo systemctl status polkit?

ask6155 commented 5 years ago

Here,

polkitd    367     1  0 16:28 ?        00:00:00 /usr/lib/polkit-1/polkitd --no-debug
me        2405  2149  0 16:46 pts/0    00:00:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn polkit

and the status report

● polkit.service - Authorization Manager
   Loaded: loaded (/usr/lib/systemd/system/polkit.service; static; vendor preset: disabled)
   Active: active (running) since Fri 2018-11-30 16:28:54 ???; 22min ago
     Docs: man:polkit(8)
 Main PID: 367 (polkitd)
    Tasks: 10 (limit: 4728)
   Memory: 20.9M
   CGroup: /system.slice/polkit.service
           └─367 /usr/lib/polkit-1/polkitd --no-debug

Nov 30 16:29:07 ME polkitd[367]: /usr/share/polkit-1/rules.d/lightdm.rules:4: subject=[Subject pid=411 user='lightdm' groups=lightdm seat='seat0' session='c1' local=true active=true]
Nov 30 16:29:07 ME polkitd[367]: /usr/share/polkit-1/rules.d/lightdm.rules:3: action=[Action id='org.freedesktop.DisplayManager.AccountsService.ReadAny']
Nov 30 16:29:07 ME polkitd[367]: /usr/share/polkit-1/rules.d/lightdm.rules:4: subject=[Subject pid=411 user='lightdm' groups=lightdm seat='seat0' session='c1' local=true active=true]
Nov 30 16:29:07 ME polkitd[367]: /usr/share/polkit-1/rules.d/lightdm.rules:3: action=[Action id='org.freedesktop.DisplayManager.AccountsService.ReadAny']
Nov 30 16:29:07 ME polkitd[367]: /usr/share/polkit-1/rules.d/lightdm.rules:4: subject=[Subject pid=411 user='lightdm' groups=lightdm seat='seat0' session='c1' local=true active=true]
Nov 30 16:29:07 ME polkitd[367]: /usr/share/polkit-1/rules.d/lightdm.rules:3: action=[Action id='org.freedesktop.DisplayManager.AccountsService.ReadAny']
Nov 30 16:29:07 ME polkitd[367]: /usr/share/polkit-1/rules.d/lightdm.rules:4: subject=[Subject pid=411 user='lightdm' groups=lightdm seat='seat0' session='c1' local=true active=true]
Nov 30 16:46:03 ME polkitd[367]: Registered Authentication Agent for unix-process:2369:105942 (system bus name :1.156 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_??.UTF-8)
Nov 30 16:46:08 ME polkitd[367]: Operator of unix-process:2369:105942 successfully authenticated as unix-user:root to gain TEMPORARY authorization for action org.freedesktop.systemd1.manage-units for system-bus-name::1.157 [systemctl start polkit-gnome] (owned by unix-user:me)
Nov 30 16:46:08 ME polkitd[367]: Unregistered Authentication Agent for unix-process:2369:105942 (system bus name :1.156, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_??.UTF-8) (disconnected from bus)
knuff0r commented 5 years ago

i am using the appimage on arch linux and get the same error. running it as root works for me.

drewbitt commented 5 years ago

Running as root with xfce-polkit works for me, building from git. Running as regular user it can't see the running polkit daemon.

jolupa commented 5 years ago

Still no solution for this problem. I'm in the last version running the deb package converted to CRUX package, with xfce-polkit and the problem still remains. I also run the appimage and the problem persist. All the other programs that requires polkit are working as espected. Thanks.

bacongobbler commented 3 years ago

Also hitting this issue. etcher must run as root before it can see the running polkit daemon.

arilebedey commented 8 months ago

Try the following command from comment #6 in this arch forum thread /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &