Alt-tab stops switching windows [JS ERROR: TypeError: window is null _createWindowClone@resource:///org/gnome/shell/ui/altTab.js:29:27]

Bug #1933996 reported by Hans109h
114
This bug affects 20 people
Affects Status Importance Assigned to Milestone
GNOME Shell
Fix Released
Unknown
mutter (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

When a new Wayland session is created from a login, Alt-tab works as expected to change windows. After sometime Alt-tab fails to do anything (super-tab still works to change applications) and the following error is created in syslog:

gnome-shell[777718]: JS ERROR: TypeError: window is null#012_createWindowClone@resource:///org/gnome/shell/ui/altTab.js:29:27#012_init@resource:///org/gnome/shell/ui/altTab.js:1004:34#012_init@resource:///org/gnome/shell/ui/altTab.js:1045:24#012_init@resource:///org/gnome/shell/ui/altTab.js:568:30#012_startSwitcher@resource:///org/gnome/shell/ui/windowManager.js:2069:24

The only workaround I have found is to logout and log back in, however after some time the error repeats itself.

Ubuntu 21.04
gnome-shell: Installed: 3.38.4-1ubuntu3~21.04.1

ProblemType: Bug
DistroRelease: Ubuntu 21.04
Package: gnome-shell 3.38.4-1ubuntu3~21.04.1
ProcVersionSignature: Ubuntu 5.11.0-22.23-generic 5.11.21
Uname: Linux 5.11.0-22-generic x86_64
ApportVersion: 2.20.11-0ubuntu65.1
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Tue Jun 29 10:53:32 2021
DisplayManager: gdm3
InstallationDate: Installed on 2020-11-11 (230 days ago)
InstallationMedia: Ubuntu 20.10 "Groovy Gorilla" - Release amd64 (20201022)
RelatedPackageVersions: mutter-common 3.38.4-1ubuntu2
SourcePackage: gnome-shell
UpgradeStatus: Upgraded to hirsute on 2021-04-27 (62 days ago)

Revision history for this message
Hans109h (hans109h) wrote :
Changed in gnome-shell (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
status: Confirmed → Triaged
summary: - Alt-tab stops switching windows
+ Alt-tab stops switching windows [JS ERROR: TypeError: window is null
+ _createWindowClone@resource:///org/gnome/shell/ui/altTab.js:29:27]
Revision history for this message
Frank Sokolic (sokolic) wrote :

I'm getting this error too, although in my case Super-tab doesn't work either. I have to log out and log in again.

Ubuntu 21.04, Wayland, Gnome 3.38.5.

Revision history for this message
Hans109h (hans109h) wrote :

Just to add something else I discovered, "Alt-`" (or what ever key might be above tab) still works for me as expected to bring up the window switcher and switch between same-application windows. Hmmm.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

The issue has been reported upstream:

  https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3456

so it would be best to keep the discussion there now.

Revision history for this message
Florian (ffriedrich) wrote :

Not sure whether the upstream issue, which is several months old, is the same. The present one seems to have kicked in for several users at the same time at the end of June 2021.

It looks like it is somehow connected to Thunderbird.

Also see this comment, for one way of reproducing it: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1934527/comments/4

I can also confirm that it does not seem to occur if Thunderbird isn't running at all.

Revision history for this message
Frank Sokolic (sokolic) wrote :

I can also confirm that this issue only happens when I have Thunderbird open. On my system, Thunderbird opens messages in a new message window and this is when the problem seems to occur, although it doesn't happen every time.

Revision history for this message
Hans109h (hans109h) wrote :

I'll also confirm that I use Thunderbird and have had other strange issues with Thunderbird windows not closing correctly after messages are sent. The application can be completely killed yet Dock still indicates that there are windows available (but no way to access them).

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thunderbird can take many seconds to start and close, so sometimes it does really still have some windows half-prepared in memory but not visible. That strange state might be a contributing factor.

Revision history for this message
Florian (ffriedrich) wrote :

Can someone explain why this bug seems to be such low priority? It makes using the Gnome Shell nearly impossible for anyone who uses Thunderbird, as it stops any meaningful switching between windows, and massively interferes with even the most basic workflow.

Revision history for this message
Hans109h (hans109h) wrote :

The bug has disappeared for me, and that might explain why it's low priority, as it is very intermittent and difficult to pinpoint a fix.

Revision history for this message
Florian (ffriedrich) wrote :

Hm, for me it's not intermittent at all. It happens as soon as I've sent a single message using Thunderbird; Gnome Shell simply becomes unable to keep track of Thunderbird windows, and the window switcher can't launch any more.

Revision history for this message
Frank Sokolic (sokolic) wrote :

It isn't intermittent for me either and happens at least three or four times a day. I've now taken to using Thunderbird as little as possible, and closing it as soon as I've read or sent my mail.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

If you have any tips regarding this bug then please comment on the upstream issue:

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3456

Revision history for this message
Jakob Lell (jakoblell) wrote :

I'm also affected by this bug when using Thunderbird but I've found a workaround: Unpin Thunderbird (right click on the icon and "Remove from Favorites"). After that you can still start Thunderbird manually, it won't trigger this bug any more when it is just a normal application (and not a "favorite" application with a fixed place in the Dock).

Revision history for this message
Florian (ffriedrich) wrote :

@jakoblell, I had hoped for the same solution, but it does _not_ work for me that way. Even when starting it manually, it will show its icon in the dock, and after a while, the same problem happens for me.

Revision history for this message
Markus W (z-mw) wrote :

This bug should be fixed with https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2003
I cannot reproduce the issue anymore when this change is applied on my system.

Can someone initiate that this fix is backported into Ubuntu 21.04?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

That fix is being tracked in bug 1932328 so is already on its way to Ubuntu eventually. Not sure if 21.04 will get the fix.

tags: added: fixed-in-40.6 fixed-upstream
affects: gnome-shell (Ubuntu) → mutter (Ubuntu)
Changed in mutter (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Hanno (hzulla) wrote :

A fix has been merged upstream two months ago, see https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4184 and https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2027

The fix was released with version 40.6, but Debian and Ubuntu haven't updated the upstream package in their repository, yet.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks Hanno. We know and it's shown in comment #17.

Revision history for this message
Hanno (hzulla) wrote :

There has been no update to the 40.x branch at https://salsa.debian.org/gnome-team/mutter/-/commits/upstream/40.x/ a month since this was fixed and I had hoped that a Debian/Ubuntu team member would notice it via this bug report.

Here's hoping for a fix in the 21.04 and 21.10 packages.

Revision history for this message
Hanno (hzulla) wrote :

Hey there. This bug affects the pre-installed default email client of Ubuntu, there's a fix available upstream now since a few weeks and the next major Ubuntu release is scheduled four months in the future.

Can you please release the bugfix for the current release(s), prettyplease?

Revision history for this message
Hans109h (hans109h) wrote :

In Jammy Jellyfish (Thunderbird 91.5.0, GNOME Shell 40.5) when this bug occurs it also cause the Thunderbird window to not display at all. The application dock shows that it is open, but there is no way to get to it unless you right click the dock icon and open a new window.

Sharing here as I believe it is related. Hopefully the fix committed will take care of this.

tags: removed: hirsute
Changed in mutter (Ubuntu):
status: Fix Committed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (7.0 KiB)

This bug was fixed in the package mutter - 41.3-1ubuntu1

---------------
mutter (41.3-1ubuntu1) jammy; urgency=medium

  * Merge with debian, includes these upstream changes:
    - window: Don't change workspaces of unmanaged windows (LP: #1933996)
    - backend: Reset idletime when unplugging the power cable (LP: #1945121)
    - clutter/text: Invalidate actor paint volume when it has changed
      (LP: #1882291)
    - backends/native: Ensure pointer is onscreen in input thread (LP: #1933186)
    - OSK Enter, space and backspace keys don't work when typing in Greek
      (LP: #1820523)
    - window: Don't change workspaces of unmanaged windows (LP: #1932328)
  * Remainig changes with debian:
    - debian/gbp.conf: update upstream branch to point to ubuntu/master
    - debian/patches/x11-Add-support-for-fractional-scaling-using-Randr.patch:
      + X11: Add support for fractional scaling using Randr

mutter (41.3-1) unstable; urgency=medium

  * New upstream release:
    - Check keyboard serials for activation
    - Fix mixed up refresh rates in multi-monitor setups (LP: #1788535)
    - Allow disabling HW cursors
    - Improve damage handling (LP: #1872870)
    - Consider xrandr flags for advertised modes
    - Ensure constraints after client resize
    - window-group: Disable culling when rendinging clone to offscreen buffer
    - Fix workspace switch animation in default plugin
    - Fix unfullscreening of window that were mapped fullscreen
    - Fix DMA-BUF screencasts with unredirected fullscreen windows
    - Fix orientation changes on devices with 90°

mutter (41.2-2) unstable; urgency=medium

  * Team upload
  * d/p/Consistently-pass-timestamp-as-uint64-when-creating-MetaS.patch:
    Add proposed patch to fix FTBFS on 32-bit architectures
  * d/patches: Update to 41.2-6-g7b64c159a
    - Surface damage viewport improvements
  * Update patch metadata with upstream status

mutter (41.2-1) unstable; urgency=medium

  * Team upload

  [ Simon McVittie ]
  * New upstream release
  * d/patches: Drop patches that were applied upstream
  * d/patches: Update to upstream gnome-41 branch commit 41.2-3-g5d0c26631
    - wayland: Check keyboard serials for activation
    - Sync refresh rate to the correct monitor for maximized/full-screen
      apps in a multi-monitor layout
    - Add a debug environment variable to disable hardware cursors for
      faulty hardware and drivers

  [ Laurent Bigonville ]
  * debian/rules: Disable systemd support on non-linux architectures

mutter (41.1-1) unstable; urgency=medium

  * Team upload
  * New upstream release
  * Drop a patch that came from upstream
  * Update Lintian overrides
  * Replace patches for #995929 with the version that was applied upstream
  * Remove workaround for #994806
  * d/libmutter-9-0.symbols: Ignore removal of clutter_stage_capture_into.
    Nothing else in Debian references this symbol, except for forks of
    the mutter codebase.

mutter (41.0-5) unstable; urgency=medium

  * Team upload
  * Merge packaging from unstable
    - No changes relative to 41.0-4, except for the changelog
  * Close #995929 via changelog.
    The patches in 41.0-4 seem to have been successful.
  * Release to...

Read more...

Changed in mutter (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Hans109h (hans109h) wrote :

Not fixed. Jammy w/ mutter 41.3.

Alt-tab works on boot. Send e-mail with Thunderbird, alt-tab fails to work.

Changed in mutter (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Hans109h (hans109h) wrote :

As a workaround I updated to Thunderbird Beta (v. 97.0b3) and it does not cause the alt-tab problem.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mutter - 42~beta-1ubuntu2

---------------
mutter (42~beta-1ubuntu2) jammy; urgency=medium

  * debian/patches: Skip monitor-size tests that may fail on autopkgtest

 -- Marco Trevisan (Treviño) <email address hidden> Mon, 14 Mar 2022 02:27:21 +0100

Changed in mutter (Ubuntu):
status: Confirmed → Fix Released
Changed in gnome-shell:
status: Unknown → 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.