Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AltTab showing windows that are not open anymore on macOS Sequoia dev beta (24A5331b) #3589

Open
chadlavi opened this issue Sep 7, 2024 · 23 comments
Labels
bug Something isn't working macOS 15 macOS 15 Sequoia specific issue unreproducible Need help from the author to reproduce the issue

Comments

@chadlavi
Copy link

chadlavi commented Sep 7, 2024

Describe the bug

When I use AltTab, windows that are no longer open appear in the window switcher

Screenshots / video

Open windows What AltTab shows
Screenshot 2024-09-07 at 12 52 24 Screenshot 2024-09-07 at 12 52 43

Steps to reproduce the bug

  1. Turn on AltTab
  2. Use your computer for a while, making sure to open and close some windows
  3. Use AltTab to switch windows
  4. See windows that are no longer open in the AltTab switcher

Your environment

  • AltTab version: 6.72.0
  • macOS version: macOS Sequoia dev beta (24A5331b)
@chadlavi chadlavi added the bug Something isn't working label Sep 7, 2024
@lwouis
Copy link
Owner

lwouis commented Sep 7, 2024

Hi,

This is surprising. We usually wait until the end of macOS betas to take actions. Most bugs come and go, on Apple-side, and there is nothing to fix often after the Beta.

Let's see what happens once it's out 👍

Thank you

@lwouis lwouis added the macOS 15 macOS 15 Sequoia specific issue label Sep 7, 2024
@Allsochen
Copy link
Contributor

Thank you very much for your feedback. We usually observe whether there are bugs when the new version of Apple is stable.👍

@chadlavi
Copy link
Author

Just following up on this -- the public release of macOS Sequoia is now out, and this problem persists in AltTab. After a short period of time using it, it becomes unusably clogged with windows that are no longer open.

@leander-hass
Copy link

Hello, using the final macOS Sequoia this problem still persists. Expecially I have this problem with finder. Only quitting finder works to remove the windows. They cant be closed or showed through Alt Tab.
I hope this problem is fixed soon, thanks to the maintainer in advance!

@lwouis
Copy link
Owner

lwouis commented Sep 21, 2024

Hi,
I have updated to Sequoia, and can't reproduce this issue.
Could you please help me reproduce it?
Do you reproduce it on demand? Like if you open a Finder window, and close it, it always remain listed in AltTab?
Could you please share a video?
Thank you 🙇

@lwouis lwouis added the unreproducible Need help from the author to reproduce the issue label Sep 21, 2024
@chadlavi
Copy link
Author

chadlavi commented Sep 23, 2024

Do you reproduce it on demand? Like if you open a Finder window, and close it, it always remain listed in AltTab?

Yes that's exactly what happens. AltTab seems to keep every window that has been open while it's running.

Here is an example video. In the video I quit and restart AltTab, then confirm that only my browser (Arc) is appearing in AltTab. I then open a finder window and confirm that the finder window appears in AltTab. I then close the finder window, but it still appears in AltTab.

EDIT: GitHub is terrible about video attachments, here's a link to the video:

https://gitlab.com/-/project/61644620/uploads/b588e7f31994a1c1d7b53dcab65853cc/Screen_Recording_2024-09-22_at_22.37.49.mov

@lwouis
Copy link
Owner

lwouis commented Sep 23, 2024

Thank you @chadlavi! The video shows the bug very clearly.

It's very surprising to me because the code dealing with removing windows hasn't been touched in years. It's the essentially the same since the beginning of the project 4 years ago.

Could you please try the following?

  • Run this command in Terminal.app: /Applications/AltTab.app/Contents/MacOS/AltTab
  • Open an close a Finder window
  • Share the logs in Terminal.app here

Thank you 🙇

@geoffrobinson
Copy link

I came looking for a resolution to the same issue - this is the output after running the suggested command:

2024-09-23 06:54:13.497 AltTab[78095:1482547] +[IMKClient subclass]: chose IMKClient_Legacy
2024-09-23 06:54:13.497 AltTab[78095:1482547] +[IMKInputSession subclass]: chose IMKInputSession_Legacy

@lwouis
Copy link
Owner

lwouis commented Sep 23, 2024

Thank you @geoffrobinson
This output seems too short. Normally AltTab will print all sorts of things. It should be more like 50 lines. Could you perhaps screenshot the Terminal.app window so we can see what went wrong?
Thank you

@geoffrobinson
Copy link

geoffrobinson commented Sep 24, 2024

CleanShot 2024-09-23 at 18 08 31@2x
Here's the screenshot.

Running the command re-prompted authorization in System Settings. AltTab already had the required permissions toggled on, but I removed them, restarted the app and then re-added the required permissions.

