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

"The command terminated due to receipt of a signal." #159

Open
2oh1 opened this issue Oct 5, 2022 · 15 comments
Open

"The command terminated due to receipt of a signal." #159

2oh1 opened this issue Oct 5, 2022 · 15 comments
Labels

Comments

@2oh1
Copy link

2oh1 commented Oct 5, 2022

I bought a new Mac. Now, any of my scripts that use Cliclick return this error: "The command terminated due to receipt of a signal." number 1009

If I try to execute the command directly in Terminal, I get this response: zsh: killed cliclick

I'm using a brand new Mac Studio running Mac OS 12.6

@BlueM
Copy link
Owner

BlueM commented Oct 9, 2022

What cliclick version is it, was it installed thru Homebrew, MacPorts oder via download? What happens when you run it directly in Terminal (not from a script)?

@BlueM BlueM added the question label Oct 9, 2022
@2oh1
Copy link
Author

2oh1 commented Oct 9, 2022 via email

@BlueM
Copy link
Owner

BlueM commented Oct 12, 2022

Possibly a permission issue. Try right-clicking cliclick’s icon (despite the fact that it’s a Terminal application) and choose “Open …” from the contextual menu. I don’t have a Mac with a Silicon CPU myself, but I’ve been told that the first time doing so, macOS won’t allow opening it (and only display a warning along the lines of “macOS cannot verify the integrity of this app“), but upon second attempt, the dialog which shows up will contain an “Open” button.

@2oh1
Copy link
Author

2oh1 commented Oct 18, 2022

"I’ve been told that the first time doing so, macOS won’t allow opening it (and only display a warning along the lines of “macOS cannot verify the integrity of this app“), but upon second attempt, the dialog which shows up will contain an “Open” button."

That's correct. I had to do that before I could get Cliclick to launch the first time. It doesn't have anything to do with it being an M1 Mac though. It's just Apple's way of making the user confirm an unknown app.

If I right-click Cliclick and select "Open" it opens a Terminal window which says this:

cliclick ; exit;
zsh: killed

Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

@BlueM
Copy link
Owner

BlueM commented Oct 23, 2022

Well … the fact that your Mac has a M1 CPU is relevant insofar, as you have to use the contextual menu twice, while on Intel it works upon first attempt.

Regarding your problem: I don’t really have an explanation for this. Do you find any relevant output in Console.app? Maybe something along the lines of Security policy would not allow process: 34921, /Users/cb/Downloads/cliclick/cliclick?

@2oh1
Copy link
Author

2oh1 commented Oct 23, 2022

That's exactly it:

ASP: Security policy would not allow process

If I select cliclick and Get Info, under Sharing & Permissions it says:

You can read and write

Next to my username, in the Get Into window, it says (Me) "Read & Write." For "staff" and "everyone" it says "Read Only"

@2oh1
Copy link
Author

2oh1 commented Nov 16, 2022

UPDATE: I gave up on using the downloadable cliclick and installed it using homebrew. The homebrew install works.

