BTT crashes when running shell script from within Javascript

Trying to run a shell script from within Javascript in a touch bar "Apple Script / Javascript Widget" results in BTT crashing. I tried with the example from https://docs.bettertouchtool.net/docs/1106_java_script.html (2. Running Shell Scripts).

Pressing "Run script" runs the script fine, but if the script is executing automatically, BTT crashes.

The crash report is here: https://pastebin.com/WK7tBqrG

Device information:

  • Type of Mac: Macbook Pro 16-inch
  • macOS version: Cataline
  • BetterTouchTool version: 3.346 (1554)