I haven't noticed the issue recurring yet. I'll repost if it does.

Edit - issue persists

@chadlavi
Copy link
Author

@lwouis I see the same thing in Terminal as @geoffrobinson. This problem with permissions was happening all along with the macOS Sequoia betas. It doesn't happen when I open AltTab normally, but I get stuck when trying to actually run the binary from Terminal like this. The permission toggles are already turned on when I go to Settings, but even turning them off and on again I can't get AltTab to think it has permissions when run directly from the Terminal.

Unlike Geoff, after trying to toggle the permissions I am still seeing the bug with ghost windows showing in AltTab happening.

@lwouis
Copy link
Owner

lwouis commented Sep 24, 2024

Thank you

I think that when running AltTab from the Terminal, you need to give permissions to the Terminal.

Could you please share the logs after the app is running and you open then close a Finder window?

Thank you

@mayur491
Copy link

mayur491 commented Sep 24, 2024

I ran the command on terminal -> then I opened finder on Alfred -> then closed the finder window (nothing got printed on this close action on terminal) -> then selected terminal window again.

➜  ~ /Applications/AltTab.app/Contents/MacOS/AltTab
"Current space" 1
"Adding app" 479 "com.apple.loginwindow"
"Adding app" 971 "com.apple.WindowManager"
"Adding app" 969 "com.apple.coreservices.uiagent"
"Adding app" 1000 "com.apple.talagent"
"Adding app" 973 "com.apple.backgroundtaskmanagement.agent"
"Adding app" 988 "com.apple.CoreLocationAgent"
"Adding app" 1030 "com.apple.AppSSOAgent"
"Adding app" 1046 "com.google.Chrome"
"Adding app" 1042 "com.apple.notificationcenterui"
"Adding app" 1098 "com.apple.ScreenContinuity"
"Adding app" 1103 "com.apple.dock"
"Adding app" 1104 "com.apple.controlcenter"
"Adding app" 1106 "com.apple.systemuiserver"
"Adding app" 1113 "com.apple.wallpaper.agent"
"Adding app" 1108 "com.apple.finder"
"Adding app" 1142 "com.apple.Spotlight"
"Adding app" 1114 "com.apple.universalcontrol"
"Adding app" 998 "com.apple.wifi.WiFiAgent"
"Adding app" 1133 "com.apple.security.Keychain-Circle-Notification"
"Adding app" 1234 "com.apple.LocalAuthentication.UIAgent"
"Adding app" 1408 "com.sindresorhus.One-Thing"
"Adding app" 1389 "com.apple.AirPlayUIAgent"
"Adding app" 1393 "com.apple.TextInputMenuAgent"
"Adding app" 1381 "com.apple.Siri"
"Adding app" 1410 "eu.exelban.Stats"
"Adding app" 1414 "org.p0deje.Maccy"
"Adding app" 1420 "com.lujjjh.LinearMouse"
"Adding app" 1428 "com.knollsoft.Rectangle"
"Adding app" 1412 "com.apple.TextInputSwitcher"
"Adding app" 1443 "com.figma.agent"
"Adding app" 1447 "com.runningwithcrayons.Alfred"
"Adding app" 1397 "com.paloaltonetworks.cortex.agent"
"Adding app" 1376 "com.websense.endpoint.helper"
"Adding app" 1483 "com.dwarvesv.minimalbar"
"Adding app" 1508 "com.apple.SoftwareUpdateNotificationManager"
"Adding app" 1766 "com.google.drivefs"
"Adding app" 2025 "com.tinyspeck.slackmacgap"
"Adding app" 3805 "com.tinyspeck.slackmacgap.helper"
"Adding app" 3855 "com.apple.accessibility.universalAccessAuthWarn"
"Adding app" 1394 "com.amazon.codewhisperer"
"Adding app" 3836 "com.vmware.assist.core"
"Adding app" 4188 "com.apple.PasswordManagerBrowserExtensionHelper"
"Adding app" 4257 "com.apple.PasswordManagerBrowserExtensionHelper"
"Adding app" 4354 "com.google.Chrome.helper.plugin"
"Adding app" 4793 "com.airwatch.mac.agent"
"Adding app" 7152 "com.apple.AquaAppearanceHelper"
"Adding app" 9450 "com.apple.nbagent"
"Adding app" 16097 "com.apple.mail"
"Adding app" 16648 "com.googlecode.iterm2"
"Adding app" 20252 "com.apple.UserNotificationCenter"
"Adding app" 21395 "com.lwouis.alt-tab-macos"
"Accessibility event" "AXFocusedWindowChanged" "Alfred"
"Accessibility event" "AXWindowCreated" "Alfred"
"Accessibility event" "AXMainWindowChanged" "Finder"
"Accessibility event" "AXFocusedWindowChanged" "Finder"
"Accessibility event" "AXApplicationActivated" "Finder"
"Adding window" 4288 "/Applications/AltTab.app/Contents/MacOS/AltTab" "com.googlecode.iterm2"
"Adding window" 90 "iPhone Mirroring" "com.apple.ScreenContinuity"
"Accessibility event" "AXFocusedWindowChanged" "Downloads"
"Accessibility event" "AXFocusedWindowChanged" "Finder"
"Accessibility event" "AXMainWindowChanged" "Downloads"
"Accessibility event" "AXMainWindowChanged" "Finder"
"Accessibility event" "AXWindowCreated" "Downloads"
"Adding window" 4797 "Downloads" "com.apple.finder"
"Accessibility event" "AXTitleChanged" "Documents"
"Accessibility event" "AXApplicationActivated" "iTerm2"