While trying to find a solution to this issue, I found someone else who was experiencing it too: ["zsh: kills my binary?"

@macmesupport
Copy link

macmesupport commented May 3, 2024

I have the same issue it is killed with 9 every time. I downloaded a fresh version (last time I used it in 2022, version 5.0.1 and that worked, but probably on an Intel Mac, not sure though) and with the new version I got the std messages, on the first attempt: "cannot be started, it is from an unidentified dev" or alike, I went to system settings (Sonoma), Security and it was there, with the button "allow", I did, now it created a popup "are you sure you want to open it", and clicked open, and it got killed again. If I right click and open, it has the same result as 2oh1 reported. It does have an xattr apple.com.quarantene which I removed, but it is still killed. And I see in the console the "default 12:50:39.321850+0200 kernel ASP: Security policy would not allow process: 79805, /Users/macme/Downloads/cliclick new/cliclick" I would appreciate any help.

@DavidMBrown
Copy link

I received the message "zsh:killed". I resolved it by giving cliclick Accessibility access in System Settings > Privacy & Security.

@macmesupport
Copy link

Thanks David, did not help.
MBMBAir:cliclick new macme$ ./cliclick -h
Killed: 9
I'm always getting 9
Console again returned
default 21:55:02.809787+0200 kernel ASP: Security policy would not allow process: 84519, /Users/macme/Downloads/cliclick new/cliclick

@DavidMBrown
Copy link

Something just occurred to me. If my memory is correct, I also needed to give Accessibility permission to Terminal.
Also, you might try removing cliclick, resetting all its permissions with tccutil, followed by reinstalling, giving Accessibility permission before running cliclick, and running cliclick by right clicking on it and selecting Open from the contextual menu that appears. Lastly, cliclick's location might be an issue; I have it in /usr/local/bin. I hope one of these works for you.

@macmesupport
Copy link

Hello David, as far as I remember, there was no installation, just an archive which I unpacked. I gave accessibility to termina and it did not help. I would try the tccutil but can you tell me which service would that be, if any, or bundle id? I would prefer not to reset all. Thanks.

@DavidMBrown
Copy link

Your statement "there was no installation" is confusing. At the risk of being offensively detailed but in order to be thorough, I'll start at the beginning. I get a clean start, I suggest deleting any cliclick files on your system. If you want to remove existing security permissions for cliclick use the utility tccutil; you can read its man page, but there is next to no information. To remove permissions for only cliclick, the command is
tccutil reset All cliclick
Next, from BlueM's cliclick page, https://github.com/BlueM/cliclick, you want to download the compiled program, so click on "Releases" (towards the right side of the page.) This opens a new page whose top post is about cliclick version 5.1. Three downloads are available; you want the one entitled cliclick.zip. Download and open that file. You'll have a folder containing two files, the program (named, simply, cliclick) and a Read Me file. The Read Me has instructions for where the file "cliclick" needs to me moved. After you have done that, give the cliclick file Accessibility permission. Run cliclick by right clicking on it and selecting Open from the contextual menu that appears.
I hope this helps. Let me know how it goes.

@macmesupport
Copy link

Hello David, no offence taken, in fact, thanks a lot for explaining this from the ground 0, because I can follow it exactly and then we are on the same page. Spoiler: it did not work. Here is what I did:

  • removed two copies of the binary, both in my downloads folder
  • ran tccutil which failed with:
    MBMBAir:cliclick new macme$ tccutil reset All cliclick
    tccutil: No such bundle identifier "cliclick": The operation couldn’t be completed. (OSStatus error -10814.)
  • downloaded it again, unpacked it, read the read me...and this is what I meant by "no installation" it is not a pgk file which will run installation scripts, it is simply two files, the bin and the readme. It says I can put it into /usr/local/bin, or in any other folder which is in $PATH, and this is to be able to invoke it without specifying the full path. But if I cd into Downloads and invoke it with ./clickclick then it should work, in fact, terminal finds it, it is just that the OS kills it.
  • but for the sake of clarity, I did move it to /usr/local/bin this time
  • I removed the orphaned clickclick from the security-acessiblity and added the new one
  • opened /usr/local/bin in finder and right-click open the bin, it asked me if I want to open it, I confirmed, and I got
    /usr/local/bin/cliclick ; exit;
    The default interactive shell is now zsh.
    To update your account to use zsh, please run chsh -s /bin/zsh.
    For more details, please visit https://support.apple.com/kb/HT208050.
    MBMBAir:~ macme$ /usr/local/bin/cliclick ; exit;
    Killed: 9
    logout
    Saving session...
    ...copying shared history...
    ...saving history...truncating history files...
    ...completed.
    Deleting expired sessions...none found.
    [Process completed]

Now that it is present on the file system, I tried the tccutil again, same error, no bundle found

There is only one unusual thing I noticed, when I wanted to grand acessiblity permission, it asks me to authenticate, but it offers me the second account (also admin) on my Mac, not the one I'm logged in with. Both accounts are admin accounts

launching it with sudo produces the same result.

If you want to have a session with me, you are welcome, I would be happy if I could help you to figure this out. I'm GMT+2

@DavidMBrown
Copy link

I’d be happy to try a session with you; what did you have in mind? I’m in Eastern Daylight Time Zone, which is four hours behind GMT.

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

No branches or pull requests

4 participants