BTT crashing in Sequoia

Updated to macOS 15.7 and BTT 5.632 still crashes on startup. Does it look like the same thing? Anything else for me to try?

BTT crash 3.txt (44.9 KB)

that crash is indeed a bit different. Could you try whether BTT launches if you enter safe mode using this terminal command?

defaults write com.hegenberg.BetterTouchTool BTTSafeModeEnabled YES

It is still a very weird crash, it seems like the Apple Script runner process is returning something that can not be decoded by BTT. Can you think of any apple script you are trying to run?

However it is crashing so early in the startup process, it is almost impossible that it is some apple script you run intentionally.
Googling for the error in the crash log suggests the app bundle is somehow corrupted, but you already tried re-downloading, correct?

Yes, I’ve tried a few different versions since the behavior started yesterday.
Ran the command and still get the crash, even after reboot.

BTT crash 4.txt (41.4 KB)

Oh and no scripts that I know of

Hi, i dont know if this is relative, but since Tahoe, i have a big problem with my AppleScript scripts running frequently. I have backgroundtaskmanagementd that is using a lot of CPU permanently, the volume, brightness buttons, and login window are not responding anymore. If i use osascript, or stop my applescript, it seems to be ok.
I reset permissions..

Example of a script (in every use case of BTT):

async function HEURE() {
let appleScript = set currentTime to do shell script "date '+%H:%M:%S'"
return currentTime;
let result = await runAppleScript(appleScript);
document.getElementById('heure').innerHTML=result;
};
setInterval(HEURE, 1000);

or in menu item script
get output volume of (get volume settings)

Intel iMac 27' 2020
last Tahoe
BTT 5.634

I just tried BTT 5.643 and there was a difference: when I ran it the first time I got a prompt from BTT asking for permission and now it shows in Privacy & Security again. But then it crashed:

BTT crash 5.txt (43.7 KB)

It all sounds very much like some permission issue (and the crashlogs all look like BTT doesn't have the accessibility api permission), but there are not many options left if

sudo tccutil reset All com.hegenberg.BetterTouchTool

Doesn't help.

You can try to reset all permissions for all apps via

sudo tccutil reset All

but even then, if the tcc database is corrupted at a low level even this might not help. Unfortunately resetting the tcc database in this case is really hard because it is protected by system integrity protection (would require booting into recovery mode, disable SIP, delete the tcc.db, activate SIP again and reboot)

@rgge your issue is not related, have you tried to restart your system?

ok sorry to interfere here (you talk about applescript problem and my problem is about applescript), i try everything (reset permissions, restart), it appears monday since tahoe or the new corresponding BTT version. Everything was very ok before.

sudo tccutil reset All did not reslove the issue. I’ll try the nuclear option when I have a break in some work.

Is there a way to back up my settings (outside of launching the app, which I can’t do) and then blow away all the preferences to see if that helps?

yes, you can copy this folder to some other location (or just rename it) while BTT is quit:

~/Library/Application Support/BetterTouchTool (go there via Finder => Go => Go to Folder, make sure to include the ~)

Do the same for this file:

~/Library/Preferences/com.hegenberg.BetterTouchTool.plist

However the crashlogs suggest that this won’t help ;-(

Yeah you were right, no help there.

So the crashed thread is com.apple.NSXPCConnection.user.com.hegenberg.BetterTouchToolAppleScriptRunner

What does the BTT “AppleScriptRunner” do? What other things could I try to figure out the conflict? I have Steermouse installs, that’s the only other thing I could think of that is related.

it crashes because the system API’s tell it it has the permissions to run apple scripts (Accessibility permissions), when in reality it doesn’t. I have had one or two users with a similar issue many years ago, unfortunately I think the only way to resolve this was a low level reset of the tcc database (or macOS reinstall)

This is most likely no conflict but a corrupted macOS system database ;-(

Well, I tried the nuclear option with no luck.

Totally removed the TCC database using this method:

When that didn’t work I did it again but this time disabling SIP first AND removing the TCC files in my User directory as well. BTT still crashes the same. I even added the Accessibility permission for BTT manually (since it’s not running long enough to prompt for permission) and it still crashes.

I guess I’ll just hope that macOS 26 upgrade will magically fix it, though I doubt it (and I' can’t upgrade just yet as I’m in the middle of some work). This is a real bummer, BTT is one of my favorite pieces of software and working without it is frustrating

;-( unfortunately then I’m also out of ideas. You booted into recovery and deleted the database from there like described in the Macworld article?

(the problem is that it can only be deleted reliably while in recovery mode - if deleting worked, all app permissions would be gone and macOS would start asking for all of your apps again)

One thing that would be at least interesting:

What happens if you disable the script runner processes completely? This can be done using this terminal command:

defaults write com.hegenberg.BetterTouchTool BTTNumberOfAppleScriptRunners -1

This obviously isn’t a solution because they are essential for BTT, but would be interesting to see whether it can run then or crashes at some other location.

Yes, from Recovery Mode. All other apps re-asked for permission. I’ll try the script runner preference change now

After that plist change it runs. It asked for Bluetooth access and “Shortcuts events” permissions which I’ve now granted. What should I change the BTTNumberOfAppleScriptRunners back to for further testing?

the default is 4

defaults write com.hegenberg.BetterTouchTool BTTNumberOfAppleScriptRunners 4

Ok it crashes again after setting it back to 4