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

Opens two applications after a restart or shutdown #2446

Closed
danielbuubble opened this issue Mar 29, 2023 · 9 comments
Closed

Opens two applications after a restart or shutdown #2446

danielbuubble opened this issue Mar 29, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@danielbuubble
Copy link

Describe the bug

When ever I turn my pc on after a restart or shutdown, the app starts itself after login because I have check marked the box. But when the app is opening itself up, it opens two of the program. I can see two icons at the menu bar, so when I am alt-tabing, the program glitches itself. And I have to manually close one program down, for it to work again properly.

Steps to reproduce the bug

  1. Shutdown PC
  2. Log in and have it automatically open after a log in
  3. Have enabled icon showing on menu bar
  4. See that two icons is showing
  5. Try Alt Tab, and you will se it glitches itself out

Your environment

  • AltTab version: 6.56.00
  • macOS version: Ventura 13.2.1
  • Other relevant info: e.g. using external keyboard, multiple monitors, etc
@danielbuubble danielbuubble added the bug Something isn't working label Mar 29, 2023
@lwouis
Copy link
Owner

lwouis commented Mar 29, 2023

The same version of AltTab can't open twice. This means that you somehow have 2 different versions of AltTab installed on your machine at once. I suggest looking in your Downloads and Applications folder to find those. You can also locate where the apps are by using Activity Monitor, as such:

image

@lwouis lwouis closed this as completed Mar 29, 2023
@danielbuubble
Copy link
Author

Screenshot 2023-03-29 at 15 36 32

Could not upload the screenrecording because the file was to big. But here is a screenshot from the recording. You sure alt tab cannot open two window of the same version? I have checked my application folder and download folder, and I can only see one app.

@lwouis
Copy link
Owner

lwouis commented Mar 29, 2023

You can try to reopen AltTab manually and you'll see that it only shows the Preferences panel. It doesn't start a new instance. Now we have seen this before: #1840 and we have no clue what in the OS triggers it.

Could you show in Activity monitor, which process is the parent of each of those AltTab instance? You can just click the rows in Activity monitor and get more info (like on my screenshot above, but first tab of the panel then).

@danielbuubble
Copy link
Author

Screenshot 2023-03-30 at 20 19 31

Is this the screenshot of what you were asking for? (Lifelong windows user that just switched to macos, sorry for the inconvenience)

@lwouis
Copy link
Owner

lwouis commented Mar 30, 2023

Thank you for your help @danielbuubble. This is what I was asking for.

Could you please open Terminal.app and paste this command?

ls ~/Library/LaunchAgents/com.lwouis*

Press return, then share the results here?

Thank you 🙇

@danielbuubble
Copy link
Author

Screenshot 2023-03-30 at 21 25 57

@lwouis
Copy link
Owner

lwouis commented Mar 30, 2023

To recap the situation:

You have the checkbox checked in AltTab's preferences to Launch At Login. This made AltTab add the file you see on the Terminal on the screenshot. Because that file is there, macOS knows to launch AltTab at Login.

Now somehow, macOS seems to have launched it twice. I have no idea why/how. Furthermore, it launched it in an abnormal way that allows for multiple instances at once.

In conclusion, unfortunately there is nothing more I can do / think of here. The other ticket is open, and we can continue the investigation there. I wish somebody more knowledgeable would intervene and tell us what's going on. It is also very possible that this is a macOS bug.

@jcoddaire
Copy link

I think I figured this out. I have alt-tab installed via homebrew, tested on both an intel i9 and M1 max macbook pros.

Mac OS 13.3.1
Alt Tab 6.56.0

The application checkbox General > Start automatically was checked. There was also a setting under System Settings > General > Login Items > Open at Login.

Therefore two instances was spawned each time the user logged in. Which results in odd, glitchy behavior.

To fix this I unchecked the Start at login box for the Alt Tab preferences, and left the "launch at login" setting for macos preferences.

Hopefully this helps someone else. This may resolve issue 1840 too, that's what led me from google to here.

@lwouis
Copy link
Owner

lwouis commented Apr 10, 2023

Thank you for sharing these findings @jcoddaire

You have been using AltTab for a long time, no? A long time ago, AltTab would add itself to the Login Items when the checkbox was checked. Then, i think around the arrival of Catalina, Apple broke that API, and AltTab moved to using another API which doesn't show the login item in the list.

What surprises me is that i added migration code, so that existing user got the Login Item removed and the new system used instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants