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

macOS Ventura seems to have broken assh #72

Open
durzel opened this issue Oct 25, 2022 · 6 comments
Open

macOS Ventura seems to have broken assh #72

durzel opened this issue Oct 25, 2022 · 6 comments

Comments

@durzel
Copy link

durzel commented Oct 25, 2022

Hi,

My SSH workflow is no longer work since upgrading to macOS Ventura (Intel). I have tried deleting and reinstalling the workflow, clearing Alfreds cache, with no success.

The debugger doesn't give much useful information - it appears the "assh" helper is killed as soon as it is executed. Possibly falling foul of some new System Integrity Protection?

[14:39:01.602] Secure SHell[Script Filter] Queuing argument ''
[14:39:01.624] Secure SHell[Script Filter] Script with argv '' finished
[14:39:01.628] ERROR: Secure SHell[Script Filter] Code 137: /Users/daz/Library/Caches/com.runningwithcrayons.Alfred/Workflow Scripts/81D2EFF4-B155-4382-A166-E37561597653: line 2: 17371 Killed: 9               ./assh search "$1"

I tried dtrace'ing the executable but didn't get any useful info out of it.

@nigelm
Copy link

nigelm commented Oct 26, 2022

Seeing the same issue. Also after delete/reinstall of the workflow (which also required the assh helper to be reenabled - dialog after open in Finder).

@durzel
Copy link
Author

durzel commented Oct 28, 2022

Looking in the Console reveals that assh is being terminated by the kernel for a EXC_GUARD violation.

assh appears to be used by the workflow to search for SSH connections to be used.

"exception" : {"port":3418,"signal":"SIGKILL","guardId":0,"codes":"0x0000000000000d5a, 0x0000000000000000","violations":["INVALID_OPTIONS"],"message":"mach_msg_trap() called with msgh_id 3418. The trap is not allowed on this platform.","subtype":"GUARD_TYPE_MACH_PORT","type":"EXC_GUARD","rawCodes":[3418,0]},

Exception Type:        EXC_GUARD (SIGKILL)
Exception Codes:       GUARD_TYPE_MACH_PORT
Exception Codes:       0x0000000000000d5a, 0x0000000000000000

Termination Reason:    Namespace GUARD, Code 2305843022098599258 

@durzel
Copy link
Author

durzel commented Oct 28, 2022

@deanishe Any thoughts on this?

@durzel
Copy link
Author

durzel commented Nov 3, 2022

@nigelm I ended up solving this myself by downloading the source code and building the assh binary myself using Go. This was built on an Intel MacBook Pro, so possibly won't work on an Apple Silicon one.

The rebuilt file fixes the workflow and everything works as pre-Ventura. I have attached it to this comment, you just need to overwrite the assh binary in the workflow directory (search for assh in Finder).

Alternatively if you do not feel comfortable running a random binary, simply install the Go build tools with Homebrew and then go build cmd/assh/assh.go in the source directory, and then copy it across to wherever your Alfred install has saved the workflow.

assh.zip

@RyanLu99
Copy link

thanks a lot🙏

@nigelm
Copy link

nigelm commented Jan 14, 2023

Finally got around to testing this (had muddled through with the other ssh workflow which is nowhere near as nice as this one). The fix from @durzel worked.

The only things I would add:-

  • Make sure you clone the repo to build assh - the source distribution does not include the go.mod (and possibly other files)
  • You can build a Universal binary (I suspect the original wasn't Universal, so I guess M1 works fine if you have previously put Rosetta on there) - the way I did it is below, but taken from https://dev.to/thewraven/universal-macos-binaries-with-go-1-16-3mm3
$ git clone https://github.com/deanishe/alfred-ssh
$ cd alfred-ssh
$ GOOS=darwin GOARCH=amd64 go build -o assh_amd64 cmd/assh/assh.go
$ GOOS=darwin GOARCH=arm64 go build -o assh_arm64 cmd/assh/assh.go
$ lipo -create -output assh assh_*

This gives you a Universal binary named assh

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

3 participants