cliclick icon indicating copy to clipboard operation
cliclick copied to clipboard

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

Open 2oh1 opened this issue 3 years ago • 15 comments

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

2oh1 avatar Oct 05 '22 20:10 2oh1

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 avatar Oct 09 '22 06:10 BlueM

I downloaded Cliclick from: https://www.bluem.net https://www.bluem.net/

Version 5.0.1

When I try to run it directly from Terminal, I get this response: "zsh: killed"

I've been using Cliclick for years. Maybe 8 or 9? I never had a problem until I bought a new Mac. Could the issue have something to do with this being an M1 Mac? It's a Mac Studio.

I don't use Homebrew or MacPorts.

On Oct 8, 2022, at 11:11 PM, Carsten Blüm @.***> wrote: 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)?

— Reply to this email directly, view it on GitHub https://github.com/BlueM/cliclick/issues/159#issuecomment-1272465391, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFZ6RTVYMGP37G3U4S3JPTWCJOYVANCNFSM6AAAAAAQ55KB2A. You are receiving this because you authored the thread.

2oh1 avatar Oct 09 '22 06:10 2oh1

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.

BlueM avatar Oct 12 '22 05:10 BlueM

"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]

2oh1 avatar Oct 18 '22 23:10 2oh1

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?

BlueM avatar Oct 23 '22 09:10 BlueM

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 avatar Oct 23 '22 22:10 2oh1

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?"

2oh1 avatar Nov 16 '22 00:11 2oh1

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.

macmesupport avatar May 03 '24 11:05 macmesupport

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

DavidMBrown avatar May 03 '24 19:05 DavidMBrown

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

macmesupport avatar May 04 '24 19:05 macmesupport

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.

DavidMBrown avatar May 04 '24 21:05 DavidMBrown

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.

macmesupport avatar May 05 '24 19:05 macmesupport

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.

DavidMBrown avatar May 05 '24 20:05 DavidMBrown

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

macmesupport avatar May 06 '24 21:05 macmesupport

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.

DavidMBrown avatar May 07 '24 17:05 DavidMBrown