nikitabobko / AeroSpace

AeroSpace is an i3-like tiling window manager for macOS
https://nikitabobko.github.io/AeroSpace/guide
MIT License
5.64k stars 89 forks source link

Aerospace won't launch #436

Open talanb opened 3 weeks ago

talanb commented 3 weeks ago

I am unable to launch Aerospace successfully. I've tried it on two different computers (work and home), both running MacOS Sonoma 14.6.1 (23G93).

I am using an unmodified version of the default config at ~/.aerospace.toml

I usually launch using Alfred, but I also tried to open directly from the Finder.

I've included an extract from my launchd.log where Aerospace is trying to start. The error (I think) is 2024-08-20 11:42:58.340459 (gui/502 [100013]) <Notice>: Bootout by launchctl[45675] for <private> failed (2: No such file or directory)

2024-08-20 11:42:58.250156 (gui/502/application.bobko.aerospace.94971040.94971045) <Notice>: internal event: WILL_SPAWN, code = 0
2024-08-20 11:42:58.250166 (gui/502/application.bobko.aerospace.94971040.94971045) <Notice>: service state: spawn scheduled
2024-08-20 11:42:58.250166 (gui/502/application.bobko.aerospace.94971040.94971045) <Notice>: service state: spawning
2024-08-20 11:42:58.250176 <Notice>: Coalition Cache Hit: app<application.bobko.aerospace.94971040.94971045(502)> [17202]
2024-08-20 11:42:58.250189 (gui/502/application.bobko.aerospace.94971040.94971045) <Notice>: launching: launch job demand
2024-08-20 11:42:58.251200 (gui/502/application.bobko.aerospace.94971040.94971045 [45674]) <Notice>: xpcproxy spawned with pid 45674
2024-08-20 11:42:58.251212 (gui/502/application.bobko.aerospace.94971040.94971045 [45674]) <Notice>: internal event: SPAWNED, code = 0
2024-08-20 11:42:58.251213 (gui/502/application.bobko.aerospace.94971040.94971045 [45674]) <Notice>: service state: xpcproxy
2024-08-20 11:42:58.251234 (gui/502/application.bobko.aerospace.94971040.94971045 [45674]) <Notice>: internal event: SOURCE_ATTACH, code = 0
2024-08-20 11:42:58.274656 (gui/502/application.bobko.aerospace.94971040.94971045 [45674]) <Notice>: service state: running
2024-08-20 11:42:58.274670 (gui/502/application.bobko.aerospace.94971040.94971045 [45674]) <Notice>: internal event: INIT, code = 0
2024-08-20 11:42:58.274673 (gui/502/application.bobko.aerospace.94971040.94971045 [45674]) <Notice>: job state = running
2024-08-20 11:42:58.274706 (gui/502/application.bobko.aerospace.94971040.94971045 [45674]) <Notice>: Successfully spawned AeroSpace[45674] because launch job demand
2024-08-20 11:42:58.297597 (pid/45674 [AeroSpace]) <Notice>: uncorking exec source upfront
2024-08-20 11:42:58.297623 (pid/45674 [AeroSpace]) <Notice>: created
2024-08-20 11:42:58.340459 (gui/502 [100013]) <Notice>: Bootout by launchctl[45675] for <private> failed (2: No such file or directory)
2024-08-20 11:42:58.383509 (pid/45674 [AeroSpace]) <Notice>: shutting down
2024-08-20 11:42:58.383535 (pid/45674 [AeroSpace]) <Notice>: cleaning up
2024-08-20 11:42:58.383624 (gui/502/application.bobko.aerospace.94971040.94971045 [45674]) <Notice>: exited due to exit(0), ran for 132ms
2024-08-20 11:42:58.383627 (gui/502/application.bobko.aerospace.94971040.94971045 [45674]) <Notice>: service state: exited
2024-08-20 11:42:58.383634 (gui/502/application.bobko.aerospace.94971040.94971045 [45674]) <Notice>: internal event: EXITED, code = 0
2024-08-20 11:42:58.383636 (gui/502/application.bobko.aerospace.94971040.94971045 [45674]) <Notice>: job state = exited
2024-08-20 11:42:58.383665 (gui/502 [100013]) <Notice>: service inactive: application.bobko.aerospace.94971040.94971045
2024-08-20 11:42:58.383669 (gui/502/application.bobko.aerospace.94971040.94971045 [45674]) <Notice>: service state: not running
2024-08-20 11:42:58.383714 (system) <Notice>: removing child: pid/45674
2024-08-20 11:42:58.384694 (gui/502/application.bobko.aerospace.94971040.94971045) <Notice>: removing job: caller = runningboardd
2024-08-20 11:42:58.384706 (gui/502 [100013]) <Notice>: removing service: application.bobko.aerospace.94971040.94971045
2024-08-20 11:42:58.384715 (gui/502/application.bobko.aerospace.94971040.94971045) <Notice>: internal event: PETRIFIED, code = 0
2024-08-20 11:42:58.384718 (gui/502/application.bobko.aerospace.94971040.94971045) <Notice>: job state = removed
2024-08-20 11:43:01.938533 (gui/502/application.bobko.aerospace.94971040.94971045) <Notice>: internal event: WILL_SPAWN, code = 0
2024-08-20 11:43:01.938543 (gui/502/application.bobko.aerospace.94971040.94971045) <Notice>: service state: spawn scheduled
2024-08-20 11:43:01.938544 (gui/502/application.bobko.aerospace.94971040.94971045) <Notice>: service state: spawning
2024-08-20 11:43:01.938554 <Notice>: Coalition Cache Hit: app<application.bobko.aerospace.94971040.94971045(502)> [17202]
2024-08-20 11:43:01.938567 (gui/502/application.bobko.aerospace.94971040.94971045) <Notice>: launching: launch job demand
2024-08-20 11:43:01.939083 (gui/502/application.bobko.aerospace.94971040.94971045 [45731]) <Notice>: xpcproxy spawned with pid 45731
2024-08-20 11:43:01.939099 (gui/502/application.bobko.aerospace.94971040.94971045 [45731]) <Notice>: internal event: SPAWNED, code = 0
2024-08-20 11:43:01.939101 (gui/502/application.bobko.aerospace.94971040.94971045 [45731]) <Notice>: service state: xpcproxy
2024-08-20 11:43:01.939127 (gui/502/application.bobko.aerospace.94971040.94971045 [45731]) <Notice>: internal event: SOURCE_ATTACH, code = 0
2024-08-20 11:43:01.958240 (gui/502/application.bobko.aerospace.94971040.94971045 [45731]) <Notice>: service state: running
2024-08-20 11:43:01.958249 (gui/502/application.bobko.aerospace.94971040.94971045 [45731]) <Notice>: internal event: INIT, code = 0
2024-08-20 11:43:01.958251 (gui/502/application.bobko.aerospace.94971040.94971045 [45731]) <Notice>: job state = running
2024-08-20 11:43:01.958273 (gui/502/application.bobko.aerospace.94971040.94971045 [45731]) <Notice>: Successfully spawned AeroSpace[45731] because launch job demand
2024-08-20 11:43:01.973000 (pid/45731 [AeroSpace]) <Notice>: uncorking exec source upfront
2024-08-20 11:43:01.973035 (pid/45731 [AeroSpace]) <Notice>: created
2024-08-20 11:43:02.026798 (gui/502 [100013]) <Notice>: Bootout by launchctl[45732] for <private> failed (2: No such file or directory)
2024-08-20 11:43:02.069333 (pid/45731 [AeroSpace]) <Notice>: shutting down
2024-08-20 11:43:02.069346 (pid/45731 [AeroSpace]) <Notice>: cleaning up
2024-08-20 11:43:02.069399 (gui/502/application.bobko.aerospace.94971040.94971045 [45731]) <Notice>: exited due to exit(0), ran for 129ms
2024-08-20 11:43:02.069401 (gui/502/application.bobko.aerospace.94971040.94971045 [45731]) <Notice>: service state: exited
2024-08-20 11:43:02.069404 (gui/502/application.bobko.aerospace.94971040.94971045 [45731]) <Notice>: internal event: EXITED, code = 0
2024-08-20 11:43:02.069405 (gui/502/application.bobko.aerospace.94971040.94971045 [45731]) <Notice>: job state = exited
2024-08-20 11:43:02.069417 (gui/502 [100013]) <Notice>: service inactive: application.bobko.aerospace.94971040.94971045
2024-08-20 11:43:02.069418 (gui/502/application.bobko.aerospace.94971040.94971045 [45731]) <Notice>: service state: not running
2024-08-20 11:43:02.069420 (system) <Notice>: removing child: pid/45731
2024-08-20 11:43:02.079363 (gui/502/application.bobko.aerospace.94971040.94971045) <Notice>: removing job: caller = runningboardd
2024-08-20 11:43:02.079378 (gui/502 [100013]) <Notice>: removing service: application.bobko.aerospace.94971040.94971045
2024-08-20 11:43:02.079389 (gui/502/application.bobko.aerospace.94971040.94971045) <Notice>: internal event: PETRIFIED, code = 0
2024-08-20 11:43:02.079393 (gui/502/application.bobko.aerospace.94971040.94971045) <Notice>: job state = removed

