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

hs.spaces.removeSpace fails #3644

Open
acheronfail opened this issue Jun 7, 2024 · 1 comment
Open

hs.spaces.removeSpace fails #3644

acheronfail opened this issue Jun 7, 2024 · 1 comment

Comments

@acheronfail
Copy link

acheronfail commented Jun 7, 2024

I've noticed that hs.spaces.removeSpace doesn't work for me, some details:

  • macOS 14.5
  • Hammerspoon 0.9.100

Here's an easy way to reproduce the error:

-- this is run directly in the hammerspoon console (ensure you have more than one space):
> for _, spaces in pairs(hs.spaces.allSpaces()) do
  hs.spaces.gotoSpace(spaces[1])
  hs.spaces.removeSpace(spaces[2])
end
-- ...merspoon.app/Contents/Resources/extensions/hs/spaces.lua:882: attempt to index a nil value (local 'child')
-- stack traceback:
-- 	...merspoon.app/Contents/Resources/extensions/hs/spaces.lua:882: in function 'hs.spaces.removeSpace'
-- 	[string "for _, spaces in pairs(hs.spaces.allSpaces())..."]:3: in main chunk
-- 	[C]: in function 'xpcall'
-- 	...poon.app/Contents/Resources/extensions/hs/_coresetup.lua:525: in function <...poon.app/Contents/Resources/extensions/hs/_coresetup.lua:505>

I've tried increasing hs.spaces.MCwaitTime, but I have a sneaking suspicion that this has something to do with #3636, perhaps something was changed in macOS 14.5?

FWIW, I've also checked out and built #3638, and the issue also occurs with that version, too. 😢

@godexsoft
Copy link

Also experiencing the same issue after upgrading to latest MacOS. Scripts did not change, hammerspoon version same as before. Something must have changed in MacOS itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants