[master] install/remove buttons don't react when policykit is not running

Bug #499937 reported by daves111
184
This bug affects 36 people
Affects Status Importance Assigned to Milestone
PolicyKit GNOME
Won't Fix
Wishlist
aptdaemon (Ubuntu)
Invalid
Undecided
Unassigned
software-center (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Transactions initiated by the install/remove buttons in software-center fail silently when the policykit authentication agent is not running.

Revision history for this message
daves111 (daves111) wrote :
Revision history for this message
marlow79 (moreno-omar89) wrote :

Architecture: intel atom
Date: 12/23/09 10:20 pm
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala"

Went to ubuntu software-center, clicked on accessories->7-zip->install.
After that, it displayed a downloading bar and then installed.

Can you post with what specific software is the bug manifest from?

Revision history for this message
daves111 (daves111) wrote :

software is ubuntu software-center - won't do anything when I click on install. I'm running in failsafe gnome because when I upgraded to 9.10 my computer freezes after loading the desktop screen and is waiting ... as soon as I move the mouse or something it freezes and requires a reboot in regular gnome.

Revision history for this message
Phill (phill.l) wrote :

Can confirm - install and remove buttons do nothing. Clean install of Ubuntu 9.10 AMD64 with latest patches to date. Running with the one and only user account created on installation with admin rights. When run from the command line the following message is displayed in the terminal:

WARNING:root:_on_trans_error: org.freedesktop.PolicyKit.Error.NotAuthorized: ('system-bus-name', {'name': ':1.75'}) is not authorized: org.debian.apt.install-packages

Running from terminal with 'sudo' solves the problem, but it's a bug that it doesn't work from the menu.

NOTE: I don't think it's the only application to suffer from this, a few things in the adminstrator menu seem to have lost their 'dksu' command (e.g. Hardware Drivers) , although a few have gained in-built unlock functions but not all have this and they don't work from the menus. I'm fairly sure these things work immediately after install before the first update.

Revision history for this message
Phill (phill.l) wrote :

This appears to be caused by disabling PolicyKit, guess I should be more careful with my clicking when disabling startup applications.

Revision history for this message
Michael Vogt (mvo) wrote : Re: click install, nothing happens, in software center if policykit auth agent not running

I can reproduce this problem if I run a session with no policykit authentication agent running.

summary: - click install, nothing happens, in software center
+ click install, nothing happens, in software center if policykit auth
+ agent not running
Changed in software-center (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Michael Vogt (mvo) wrote :

The problem is that if no agent is running we get a:

error._dbus_error_name == "org.freedesktop.PolicyKit.Error.NotAuthorized"

error - this error also returned if the user clicked cancel.

Revision history for this message
Michael Vogt (mvo) wrote :

So we need to get support from policykit to figure out if there is a agent availalbe or a different error if the user clicked cancel.

Revision history for this message
Matthew Paul Thomas (mpt) wrote :

What can USC do if the agent isn't running? Does it make sense to try and launch the agent itself? What advice should it give users if it can't?

Changed in software-center (Ubuntu):
status: Triaged → Confirmed
Revision history for this message
Daniel (daniel-laflamme) wrote :

If I run /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 in a terminal, then the install button starts working again.

Where can I see the log/reason why it failed to start with gnome? It looks like the autostart file is valid:

$ cat /etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop
[Desktop Entry]
Name=PolicyKit Authentication Agent
Comment=PolicyKit Authentication Agent
Exec=/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
Terminal=false
Type=Application
Categories=
;OnlyShowIn=GNOME;XFCE;
X-Ubuntu-Gettext-Domain=polkit-gnome-1

Revision history for this message
daves111 (daves111) wrote :

I'm stuck back on 9.04; my question is this: can my compaq i945g celeron d 3.46 work with the new version of ubuntu that is now out?

Revision history for this message
edwardtilbury (edwardtilbury) wrote :

fresh install of 10.04 x64

Installed a few programs, closed, opened softwarecenter to install another program, but the 'install' button is now unresponsive.

Rebooted, seemed to work ok, closed, opened softwarecenter again, now It's not responding again.

I've only had this installation for a day. I haven't made any changes to 'policykit' , I don't even know what that is.

Revision history for this message
Lance Jarvis (ldjarvis) wrote :

I installed 10.04 and shortly thereafter had this same problem with programs not being able to be installed (or presumably removed) and several other authorisation related problems as well. After much stress I found that the Policykit agent set to run on startup was a KDE one. The problem appears to have been solved by creating a new start up entry (System-Preferences-Startup Applications) to run the GNOME policy kit as Daniel wrote above (2010-03-02) and switching off the KDE one. I guess KDE and GNOME versions are not entirely compatible and appear to not be interchangable. It seems to be working for me. Hopefully this will help others.

Revision history for this message
Carlos Eduardo Moreira dos Santos (cemsbr) wrote :

Same problem in 10.04 32 bits. Using aptitude while Software Center does not work...

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

I introduced the AuthorizationFailed error if there isn't any auth agent arround. But what error should be shown to the user?

Changed in aptdaemon (Ubuntu):
status: New → Fix Committed
Revision history for this message
Carlos Eduardo Moreira dos Santos (cemsbr) wrote :

Users want solution, so the error should be something like "A problem was found and you need to reboot.". It seems old days are back...

Kiwinote (kiwinote)
summary: - click install, nothing happens, in software center if policykit auth
- agent not running
+ [master] install/remove buttons don't react when policykit is not
+ running
description: updated
Revision history for this message
Peter B P (peterbp) wrote :

My addition: policykit seems to fail starting, just like several other items in my etc/xdg/autostart/ folder, fx. Parcellite and GnomeDo. I've had this problem for a while (10.04, latest updates, including proposed-updates). I think this is a consequence of a different problem with autostart items not launching.

Revision history for this message
Kiwinote (kiwinote) wrote :

Hi Peter. Thanks for the additional info. It is probably a good idea to report a separate bug concerning the last comment. For s-c we will probably detect when the transaction fails because of the absence of an authentication agent and then attempt to execute the transaction again. Thanks again for your help!

Revision history for this message
Kiwinote (kiwinote) wrote :

Detect when the transaction fails, then attempt to start policykit, and then re-execute the transaction, is what the above should read..

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

I could raise an e.g. AuthAgentMissingError in aptdaemon - I get this information from PolicyKit. So you don't need to poll the agent in s-c.

Revision history for this message
Kiwinote (kiwinote) wrote :

Hi Sebastian. I had been thinking of using the AuthorizationFailed error from aptdaemon that you introduced a little while back. What would the difference be between that one and the AuthAgentMissingError be? If you could let me know which one we should be using, then I'll adapt s-c to use it. Thanks a lot!

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

I am getting old. That is the main problem. I just have forgotten that this was already implemented. The AuthorizationFailed error is just fine!

Kiwinote (kiwinote)
Changed in software-center (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Jorge Q (jquiroga2005) wrote :
Download full text (3.5 KiB)

Excuse me if I wrote this in another duplicated, and any mistakes I'm not English native speaker, but maybe this give to you more clues about the problem.

Maybe the problem in bigger than that, because I have the same problem after reinstall pulseaudio (because headphones don't mute speakers and right now I have the problem and more) startup applications doesn't work (specially nm-applet --sm-disable is the most important, maybe the policy kit too as you point here), Installation by Ubuntu software center the same problem than here, In Ubuntu tweak I cannot unlock anything and some administratives task I cannot do since pulse audio uninstall. For instance, I cannot change my own user privileges or activate propietary drivers and my folders (Documents, Downloads, Public, etc) in the left panel of Nautilis dissapear and cannot put them in its original place on Nautilus, among others task and weird things. Take in account that my user is a sudoer and all this stuff worked before. Another friend had the same problem and follow the steps to update pulse audio and the same or when another users unistall some system-wide applications.

I tried removing completely (even home directory) and recreate my user from another sudoer and again the same problems. But if I create a new administrator user, it have everything correct, something in another place that have a record for users permissions or something is the problem and when the user is eliminated don't eliminate its information, because even re-creating the problematic user cannot recover its original situation.

this is the output in my laptop when launch the policy kits

myuser@ubuntu:~$ /usr/lib/kde4/libexec/polkit-kde-authentication-agent-1
New PolkitAgentListener 0x11e44e0
Adding new listener PolkitQt1::Agent::Listener(0x11fd5c0) for 0x11e44e0

(<unknown>:6692): GLib-GObject-WARNING **: cannot register existing type `_PolkitError'

(<unknown>:6692): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed

Someone said that a workaround is launching Gnome policy kit and this is the output and I'm not sure if it wasn't launched on startup process as the kde version. Both was on statup applications but launched by the user not as root (via sudo).

myuser@ubuntu:~$ /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
(polkit-gnome-authentication-agent-1:6784): GLib-GObject-WARNING **: cannot register existing type `_PolkitError'

(polkit-gnome-authentication-agent-1:6784): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed

** (polkit-gnome-authentication-agent-1:6784): WARNING **: Unable to register authentication agent: Remote Exception invoking org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent() on /org/freedesktop/PolicyKit1/Authority at name org.freedesktop.PolicyKit1: org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for session
Cannot register authentication agent: Remote Exception invoking org.freedesktop.PolicyKit1.Authority.RegisterAuthenticationAgent() on /org/freedesktop/PolicyKit1/Authority at name org.freedesktop.PolicyKit1: org.freedesktop.PolicyKit1.Error.Failed:...

Read more...

Revision history for this message
Jorge Q (jquiroga2005) wrote :

I found the reason of the problem and I feel like a stupid, but maybe could happened to others, the problem is that without notice I login in GNOME failsafe mode and that's the problem with generalized authentication problems, so is good to review if someone else is login in the same way and one of the effects is that from Ubuntu center software install button don't do anything.

I'm sorry for the noise and thanks, I'll continue with the sound problem.

Revision history for this message
Kiwinote (kiwinote) wrote :

(Replied to Jorge in bug 591129.)

Revision history for this message
GMos (gijs-mos) wrote :

Hi,
Same as #24 applies for me too. I have to use failsafe mode for Gnome to work, shich I will report separately.

Changed in aptdaemon (Ubuntu):
status: Fix Committed → Invalid
Revision history for this message
Omer Akram (om26er) wrote :

is this bug fixed?

Revision history for this message
Peter B P (peterbp) wrote :

Omer: "is this bug fixed?" I just checked on my 10.04 box, and no, it's still not fixed.

Revision history for this message
Omer Akram (om26er) wrote :

Peter, it would be really helpful if you could try Ubuntu 10.10

Revision history for this message
Peter B P (peterbp) wrote :

Omer; I've tested 10.10/Maverick since beta, and the software center seems to work fine - or at least this bug isn't in there.

Omer Akram (om26er)
Changed in software-center (Ubuntu):
status: Fix Committed → Fix Released
Changed in software-center:
importance: Unknown → Wishlist
status: Unknown → New
Revision history for this message
daves111 (daves111) wrote :

btw, what I finally did was changed the monitor setting to generic (or something like that); then it has worked since; i have been able to run the latest unbuntu and not in safe mode ... I just checked and now the monitor setting is Dell 15" 1024x768 normal, 60Hz ... so it has gone back to that somehow. Anyway, everything works and I am thankful.

affects: software-center → policykit-1-gnome
Changed in policykit-1-gnome:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.