Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Polkit service not working after one successful authentication (Read 739 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] Polkit service not working after one successful authentication

Hello all I'm new here, since yesterday I've had this problem where when I was trying to save a file in featherpad, the authentication message would come along and then I input the password and the file gets saved. However on second edit and save, the editor would pop up a message below saying that no authentication agent was found. Another time was I was trying mount a partiton in dolphin that had to ask for a password, but showed up a message at the top saying that the polkit service was not available.  A similar kind of problem happened with gparted and it didn't show up. After a reboot I first opened gparted and input the password correctly and it worked. But the next time I opened it, didn't work.  I use KDE and all the packages are upgraded to their current versions as of typing this report.

I don't know how to provide the proper debug messages, I apologize and I'm not really linux savvy but I'm open to all kinds of advice and am prepared to give necessary error info, thank you so much for whatever help you will give.


 

Re: Polkit service not working after one successful authentication

Reply #2
Thanks @gripped. Feels like it happened after an upgrade that day too... Maybe qt6-base got a faulty upgrade(not sure), if that's the case then I guess I'll wait for the next upgrade to fix it. I checked this on my Arch installation and it doesn't have this issue so I'm hoping this will get fixed soon next update. In any case, do you or anyone else know a way to trace this error? Also apologies for not relying soon.

Re: Polkit service not working after one successful authentication

Reply #3
I checked this on my Arch installation and it doesn't have this issue
I suspect it is happening on Arch but as the agent on Arch is started as a service with the restart option set it goes unnoticed ?
Every time it's used it crashes then is started again.
Which makes me less confident this will get a timely fix but fingers crossed.

You can view the error just by starting the agent on the command line and using it.
/usr/lib/polkit-kde-authentication-agent-1
If by tracing you mean actually debugging it then debug packages and gdb and probably a lot of patience.

Re: Polkit service not working after one successful authentication

Reply #4
I see. That makes sense actually. I've also got the error of panels not remembering settings that a few others have posted here. I know that's beyond this topic but hope all of this gets worked out in the next release.  I'll look into this error provided I have time. Thank you so much for replying!

Re: Polkit service not working after one successful authentication

Reply #5
Now  this is interesting... @gripped

Code: [Select]

admin2@Kelly-PC:~/Desktop$ /usr/lib/polkit-kde-authentication-agent-1
kf.dbusaddons: DBus session bus not found. To circumvent this problem try the following command (with bash):
    export $(dbus-launch)
admin2@Kelly-PC:~/Desktop$ export $(dbus-launch)
admin2@Kelly-PC:~/Desktop$ /usr/lib/polkit-kde-authentication-agent-1
New PolkitAgentListener  0x60cdf1762870
Adding new listener  PolkitQt1::Agent::Listener(0x60cdf174fcb0) for  0x60cdf1762870
Listener online
"Cannot register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject"
Authentication agent result: false
Couldn't register listener!


After first unlock:

Code: [Select]

$ /usr/lib/polkit-kde-authentication-agent-1
New PolkitAgentListener  0x565428042a70
Adding new listener  PolkitQt1::Agent::Listener(0x565428031450) for  0x565428042a70
Listener online
Authentication agent result: true
Listener adapter polkit_qt_listener_initiate_authentication
GSimpleAsyncResult: 0x56542802dcd0
polkit_qt_listener_initiate_authentication callback for  0x565428042a70
Initiating authentication
Action description has been found
User:  "unix-user:admin2"
Trying again
REQUEST
Request:  "Password: "
qrc:/qt/qml/org/kde/desktop/private/TextFieldContextMenu.qml:235:5: QML MenuItem: Binding loop detected for property "implicitWidth"
Dialog accepted
COMPLETED
Completed:  true
Finishing obtaining privileges
Listener adapter polkit_qt_listener_initiate_authentication_finish
polkit_qt_listener_initiate_authentication_finish callback for  0x565428042a70
Finish obtain authorization: true
Dialog cancelled
Finishing obtaining privileges
KCrash: appFilePath points to nullptr!
KCrash: Application '<unknown>' crashing... crashRecursionCounter = 2
Segmentation fault

Re: Polkit service not working after one successful authentication

Reply #6
Problem has been solved with Plasma 6.0.5 update.