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 · 33 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.

@CNSCSQ
Copy link

CNSCSQ commented Oct 8, 2024

I have the same problem, when I use the software Wispr Flow, it applies an auxiliary function, which causes most of the windows to be always recorded in the altTab, when I disable the auxiliary function of the program or close the software it reproduces the problem, I have to choose one or the other!
image

@mukreb
Copy link

mukreb commented Oct 9, 2024

I have the same problem, but for it's conflicting with ubar (https://ubarapp.com/), a Dock replacement

@ppwwyyxx
Copy link

ppwwyyxx commented Oct 18, 2024

I have the same problem where it's conflicting with Phoenix

yabai seems to have implemented a workaround: koekeishiya/yabai@6f9006d

@s235784
Copy link

s235784 commented Oct 18, 2024

I noticed alt-tab still shows closed Finder windows, even after I’ve closed them. However, I found that turning off 'Show tabs as windows' in the custom style settings resolves the issue.

@oldpiano
Copy link

I noticed alt-tab still shows closed Finder windows, even after I’ve closed them. However, I found that turning off 'Show tabs as windows' in the custom style settings resolves the issue.

That’s the answer! Thank you! I solved it thanks to you! 👍

@juan-pascale
Copy link

I noticed alt-tab still shows closed Finder windows, even after I’ve closed them. However, I found that turning off 'Show tabs as windows' in the custom style settings resolves the issue.

This also solved the issue for me! Thanks

@lwouis
Copy link
Owner

lwouis commented Oct 18, 2024

Hi,

I don't understand how it could connect to tabs. The root cause as far as I can tell is that macOS is not sending AltTab the accessibility events when some windows are destroyed.

I saw that yabai seems to have implemented Sequoia-specific workarounds. However it uses new private APIs I'm not familiar with. These could require the Dock injection that yabai does. If it's the case, it would be impossible for AltTab to use the technique. I asked a question about the private APIs here.

Thank you 🙇

@PEZ
Copy link

PEZ commented Dec 13, 2024

I have this in VS Code and Brave too. (And probably a lot of other apps, but these are the ones where I close windows all the time.) Or, I should say had. Disabling “Show standard tabs as windows” in custom thumbnail style settings solved it for me. Seems I don't need that to be enabled anyway, but I guess I may know better after some use.

@mukreb
Copy link

mukreb commented Dec 13, 2024

I have this in VS Code and Brave too. (And probably a lot of other apps, but these are the ones where I close windows all the time.) Or, I should say had. Disabling “Show standard tabs as windows” in custom thumbnail style settings solved it for me. Seems I don't need that to be enabled anyway, but I guess I may know better after some use.

I tried this too here, and not sure why but for me it indeed solved it too, nice!

@dawidKurek
Copy link

For me Swift Quit was causing problem. Finally i found solution (i'm so happy). The AltTab app is amazing, I waited for update to fix the bug, but it wasn't the app problem. In my case problem occurred after update MacOS to 15

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