Bug 20923 - dnfdragora exits with errors when Polkit dialog is canceled out
Summary: dnfdragora exits with errors when Polkit dialog is canceled out
Status: REOPENED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
: High major
Target Milestone: ---
Assignee: Angelo Naselli
QA Contact:
URL:
Whiteboard:
Keywords: NEEDINFO
Depends on:
Blocks:
 
Reported: 2017-05-24 12:59 CEST by Morgan Leijström
Modified: 2017-06-01 14:31 CEST (History)
3 users (show)

See Also:
Source RPM: dnfdragora-1.0.1-2.mga6.src.rpm
CVE:
Status comment:


Attachments

Description Morgan Leijström 2017-05-24 12:59:27 CEST
Steps to Reproduce:
1. start dnfdragora as user; 
2. select package to install, and to execute the install;
3. dnfdragora asks for root password, click abort
Expected: dialog close and i am back in dnfdragora, nothing changed
Happens: dnfdragora quits immediately!

In konsole where i started dnfdragora:
dnfdaemon client error: g-io-error-quark: GDBus.Error:org.baseurl.DnfSystem.AccessDeniedError: Session is not authorized (36) 
<_M_> [ui] YUILoader.cc:104 deleteUI(): Shutting down UI
Closing dnfdragora
<_M_> [ew] YExternalWidgets.cc:116 ~YExternalWidgetsTerminator(): Shutting down mga External Widgets
<_M_> [ew] YMGAWidgetExtensionFactory.cc:49 ~YMGAWidgetFactory(): Factory removed
Comment 1 Morgan Leijström 2017-05-24 14:09:15 CEST
Steps to reproduce as above, but now enter root password and proceed:
Messages as per below in konsole, and also in a popup error message and when that message is closed, dnfdragora exits.

<WRN> [qt-ui] YQUI.cc:731 qMessageHandler(): <libqt-warning> QXcbConnection: XCB error: 3 (BadWindow), sequence: 1931, resource id: 39846756, major code: 40 (TranslateCoords), minor code: 0
on_TransactionEvent start
on_TransactionEvent download
dnfdaemon client error: g-io-error-quark: GDBus.Error:org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib64/python3.5/site-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python3.5/site-packages/dnfdaemon/server/__init__.py", line 83, in newFunc
    rc = func(*args, **kwargs)
  File "/usr/share/dnfdaemon/dnfdaemon-system", line 537, in RunTransaction
    result = self.run_transaction()
  File "/usr/lib/python3.5/site-packages/dnfdaemon/server/__init__.py", line 555, in run_transaction
    self.base.download_packages(to_dnl, self.base.progress)
  File "/usr/lib/python3.5/site-packages/dnf/base.py", line 1011, in download_packages
    progress.start(len(payloads), est_remote_size, total_drpms=total_drpm)
TypeError: start() got an unexpected keyword argument 'total_drpms'
 (36) 

I set importance high as i think dnfdragora is valuable
Comment 2 Morgan Leijström 2017-05-24 14:11:51 CEST
After having closed the error popup, the same three messages as in comment #0 is output in konsole, then dnfdragora is gone.
Comment 3 Barry Jackson 2017-05-24 18:32:09 CEST
Confirmed.
It also happens with gtk:
dnfdaemon client error occurred:
g-io-error-quark: GDBus.Error:org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib64/python3.5/site-packages/dbus/service.py", line 707, in _message_cb
    retval = candidate_method(self, *args, **keywords)
  File "/usr/lib/python3.5/site-packages/dnfdaemon/server/__init__.py", line 83, in newFunc
    rc = func(*args, **kwargs)
  File "/usr/share/dnfdaemon/dnfdaemon-system", line 537, in RunTransaction
    result = self.run_transaction()
  File "/usr/lib/python3.5/site-packages/dnfdaemon/server/__init__.py", line 555, in run_transaction
    self.base.download_packages(to_dnl, self.base.progress)
  File "/usr/lib/python3.5/site-packages/dnf/base.py", line 1011, in download_packages
    progress.start(len(payloads), est_remote_size, total_drpms=total_drpm)
TypeError: start() got an unexpected keyword argument 'total_drpms'
 (36)
Comment 4 Morgan Leijström 2017-05-25 11:29:43 CEST
I see NEEDINFO got set.  What info is wanted?
Comment 5 Angelo Naselli 2017-05-25 13:19:34 CEST
progress.start(len(payloads), est_remote_size, total_drpms=total_drpm)
Should have fixed by Neal, don't know if dnf or dnfdaemon.
Comment 6 Neal Gompa 2017-05-25 13:21:32 CEST
This should have been fixed in dnfdaemon-0.3.18-1.mga6. Please update to that and try again.
Comment 7 Neal Gompa 2017-05-25 13:23:15 CEST
Err, this is fixed in dnfdaemon-0.3.18-1.mga6. Please update to that and try again.

See Fedora bug for reference: https://bugzilla.redhat.com/show_bug.cgi?id=1454854
Comment 8 Morgan Leijström 2017-05-25 14:31:06 CEST
Fixed OK for the case in comment 1
But I reopen as it still errs per comment 0
Comment 9 Neal Gompa 2017-05-25 14:40:56 CEST
The remaining issue is related to dnfdragora's handling of a canceled out Polkit prompt. Reassigning to dnfdragora.
Comment 10 Angelo Naselli 2017-05-25 21:59:58 CEST
on comment#0, and comment#9 well from dnfdragora point of view it is a dnfdaemon error caught as exception, honestly I'm not able to distinguish a cancel event from a real not authorized session or just a transaction error, the exception is caught and the program exit without issue, so... any suggestion?
Comment 11 Angelo Naselli 2017-06-01 14:31:17 CEST
fixed in github master see:
https://github.com/manatools/dnfdragora/commit/54631008b95b089e7c09e9f81475f6ac5617254e

Note You need to log in before you can comment on or make changes to this bug.