ubuntu-bug -w (using xprop) doesn't work under wayland

Bug #1952947 reported by Henning Sprang
30
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
Medium
Unassigned
Focal
Fix Released
Low
Unassigned
Impish
Fix Released
Low
Unassigned
Jammy
Fix Released
Medium
Unassigned

Bug Description

[Impact]

This bug makes it more difficult for Wayland users to report bugs with apport. When a Wayland user tries to use the -w,--window option, apport fails silently. We do not want users to face a high barrier to submitting bug reports.

The patch for this bug adds a message explaining that the -w,--window option cannot be used on Wayland, and suggests a method for finding the window's PID instead.

[Test Plan]

* Log on to Ubuntu on Wayland. You can check that $XDG_SESSION_TYPE=="wayland" in your current session.
* Open a terminal, and run `ubuntu-bug -w`.
* Click on any other window, and observe that the apport UI will not respond.

[Where problems could occur]

The patch uses os.getenv to check that $XDG_SESSION_TYPE is set to 'wayland'. If either of these strings in the patch were wrong, or the environment variable was not used in the target release, the condition would likely never be true.

[Original Description]

I want to report a Bug about the application Studio Controls.

As I did it already quite a few times, I run "ubuntu-bug -w", get a message that I can select the window of the app I want to report a bug about after closing this message.

I close the message with a click on the appropriate button.

I click on the window of the application "Studio Controls" that I want to report a bug about.

Nothing happens.

I wait for a few minutes. Still nothing happens.

In the console where I started ubuntu-bug -w I see the following message:

(apport-gtk:11537): Gdk-CRITICAL **: 20:06:41.384: gdk_wayland_window_set_dbus_properties_libgtk_only: assertion 'GDK_IS_WAYLAND_WINDOW (window)' failed

What I expect:

Usaully when I use this procedure, after a relatively short while a new message window pops up asking me if the bug should be reported and showing me the data that is sent to Launchpad.

I tried other applications, too, same effect.

ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: apport 2.20.11-0ubuntu71
ProcVersionSignature: Ubuntu 5.13.0-21.21-lowlatency 5.13.18
Uname: Linux 5.13.0-21-lowlatency x86_64
ApportLog:

ApportVersion: 2.20.11-0ubuntu71
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Wed Dec 1 20:01:23 2021
InstallationDate: Installed on 2020-04-12 (597 days ago)
InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
PackageArchitecture: all
SourcePackage: apport
UpgradeStatus: Upgraded to impish on 2021-11-14 (16 days ago)

Related branches

Revision history for this message
Henning Sprang (henning) wrote :
Revision history for this message
Henning Sprang (henning) wrote :

Further information:

It seems the behaviour described does not apply to all applications/windows.

For example when I have "qjackctl" running, I get the changed cursor that indicates I can chose that windows, and with this window it works as expected.

The error message in the console appears anyway.

Revision history for this message
Brian Murray (brian-murray) wrote : Re: ubuntu-bug -w doesn't work under wayland

bdmurray@clean-impish-amd64:~$ ubuntu-bug -w
^CTraceback (most recent call last):
  File "/usr/share/apport/apport-gtk", line 597, in <module>
    app.run_argv()
  File "/usr/lib/python3/dist-packages/apport/ui.py", line 734, in run_argv
    (out, err) = xprop.communicate()
  File "/usr/lib/python3.9/subprocess.py", line 1134, in communicate
    stdout, stderr = self._communicate(input, endtime, timeout)
  File "/usr/lib/python3.9/subprocess.py", line 1979, in _communicate
    ready = selector.select(timeout)
  File "/usr/lib/python3.9/selectors.py", line 416, in select
    fd_event_list = self._selector.poll(timeout)
KeyboardInterrupt

The problem is likely with the xprop.communicate() call.

