Bug 20923 - dnfdragora exits with errors when Polkit dialog is canceled out
Summary: dnfdragora exits with errors when Polkit dialog is canceled out
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: 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: 2020-09-21 01:36 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

Priority: Normal => High
Summary: dnfdragora exits completely if root password dialog is closed => dnfdragora exits with errors when about to abort or begin executing

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)

Keywords: (none) => NEEDINFO
CC: (none) => zen25000

Comment 4 Morgan Leijström 2017-05-25 11:29:43 CEST
I see NEEDINFO got set.  What info is wanted?
Angelo Naselli 2017-05-25 13:18:00 CEST

CC: (none) => anaselli

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.

Assignee: bugsquad => ngompa13
Status: NEW => ASSIGNED
CC: (none) => ngompa13
Source RPM: dnfdragora-1.0.1-2.mga6.src.rpm => dnfdaemon-0.3.17-1.mga6.src.rpm

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

See Also: (none) => https://bugzilla.redhat.com/show_bug.cgi?id=1454854
Resolution: (none) => FIXED
Status: ASSIGNED => RESOLVED

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

Resolution: FIXED => (none)
Status: RESOLVED => REOPENED

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.

Source RPM: dnfdaemon-0.3.17-1.mga6.src.rpm => dnfdragora-1.0.1-2.mga6.src.rpm
Assignee: ngompa13 => anaselli

Neal Gompa 2017-05-25 14:41:19 CEST

Summary: dnfdragora exits with errors when about to abort or begin executing => dnfdragora exits with errors when Polkit dialog is canceled out

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
Comment 12 Aurelien Oudelet 2020-09-19 18:08:54 CEST
Hi,
This is High priority bug for a good reason.

Making Mageia even better than ever is best direction.
In order to do right thing, this bug should be examined and fixed as soon as possible.

Packagers, please make the status to Assigned when you are working on this.
Feel free to reassign the bug if bad-triaged. Also, if bug is old, please close it.

On October 1st 2020, we will drop priority to normal.
Comment 13 Angelo Naselli 2020-09-19 19:23:36 CEST
dnfdragora 1.1.2 in mageia 7 should have it fixed already, can someone confirm that?
dnfdragora 2.1.0 in cauldron has it fixed as well
Comment 14 Morgan Leijström 2020-09-21 01:36:56 CEST
Confirming fixed in mga7
Per comment 13 fixed in cauldron mga8

Status: REOPENED => RESOLVED
Resolution: (none) => FIXED


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