@lwouis
Copy link
Owner

lwouis commented Sep 24, 2024

Thank you @mayur491

It is very surprising. Here's how it looks on my machine, for comparison. I've highlighted the lines about the window being closed, in bold:

"Accessibility event" "AXFocusedWindowChanged" "lwouis"
"Accessibility event" "AXMainWindowChanged" "lwouis"
"Accessibility event" "AXWindowCreated" "lwouis"
"Accessibility event" "AXApplicationActivated" "Finder"
"Adding window" 3301 "lwouis" "com.apple.finder"
"Accessibility event" "AXFocusedWindowChanged" "Finder"
"Accessibility event" "AXMainWindowChanged" "Finder"
"Accessibility event" "AXUIElementDestroyed" "nil"
"Deinit window" "lwouis" "com.apple.finder"

"Accessibility event" "AXFocusedWindowChanged" "Finder"
"Accessibility event" "AXMainWindowChanged" "Finder"
"Accessibility event" "AXApplicationActivated" "Terminal"

I find it crazy that the event **"Accessibility event" "AXUIElementDestroyed" "nil" isn't printing on your setup.

It seems that people have reported similar issues on the yabai project. Here they point at Contexts as the root cause. Do you use Contexts perhaps?

Thank you

@mayur491
Copy link

I don't use Contexts, but I identified AmazonQ as the cause of the problem. Once I closed AmazonQ and restarted AltTab, it started working as expected. Thanks!!

@lwouis
Copy link
Owner

lwouis commented Sep 24, 2024

Good news 🎊
@chadlavi @leander-hass @geoffrobinson do you also have an such an app creating the problem on your system?

I find it a bit crazy that another app can make it so AltTab doesn't receive Accessibility Events from the OS. It's clearly a macOS regression introduced with Sequoia. I hope Apple fixes that shortly.

@chadlavi
Copy link
Author

Wow, I do actually have Amazon Q. Weird and a bit concerning that it could cause this kind of problems.

I just deleted Amazon Q and restarted my mac, and now I am not able to reproduce this bug.

@chadlavi
Copy link
Author

Note though that even without Amazon Q, I still can't run AltTab directly from the terminal because it doesn't think it has permissions when run that way (even though the permissions are already toggled on).

@mayur491
Copy link

@chadlavi When running the command from the terminal, you need to toggle permissions for the terminal (ex. iterm), along with AltTab. This worked for me.

@lwouis
Copy link
Owner

lwouis commented Sep 24, 2024

Please note that running AltTab from the Terminal is only to get debug logs. If the issue was from Amazon Q, and you stopped it, then you can go back to running AltTab normally. No need to run from the Terminal if there is no debugging going on 👍

@chadlavi
Copy link
Author

chadlavi commented Sep 24, 2024 via email

@SindreMA
Copy link

SindreMA commented Sep 25, 2024

I've experience this as well, but I don't use Amazon Q or Contexts.

As a temp fix i've just setup a script that just restarts alt tab every 3 min. It doesn't remove the issue, but it makes it less annoying as the closed windows don't stack up anymore.

#!/bin/bash

while true
do
    # Kill AltTab if it's running
    pkill AltTab

    # Wait for a second before restarting
    sleep 1

    # Restart AltTab
    open -a "AltTab"

    # Wait 60 seconds before repeating
    sleep 180
done

@geoffrobinson
Copy link

I wasn't running Amazon Q or Contexts, but Sidebar was causing my issue with AltTab. As long as Sidebar is not running, then AltTab works as designed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macOS 15 macOS 15 Sequoia specific issue unreproducible Need help from the author to reproduce the issue
Projects
None yet
Development

No branches or pull requests

7 participants