summary: - nothing happens when trying to report a bug with -w after chosing the
- window
+ ubuntu-bug -w doesn't work under wayland
tags: added: rls-jj-incoming
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apport (Ubuntu):
status: New → Confirmed
Changed in apport (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Brian Murray (brian-murray) wrote :

Manually testing xwininfo and xprop it seems that neither of them work under Wayland. The cursor never changes shape and clicking on a window does nothing.

summary: - ubuntu-bug -w doesn't work under wayland
+ ubuntu-bug -w (using xprop) doesn't work under wayland
tags: added: fr-1989
tags: removed: rls-jj-incoming
Changed in apport (Ubuntu Impish):
status: New → Confirmed
importance: Undecided → Medium
status: Confirmed → Triaged
Changed in apport (Ubuntu Jammy):
status: Confirmed → Triaged
Revision history for this message
Sebastien Bacher (seb128) wrote :

it's not really a bug in those x11 utilities, since as the name indicate they are utilities for x11. The fix probably is probably to remove the option from ubuntu-bug on wayland since poking to other process is not possible by design for security reason

Changed in x11-utils (Ubuntu Impish):
status: New → Invalid
Changed in x11-utils (Ubuntu Jammy):
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.20.11-0ubuntu77

---------------
apport (2.20.11-0ubuntu77) jammy; urgency=medium

  * apport/ui.py: Error out when -w option is used on wayland (LP: #1952947).

 -- Nick Rosbrook <email address hidden> Tue, 15 Feb 2022 10:10:59 -0500

Changed in apport (Ubuntu Jammy):
status: Triaged → Fix Released
Revision history for this message
Nick Rosbrook (enr0n) wrote :
description: updated
Revision history for this message
Nick Rosbrook (enr0n) wrote :
Changed in apport (Ubuntu Impish):
importance: Medium → Low
Changed in apport (Ubuntu Focal):
status: New → Triaged
importance: Undecided → Low
Changed in x11-utils (Ubuntu Focal):
status: New → Invalid
Mathew Hodson (mhodson)
no longer affects: x11-utils (Ubuntu)
no longer affects: x11-utils (Ubuntu Focal)
no longer affects: x11-utils (Ubuntu Impish)
no longer affects: x11-utils (Ubuntu Jammy)
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Henning, or anyone else affected,

Accepted apport into impish-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apport/2.20.11-0ubuntu71.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-impish to verification-done-impish. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-impish. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in apport (Ubuntu Impish):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-impish
Changed in apport (Ubuntu Focal):
status: Triaged → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Henning, or anyone else affected,

Accepted apport into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apport/2.20.11-0ubuntu27.22 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Nick Rosbrook (enr0n) wrote :

I tested the -proposed packages on focal (tested apport 2.20.11-0ubuntu27.22) and impish (tested apport 2.20.11-0ubuntu71.1) using the test plan above. In both cases, the fix worked as expected.

tags: added: verification-done-focal verification-done-impish
removed: verification-needed-focal verification-needed-impish
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.20.11-0ubuntu71.1

---------------
apport (2.20.11-0ubuntu71.1) impish; urgency=medium

  * apport/ui.py: Error out when -w option is used on wayland (LP: #1952947).

 -- Nick Rosbrook <email address hidden> Wed, 16 Feb 2022 12:16:27 -0500

Changed in apport (Ubuntu Impish):
status: Fix Committed → Fix Released
Revision history for this message
Robie Basak (racb) wrote : Update Released

The verification of the Stable Release Update for apport has completed successfully and the package is now being 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.

Revision history for this message
Robie Basak (racb) wrote :

Sorry, the apport 2.20.11-0ubuntu27.22 to Focal is bad. It looks like symlinks have inadvertently been expanded. So that one needs fixing please with a replacement upload for Focal. Impish is fine, so I've released that one.

Robie Basak (racb)
tags: added: verification-failed verification-failed-focal
removed: verification-done-focal verification-needed
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Henning, or anyone else affected,

Accepted apport into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apport/2.20.11-0ubuntu27.23 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed verification-needed-focal
removed: verification-failed verification-failed-focal
Revision history for this message
Nick Rosbrook (enr0n) wrote :

I tested apport 2.20.11-0ubuntu27.23 from focal-proposed using the test plan above to confirm the fix.

tags: added: verification-done-focal
removed: verification-needed-focal
Nick Rosbrook (enr0n)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.20.11-0ubuntu27.23

---------------
apport (2.20.11-0ubuntu27.23) focal; urgency=medium

  * Fix expanded symlinks from the previous build

apport (2.20.11-0ubuntu27.22) focal; urgency=medium

  * apport/ui.py: Error out when -w option is used on wayland (LP: #1952947).

 -- William 'jawn-smith' Wilson <email address hidden> Wed, 30 Mar 2022 13:03:09 -0500

Changed in apport (Ubuntu Focal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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