Checklist

aerospace --version aerospace CLI client version: 0.14.1-Beta 5861e85b65cb7dc914a0a68027c56e2bc90510fd AeroSpace.app server version: Unknown. The server is not running

nikitabobko commented 3 weeks ago

Blind guess: put start-at-login = true in your config

But I don't yet understand what's happening

talanb commented 3 weeks ago

Thanks for the guess! I updated my config to include start-at-login = true, restarted my computer and tried to run Aerospace.app and I got the same result.

ay18 commented 3 weeks ago

I'm running into a similar issue, adding start-at-login = true is causing Aerospace to no longer be able to open until I reinstall it, similar to this https://github.com/nikitabobko/AeroSpace/issues/167

image

edit: Please lmk if there are any helpful logs I can provide, initially commented during midnight hours and didn't dive too deeply.

jakenvac commented 2 weeks ago

I don't think the bootout line in your log is the problem. There is an unrelated(?) bug that I can't quite articulate yet to raise an issue, where the app tries to 'unload' the launch agent on startup if start-at-login is false in your config. (which it is in the default config). Both the code to register and unregister the service are broken.

Anyway, that's for another time. Let's see if I can help you debug.

Curiously, the fact aerospace is in your launchd logs means the app bundle is at least executing to a point. (launchd will also manage mac os 'apps' throughout their lifecycle afaik)

Firstly, can you make sure you don't have any existing agents/instances running for aerospace:

In your terminal can you first run:

launchctl list | grep bobko.aerospace

If you don't see anything, great. Otherwise, you might have something that looks like this (could be more than one line):

23465   0       application.bobko.aerospace.89834155.120171650

For each line in the result, take the right hand part and stop the agent with:

# in this case, this is just my running instance, not the startup agent
launchctl stop application.bobko.aerospace.89834155.120171650

That'll make sure there are no agents running, left over from you previously launching.

Next, you can run aerospace from your terminal and if it throws any errors you should get some useful output. (You might need to grant your terminal accessibility permissions and run aerospace again)

/Applications/AeroSpace.app/Contents/MacOS/AeroSpace

You will probably see:

Unload failed: Input/output error

This is the bug I mentioned before, so you can ignore this for now. If the app is crashing I would expect you to see more errors.

As well, how did you install aerospace?

Can I also ask, did you replace some text in your logs with <private> for privacy reasons or is that how the logs were? My logs of the same error show the path to the plist where yours say .