ubuntu-bug _usr_bin_sudo.crash yields AttributeError

Bug #1844682 reported by kamiccolo
This bug report is a duplicate of:  Bug #1983481: _run_hook called with ui=None. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
New
Undecided
Unassigned

Bug Description

While digging through /var/crash folder I've realized that I do have a few crashes involving sudo. To be exact, couple of files names _usr_bin_sudo.N.crash

Logically, I've tried uploading those to Ubuntu error tracker using following:

ubuntu-bug /var/crash/_usr_bin_sudo.0.crash

It failed mumbling about permissions. So, stupid but common next step:
sudo ubuntu-bug /var/crash/_usr_bin_sudo.0.crash

yielded me the following Python Traceback:

** (apport-gtk:6825): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-ILURWtYdgA: Connection refused
ERROR: hook /usr/share/apport/package-hooks/source_sudo.py crashed:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport/report.py", line 197, in _run_hook
    symb['add_info'](report, ui)
  File "/usr/share/apport/package-hooks/source_sudo.py", line 20, in add_info
    response = ui.yesno("The contents of your /etc/sudoers file may help developers diagnose your bug more quickly, however, it may contain sensitive information. Do you want to include it in your bug report?")
AttributeError: 'NoneType' object has no attribute 'yesno'

It seems that in the end, something got uploaded to the server, but it didn't make any indication of successful upload what-so-ever. Repeating the same sequence of actions does not yield the same Python Traceback and exits gracefully.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: apport 2.20.1-0ubuntu2.19
ProcVersionSignature: Ubuntu 4.15.0-64.73~16.04.1-generic 4.15.18
Uname: Linux 4.15.0-64-generic x86_64
ApportLog:

ApportVersion: 2.20.1-0ubuntu2.19
Architecture: amd64
Date: Thu Sep 19 17:09:29 2019
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_US
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: apport
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
kamiccolo (kamicc) wrote :
Revision history for this message
Benjamin Drung (bdrung) wrote :

yesno returns None. The API says that this can be the case:

```
    def yesno(self, text):
        """Show a yes/no question.

        Return True if the user selected "Yes", False if selected "No" or
        "None" on cancel/dialog closing.
        """
```

So the culprit is /usr/share/apport/package-hooks/source_sudo.py which is provided by the sudo package. So adjust the package accordingly.

affects: apport (Ubuntu) → sudo (Ubuntu)
Revision history for this message
Benjamin Drung (bdrung) wrote :

I have to correct my last comment: ui was None. Therefore this bug is a duplicate of bug #1983481.

affects: sudo (Ubuntu) → apport (Ubuntu)
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.