Error executing Shortcut via commandline

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Error executing Shortcut via commandline Fri Apr 25, 2025 7:47 pm • by vjl323
This workflow had been working for months every day until today when I did some updates. Sadly I did too many updates to know which is the issue. The 4 I did were macOS 14.7.5 [from 14.7.4], a new version of Safari 18.4, Hazel 6.0.4 [from 6.0.3 I believe],and Retrobatch Pro 2.2.2 [from 2.1.something].

The logs show that Hazel can not execute a Shortcut that it has been executing fine before:

2025-04-25 19:08:41.712 hazelworker[15601] Running worker (v6.0.4) for folder with identifier: 16777230-139635518.
2025-04-25 19:08:41.715 hazelworker[15601] ###Arch: arm64
2025-04-25 19:08:41.715 hazelworker[15601] ###main load address: 0x104db0000
2025-04-25 19:08:41.715 hazelworker[15601] ###Hazel Core load address: 0x1053c8000
2025-04-25 19:08:41.715 hazelworker[15601] ###Noodle load address: 0x1056c8000
2025-04-25 19:08:41.715 hazelworker[15601] ###CK load address: 0x1052b0000
2025-04-25 19:08:41.732 hazelworker[15601] Processing folder FOR EBAY (forced)
2025-04-25 19:08:43.901 hazelworker[15601] IMG_7896.jpg: Rule Remove EXIF matched.
2025-04-25 19:08:44.087 hazelworker[15601] Error executing Shortcut Remove Metadata: Error Domain=Hazel Code=9 "Error executing Shortcut via commandline." UserInfo={NSLocalizedDescription=Error executing Shortcut via commandline.}
2025-04-25 19:08:44.087 hazelworker[15601] [Error] Shortcut failed: Could not run Shorcut Remove Metadata: .
2025-04-25 19:08:44.089 hazelworker[15601] Done processing folder FOR EBAY

The issue is I may have blanked out one of the 2 fields in the Shortcut, but I have tried them both ways and get the same results.

I have screenshots. https://www.dropbox.com/scl/fi/mw2sdxq9j20skwb3uwdkh/Hazel-2025-04-25-19-18-56.png?rlkey=pep776sg7fi2mcbnuj1js49pj&dl=0

This is the Shortcut:

https://www.dropbox.com/scl/fi/zx2k7l4llm31wpcmv3t95/Remove-Metadata-2025-04-25-19-15-25.png?rlkey=qg88s2r9n4vropelhn2t5ex0o&dl=0

And this is the Retrobatch process that gets called by the Shortcut:

https://www.dropbox.com/scl/fi/66izaweukf3bhmg316g6u/Process-Product-Images.retrobatch-2025-04-25-19-19-29.png?rlkey=bgj4rym345x65lyzem7ee0xjp&dl=0

Note in the Shortcut the "Input Images" area - that is where I might have clicked off [I wish there was an easy way to retrieve past versions of Shortcuts via Time Machine!]. I have tried to change that to the FOR EBAY folder and the results are the same - error executing the shortcut from the commandline.

Also a spelling typo in the Logs - Shortcut failed: Could not run Shorcut Remove Metadata

[Shortcut is missing the "t"].

Unsure how to proceed. I process 100s of images a day using this workflow and now I'm stuck. How can I troubleshoot this further? Thanks for any help you can provide!
vjl323
 
Posts: 2
Joined: Fri Apr 25, 2025 7:09 pm

Are you able to run the Shortcut using the commandline in Terminal?
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Error executing Shortcut via commandline Mon Apr 28, 2025 2:30 pm • by vjl323
I sent a support message after further research. There is a major bug in 14.7.5 that prevents /usr/bin/shortcuts from ever being run - even in Terminal. See details at: https://discussions.apple.com/thread/25 ... 1347439022

What I was able to do last night is remove the dependency on Shortcuts, since all it was doing was calling RetroBatch. Turns out RetroBatch has a command line that can be called via script, so using the embedded script feature of Hazel, I've been able to call RetroBatch directly.
vjl323
 
Posts: 2
Joined: Fri Apr 25, 2025 7:09 pm


Return to Support