Submitting error report asks confounding questions
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Apport |
Medium
|
Unassigned | ||
| | apport (Ubuntu) |
Medium
|
Brian Murray | ||
| | Trusty |
Medium
|
Brian Murray | ||
| | Utopic |
Medium
|
Brian Murray | ||
Bug Description
Test Case
---------
1) start totem in a terminal
2) pkill -11 totem
3) observe apport crash dialog
4) make sure send an error report is checked
5) click Leave Closed
6) Observe an apport dialog about "How would you describe the issue?"
With the version of apport from -proposed the apport dialog will not appear.
Original report
---------------
Ubuntu 12.04
apport 2.6.1-0ubuntu10, Ubuntu 12.10
apport 2.12.5-0ubuntu2.2, Ubuntu 13.10
1. In a release version of Ubuntu, trigger an error in something that has Apport hooks.
What happens: You are asked questions which are often false and usually not understandable. For example:
"It seems you have modified the contents of '/etc/cups/
"Thanks for reporting this bug on unity. Is the issue you are reporting purely graphical (will report more information about your graphic configuration and will report the bug against compiz)?"
https:/
"Did your system recently lock up or require a hard reboot?" -- What's a "hard reboot"?
What should happen: You are not asked any questions.
If all reporters of actual bugs are expected to use English, hiding these questions from non-reporters might also resolve bug 855337.
[Originally reported by Katie Taylor.]
Related branches
- Martin Pitt: Approve on 2015-02-05
-
Diff: 33 lines (+11/-6)1 file modifiedapport/ui.py (+11/-6)
| Matthew Paul Thomas (mpt) wrote : | #1 |
| Changed in apport: | |
| importance: | Undecided → Medium |
| status: | New → Confirmed |
| Martin Pitt (pitti) wrote : Re: [Bug 1084979] Re: Submitting error report asks confounding questions | #3 |
Evan Dandrea [2012-11-30 14:37 -0000]:
> Bug 1063189 offers further evidence that we should never let package hooks ask questions:
> https:/
This is a very reasonable question for a development release IMHO, and
such questions (also about attaching X.org and lightdm logs which need
root privs) can greatly improve the utility of Launchpad reports
during a development release.
I do agree that questions should not be asked in stable releases when
only submitting to errors.u.c.
Martin
--
Martin Pitt | http://
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
| Brian Murray (brian-murray) wrote : | #4 |
Another reason that this should not happen is because the fields uploaded by whoopsie (http://
| Changed in apport (Ubuntu): | |
| status: | New → Triaged |
| importance: | Undecided → Medium |
| Brian Murray (brian-murray) wrote : | #5 |
Of course I meant "and not from apport package hooks".
| description: | updated |
| Brian Murray (brian-murray) wrote : | #6 |
Looking at the code I think we'd want the common hooks to run but not the package hooks. I've tested the following and it works, but the test test_report.py fails because it passes a string for ui.
=== modified file 'apport/report.py'
--- apport/report.py 2013-09-27 03:56:13 +0000
+++ apport/report.py 2013-10-14 22:23:24 +0000
@@ -829,6 +829,10 @@
if _run_hook(self, ui, hook):
+ # LP: #1084979 - don't run package hooks if not sending to the crashdb
+ if not ui.ui.crashdb.
+ return False
+
# binary package hook
if package:
for hook_dir in hook_dirs:
| Martin Pitt (pitti) wrote : | #7 |
This is a nice hack, but not something which I'd like to put upstream (as this is quite specific how we bolted on whoopsie support in the ubuntu branch) or even into the Ubuntu package.
I'd rather not pass an UI object to the hooks but call them anyway, as they usually do other things than just asking questions; some, like rhythmbox, even change the affected package. Not passing an UI object will crash those hooks which don't check for it, but that doesn't matter that much.
| description: | updated |
| Brian Murray (brian-murray) wrote : | #8 |
Some apport package hooks, like totem's, will need to be modified so that they still collect data even if ui is None.
def add_info(report, ui):
response = ui.choice("How would you describe the issue?", ["The totem interface is not working correctly", "No sound is being played", "Some audio files or videos are not being played correctly"], False)
if response == None: # user cancelled
raise StopIteration
.....
report[
Because ui is None, then response crashes and the addition of AlsaMixer never happens. However, this can be fixed by either checking for ui or reorganizing the order of operations.
| Changed in apport (Ubuntu): | |
| assignee: | nobody → Brian Murray (brian-murray) |
| status: | Triaged → In Progress |
| Martin Pitt (pitti) wrote : | #9 |
As I said, this is a hack which I don't want to put into upstream, but https:/
| Changed in apport: | |
| status: | Confirmed → Won't Fix |
| Martin Pitt (pitti) wrote : | #10 |
I merged Brian's MP to trunk now, as it doesn't break anything on the Debian side. The conditional provision of UI looks fine. Thanks!
| Changed in apport: | |
| status: | Won't Fix → Fix Released |
| Changed in apport (Ubuntu): | |
| status: | In Progress → Fix Committed |
| Changed in apport (Ubuntu Trusty): | |
| status: | New → Triaged |
| Changed in apport (Ubuntu Utopic): | |
| status: | New → Triaged |
| Changed in apport (Ubuntu Trusty): | |
| importance: | Undecided → Medium |
| Changed in apport (Ubuntu Utopic): | |
| importance: | Undecided → Medium |
| Changed in apport (Ubuntu Trusty): | |
| assignee: | nobody → Brian Murray (brian-murray) |
| Changed in apport (Ubuntu Utopic): | |
| assignee: | nobody → Brian Murray (brian-murray) |
| Changed in apport (Ubuntu Trusty): | |
| status: | Triaged → In Progress |
| Changed in apport (Ubuntu Utopic): | |
| status: | Triaged → In Progress |
| Timo Aaltonen (tjaalton) wrote : | #11 |
Please add the SRU header as mentioned on https:/
| description: | updated |
| Launchpad Janitor (janitor) wrote : | #12 |
This bug was fixed in the package apport - 2.16-0ubuntu1
---------------
apport (2.16-0ubuntu1) vivid; urgency=medium
* New upstream release:
- Add a new method ProblemReport.
(which can be very large) directly to files without loading them all
into memory first. Use that in apport-unpack. Thanks Louis Bouchard!
(LP: #1307413)
- launchpad backend: Work with Python 3, now that launchpadlib exists for
Python 3. (LP: #1153671)
- apport-bug, apport-gtk: Also check for $WAYLAND_SESSION, to use
apport-gtk instead of apport-cli under Wayland. Thanks Tim Lunn.
(LP: #1418766)
- apport-gtk: When running under Wayland, avoid Gdk/Wnck operation for
setting crash window modal to the PID of the crashed window; these only
work under X11.
- Don't install the test suite any more, to save 1 MB of installed space.
It can be run out of trunk easily enough, and distributions can install
it from tests/ if they desire.
- hookutils, attach_
for non-textual values. (LP: #1370259)
- ui.py: Only provide a UI to hooks if the crash db will accept the
report. This avoids asking questions if the report is merely sent to
whoopsie for Ubuntu stable releases. Thanks Brian Murrary.
(LP: #1084979)
- whoopsie-
calling package hooks. Thanks Brian Murray.
- Fix check for available terminal when checking whether to display the
"Examine locally" button.
* Add general hook for detecting Wayland sessions and tagging them with
"wayland-
* debian/
/usr/
-- Martin Pitt <email address hidden> Fri, 06 Feb 2015 10:11:30 +0100
| Changed in apport (Ubuntu): | |
| status: | Fix Committed → Fix Released |
Hello Matthew, or anyone else affected,
Accepted apport into utopic-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| Changed in apport (Ubuntu Utopic): | |
| status: | In Progress → Fix Committed |
| tags: | added: verification-needed |
| Brian Murray (brian-murray) wrote : | #14 |
Hello Matthew, or anyone else affected,
Accepted apport into trusty-proposed. The package will build now and be available at https:/
Please help us by testing this new package. See https:/
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-
Further information regarding the verification process can be found at https:/
| Changed in apport (Ubuntu Trusty): | |
| status: | In Progress → Fix Committed |
| Brian Murray (brian-murray) wrote : | #15 |
I tested apport version 2.14.1-0ubuntu3.7 from trusty-proposed and confirm that questions are no longer asked by the totem (and subsequently any) source package hook.
| tags: | added: verification-done-trusty |
| tags: |
added: verification-needed-utopic removed: verification-needed |
| Launchpad Janitor (janitor) wrote : | #16 |
This bug was fixed in the package apport - 2.14.1-0ubuntu3.7
---------------
apport (2.14.1-0ubuntu3.7) trusty-proposed; urgency=medium
* apport/ui.py: Only provide a UI to hooks if the crash db will accept the
report. This avoids asking questions if the report is merely sent to
whoopsie for Ubuntu stable releases. (LP: #1084979)
-- Brian Murray <email address hidden> Thu, 05 Feb 2015 10:09:15 -0800
| Changed in apport (Ubuntu Trusty): | |
| status: | Fix Committed → Fix Released |
| Adam Conrad (adconrad) wrote : Update Released | #17 |
The verification of the Stable Release Update for apport has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.
| Brian Murray (brian-murray) wrote : | #18 |
I tested apport version 2.14.7-0ubuntu8.2 from utopic-proposed and confirm that apport no longer asks questions.
| tags: |
added: verification-done-utopic removed: verification-needed-utopic |
| Launchpad Janitor (janitor) wrote : | #19 |
This bug was fixed in the package apport - 2.14.7-0ubuntu8.2
---------------
apport (2.14.7-0ubuntu8.2) utopic-proposed; urgency=medium
* apport/ui.py: Only provide a UI to hooks if the crash db will accept the
report. This avoids asking questions if the report is merely sent to
whoopsie for Ubuntu stable releases. (LP: #1084979)
-- Brian Murray <email address hidden> Thu, 05 Feb 2015 09:39:32 -0800
| Changed in apport (Ubuntu Utopic): | |
| status: | Fix Committed → Fix Released |


Bug 1063189 offers further evidence that we should never let package hooks ask questions: /launchpadlibra rian.net/ 118790019/ Screenshot% 20from% 202012- 09-14%2009% 3A53%3A21. png
https:/