Broken/Bad Shortcut

I wrote a shortcut years ago that suddenly ‘crashes’ the shortcuts app when I try to do anything with it. That is, if I right click the shortcut to try an edit it, the shortcut app stops responding. The same happens if I click to run the shortcut. Other shortcuts still work correctly, so far it only seems to be the one shortcut that crashes the app.

I have found the sqlite database that stores the shortcuts (~/Library/Shortcuts), but when I try to open the database (using sqlite3 on the command line), I get the following authorisation error:

SQLite version 3.43.2 2023-10-10 13:08:14
Enter ".help" for usage hints.
sqlite> .tables
Error: authorization denied

Anybody have any ideas on how I can either edit or remove the shortcut from the database?

So you can’t even delete the shortcut?

For the authorization error, you can try giving the Shortcuts app full disk access. But I don’t think you can easily remove a shortcut from the database.

Can you right-click the shortcut and share? I’d like to see why it crashes.

Alternatively you can try Shortcut Source Tool to check what’s wrong with it.

Correct, anytime I try to open the shortcut (left click to run or right click to get the context menu) the ‘beach ball’ appears and starts spinning and spins forever. When I check the, the shortcut app has stopped responding and my only option is to force quit the app.

No, editing the sqlite database seemed a long shot. I was just trying it as some way to get rid of the offending shortcut since I couldn’t use it anymore.

Right clicking the shortcut didn’t do anything except cause the shortcuts.app to crash. I have the information Apple produced when I did the force quit if you’d like it. Didn’t make much sense to me!

Thank you for the link to the Shortcut Source Tool, I’d forgotten about that.

It turns out that while I tried to remove the ‘bad’ shortcut using my Mac and my iPhone, I hadn’t tried it on my iPad. For some reason I was able to delete the shortcut using the iPad. It did take two goes, the first seemed to crash the shortcuts app on the iPad, I killed the app and tried again and was able to delete the app.

Thanks for your help.

1 Like

Glad it’s working now but that’s definitely a strange issue

I’ve never encountered this specific problem but I’m sympathetic in that shortcuts seem to get corrupted pretty easily, in my experience. This is especially true after a major OS upgrade. Is there a good resource or common wisdom out there in how to handle these instances? I feel like there’s precious little discussion of general Shortcuts performance issues, not just corruption but memory management, bugs in the editor, etc.

Yes, the editor is terrible, particularly on the Mac. As a programmer I would love for some way to edit shortcuts in a text editor since the ‘drag and drop’ editor provided is hard to work with at the best of times.

1 Like

You could try Jellycuts.

1 Like

I second JellyCuts. It’s really the only good way to write shortcuts in a text based way aside from building the source file manually, which is a huge pain