yabai: cannot focus space due to an error with the scripting-addition

macOS version 11.1

csrutil status output is System Integrity Protection status: disabled

already tried reinstall scripting-addition sudo yabai --uninstall-sa && sudo yabai --install-sa

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 5
  • Comments: 25 (2 by maintainers)

Most upvoted comments

Still seeing this issue on Ventura 13.2.1: yabai-v5.0.2 & SIP disabled (only need the ability to focus spaces that are created manually).

  • Created yabai-cert as per instructions in the wiki
  • Used brew to install from HEAD
  • Could NOT find yabai installed in /usr/local/bin as per the wiki instructions. Codesigned yabai here instead:
> codesign -fs 'yabai-cert' /opt/homebrew/bin/yabai
> codesign -fs 'yabai-cert' /opt/brew/Cellar/yabai/HEAD-147b356/bin/yabai
  • Provided accessibility permission to the executables at /opt/brew/bin/yabai/ and /opt/brew/Cellar/yabai/HEAD-147b356/bin/yabai since there was nothing in the local bin.

Issue:

> yabai -m space --focus next   
cannot focus space due to an error with the scripting-addition.

Moving windows to open spaces is working however.

Is there anything wrong here, or something else that I can try? Please let me know.

After sudo yabai --install-sa, did you run sudo yabai --load-sa manually? If not, try to run it.

I encountered this error after running a brew upgrade. Re-checking the output of shasum -a 256 $(which yabai) showed that a new sha256 hash had been generated. Updating /private/etc/sudoers.d/yabai to replace the old sha256 with it fixed this.

I’m getting “cannot focus space due to an error with the scripting-addition” on Ventura.

same problem ^ but on Monterey 12.2

For anyone who comes along, try running sudo yabai --load-sa. For later versions of macOS this should work.

I am facing the same issue:

yabai -m space --focus next                                08:48:42
cannot focus space due to an error with the scripting-addition.

Apple Silicon Ventura 13.5 yabai-v5.0.6 (installed from brew) SIP status:

System Integrity Protection status: unknown (Custom Configuration).

Configuration:
	Apple Internal: disabled
	Kext Signing: enabled
	Filesystem Protections: disabled
	Debugging Restrictions: disabled
	DTrace Restrictions: enabled
	NVRAM Protections: disabled
	BaseSystem Verification: enabled
	Boot-arg Restrictions: disabled
	Kernel Integrity Protections: enabled
	Authenticated Root Requirement: enabled

I’m getting “cannot focus space due to an error with the scripting-addition” on Ventura.

Same with me on Ventura.

It’s fixed in the development version. https://github.com/koekeishiya/yabai/commit/206c0d6968210f48363f206526760e5750810a61 with https://github.com/koekeishiya/yabai/issues/1297 as context.

You can install the development version by following the wiki. https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(from-HEAD). You’ll be asked by homebrew to unlink the previous yabai, but after that and following the instructions on the wiki it works like a charm again. Don’t forget to update the sha256 for the new binary.

I am facing the same issue:我面临着同样的问题:

yabai -m space --focus next                                08:48:42
cannot focus space due to an error with the scripting-addition.

Apple Silicon 苹果硅 Ventura 13.5  文图拉13.5 yabai-v5.0.6 (installed from brew) yabai-v5.0.6(从brew安装) SIP status:  SIP 状态:

System Integrity Protection status: unknown (Custom Configuration).

Configuration:
	Apple Internal: disabled
	Kext Signing: enabled
	Filesystem Protections: disabled
	Debugging Restrictions: disabled
	DTrace Restrictions: enabled
	NVRAM Protections: disabled
	BaseSystem Verification: enabled
	Boot-arg Restrictions: disabled
	Kernel Integrity Protections: enabled
	Authenticated Root Requirement: enabled

may be you should use yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa" sudo yabai --load-sa

in https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(latest-release)#configure-scripting-addition says

I still have this issue (MAC os 11.7.10) with SIP disabled. sudo yabai --load-sa doesn’t fix it.

Don’t forget to update the sha256 for the new binary.

This solved it for me: updating the sha256 hash in the sudoers file for yabai to match the latest installed binary.

https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(latest-release)#configure-scripting-addition

Updated wiki.

I encountered this error after running a brew upgrade. Re-checking the output of shasum -a 256 $(which yabai) showed that a new sha256 hash had been generated. Updating /private/etc/sudoers.d/yabai to replace the old sha256 with it fixed this.

Should this case be also listed in the wiki?