daniellandau / switcher

Gnome Shell extension to switch windows quickly by typing
GNU General Public License v3.0
344 stars 42 forks source link

Bug: Switcher search bar permanently overlaying gnome until session ends #152

Open smcclennon opened 2 years ago

smcclennon commented 2 years ago

Environment

OS: Fedora Workstation 35 Kernel: 5.16.12-200.fc35.x86_64 gnome-session: 41.3-1.fc35 Window manager: Wayland Switcher version: 34

Additional info:

Bug description

On a new session, after opening any application, pressing the Switcher keyboard shortcut displays the Switcher search bar with no drop-down results. The search bar can be typed into, but no results appear. The search bar cannot be exited with Esc, Alt + F4, or clicking elsewhere.

Switcher remains focused regardless of where on the screen you click. The panel (top bar) items cannot be clicked.

I can enter the activities overview (list of desktop workspaces) by pressing the super key, but cannot click anything except the Switcher bar which remains overlayed over everything in the same position.

I can still focus on things using the keyboard, for example pressing super + 9 to open my 9th pinned application, and typing directly into the activities overview and pressing Enter to launch apps. Once apps are launched I can also Tab and Enter to interact with things such as item check boxes, and can use a terminal.

The only way I know to recover from this state is pressing Alt + f2 and typing in gnome-session-quit --logout --no-prompt and pressing the enter key.

Steps to reproduce

  1. Log in at the gnome login screen.
  2. Press the Switcher keyboard shortcut, observe Switcher pops up and functions correctly, closing when defocused
  3. Open an app such as gnome-calculator.
  4. Press the Switcher keyboard shortcut again, observe the Switcher search bar appear with no dropdown results, and no way to close it (even if disabling the extension).

Switcher Settings

I changed my Switcher keyboard shortcut from super + W to super + E during my troubleshooting process. image

Screenshots

smcclennon commented 2 years ago

Journal error logs

Error logs are produced when Switcher enters this "stuck" state, which can be found using journalctl --grep "switcher@landau.fi":

Mar 12 18:18:17 hostname gnome-shell[53448]: JS ERROR: ReferenceError: can't access lexical declaration 'debouncedActivateUnique' before initialization
                                           rerunFiltersAndUpdate@/home/username/.local/share/gnome-shell/extensions/switcher@landau.fi/extension.js:206:7
                                           _showUI@/home/username/.local/share/gnome-shell/extensions/switcher@landau.fi/extension.js:217:24
                                           enable/<@/home/username/.local/share/gnome-shell/extensions/switcher@landau.fi/extension.js:493:13
Mar 12 18:18:18 hostname gnome-shell[53448]: JS ERROR: ReferenceError: can't access lexical declaration 'i' before initialization
                                           showSingleBox@/home/username/.local/share/gnome-shell/extensions/switcher@landau.fi/extension.js:457:9
                                           setTimeout/<@/home/username/.local/share/gnome-shell/extensions/switcher@landau.fi/util.js:14:5

Further troubleshooting

After logging in to a new gnome session, I opened a terminal and left it alone for 2 hours. Screen saver was disabled, and the VPN killswitch prevented any internet connections. After 2 hours has passed, I pressed Ctrl + E and switcher appeared in the frozen state. This produced the error above in the journal logs again.

daniellandau commented 2 years ago

Good catch and thank you for the detailed report! I'll try to get an actual fix done as soon as possible, but as a workaround you can disable "Immediate Activation" to prevent the crash in the current versions. It only happens when you have exactly one window open and "Immediate Activation" is enabled.

ahouseago commented 1 year ago

I'm also seeing a similar thing on Fedora Workstation 36 using Gnome 42.4 but "Immediate Activation" is false, so that workaround doesn't seem to work any more.

EDIT: Just checked the error logs using journalctl and it looks like it might be due to interaction with another extension:

okt 02 13:43:46 hostname gnome-shell[2139]: JS ERROR: TypeError: dockManager is null
                                            getApps@/home/username/.local/share/gnome-shell/extensions/dash-to-dock-cosmic-@halfmexicanhalfamazing@gmail.com/locations.js:1273:9
                                            getRunningApps@/home/username/.local/share/gnome-shell/extensions/dash-to-dock-cosmic-@halfmexicanhalfamazing@gmail.com/locations.js:1283:12
                                            _ensureLocations/<@/home/username/.local/share/gnome-shell/extensions/dash-to-dock-cosmic-@halfmexicanhalfamazing@gmail.com/docking.js:1783:55
                                            _create/object[name]@/home/username/.local/share/gnome-shell/extensions/dash-to-dock-cosmic-@halfmexicanhalfamazing@gmail.com/utils.js:290:68
                                            _showUI/<@/home/username/.local/share/gnome-shell/extensions/switcher@landau.fi/extension.js:198:51
                                            _showUI@/home/username/.local/share/gnome-shell/extensions/switcher@landau.fi/extension.js:197:11
                                            enable/<@/home/username/.local/share/gnome-shell/extensions/switcher@landau.fi/extension.js:428:13

I have removed the dash-to-dock-cosmic extension mentioned in the error log. I'll update further if I encounter the permanent overlay issue again.

brettk-git commented 5 months ago

I am encountering the exact same bug, and see the same error message in the log. If you cannot fix this soon, please at least provide a way to close the Switcher window and get unstuck without having to quit the whole session.