BTT hangs after using "Show / Choose From List (Configurable)"

I'm using the "Show / Choose From List (Configurable)", which retrieves content dynamically via Java Script / JSON . The script is:

async function retrieveJSON() {
    let items = [
        {
            "icon": "path::/Users/myuser/Library/CloudStorage/OneDrive-/Documents/btt/icons/nvi_gpt.jpg::width@@40::height@@40",
            "title": "N. Virginia / nvi / us-east-1",
            "action": {
                "named": "named_trigger_aws_region",
                "setvariable": {
                    "name": "custom_aws_region",
                    "value": "us-east-1"
                }
            }
        },
        {
            "icon": "path::/Users/myuser/Library/CloudStorage/OneDrive-/Documents/btt/icons/ohi_gpt.jpg::width@@40::height@@40",
            "title": "Ohio / ohi / us-east-2",
            "action": {
                "named": "named_trigger_aws_region",
                "setvariable": {
                    "name": "custom_aws_region",
                    "value": "us-east-2"
                }
            }
        },
        {
            "icon": "path::/Users/myuser/Library/CloudStorage/OneDrive-/Documents/btt/icons/nca_gpt.jpg::width@@40::height@@40",
            "title": "N. California / nca / us-west-1",
            "action": {
                "named": "named_trigger_aws_region",
                "setvariable": {
                    "name": "custom_aws_region",
                    "value": "us-west-1"
                }
            }
        },
        {
            "icon": "path::/Users/myuser/Library/CloudStorage/OneDrive-/Documents/btt/icons/ore_gpt.jpg::width@@40::height@@40",
            "title": "Oregon / ore / us-west-2",
            "action": {
                "named": "named_trigger_aws_region",
                "setvariable": {
                    "name": "custom_aws_region",
                    "value": "us-west-2"
                }
            }
        },
        {
            "icon": "path::/Users/myuser/Library/CloudStorage/OneDrive-/Documents/btt/icons/mum_gpt.jpg::width@@40::height@@40",
            "title": "Mumbai / bom / mom / ap-south-1",
            "action": {
                "named": "named_trigger_aws_region",
                "setvariable": {
                    "name": "custom_aws_region",
                    "value": "ap-south-1"
                }
            }
        },
        {
            "icon": "path::/Users/myuser/Library/CloudStorage/OneDrive-/Documents/btt/icons/osa_gpt.jpg::width@@40::height@@40",
            "title": "Osaka / osa / ap-northeast-3",
            "action": {
                "named": "named_trigger_aws_region",
                "setvariable": {
                    "name": "custom_aws_region",
                    "value": "ap-northeast-3"
                }
            }
        },
        {
            "icon": "path::/Users/myuser/Library/CloudStorage/OneDrive-/Documents/btt/icons/seo_google.jpg::width@@40::height@@40",
            "title": "Seoul / sel / ap-northeast-2",
            "action": {
                "named": "named_trigger_aws_region",
                "setvariable": {
                    "name": "custom_aws_region",
                    "value": "ap-northeast-2"
                }
            }
        },
        {
            "icon": "path::/Users/myuser/Library/CloudStorage/OneDrive-/Documents/btt/icons/sin_gpt.jpg::width@@40::height@@40",
            "title": "Singapore / sin / ap-southeast-1",
            "action": {
                "named": "named_trigger_aws_region",
                "setvariable": {
                    "name": "custom_aws_region",
                    "value": "ap-southeast-1"
                }
            }
        },
        {
            "icon": "path::/Users/myuser/Library/CloudStorage/OneDrive-/Documents/btt/icons/syd_gpt.jpg::width@@40::height@@40",
            "title": "Sydney / syd / ap-southeast-2",
            "action": {
                "named": "named_trigger_aws_region",
                "setvariable": {
                    "name": "custom_aws_region",
                    "value": "ap-southeast-2"
                }
            }
        },
        {
            "icon": "path::/Users/myuser/Library/CloudStorage/OneDrive-/Documents/btt/icons/tok_gpt.jpg::width@@40::height@@40",
            "title": "Tokyo / tok / ap-northeast-1",
            "action": {
                "named": "named_trigger_aws_region",
                "setvariable": {
                    "name": "custom_aws_region",
                    "value": "ap-northeast-1"
                }
            }
        },
        {
            "icon": "path::/Users/myuser/Library/CloudStorage/OneDrive-/Documents/btt/icons/cnd_gpt.jpg::width@@40::height@@40",
            "title": "Canada / cnd / ca-central-1",
            "action": {
                "named": "named_trigger_aws_region",
                "setvariable": {
                    "name": "custom_aws_region",
                    "value": "ca-central-1"
                }
            }
        },
        {
            "icon": "path::/Users/myuser/Library/CloudStorage/OneDrive-/Documents/btt/icons/fra_gpt.jpg::width@@40::height@@40",
            "title": "Frankaurt / fra / eu-central-1",
            "action": {
                "named": "named_trigger_aws_region",
                "setvariable": {
                    "name": "custom_aws_region",
                    "value": "eu-central-1"
                }
            }
        },
        {
            "icon": "path::/Users/myuser/Library/CloudStorage/OneDrive-/Documents/btt/icons/ire_gpt.jpg::width@@40::height@@40",
            "title": "Ireland / ire / eu-west-1",
            "action": {
                "named": "named_trigger_aws_region",
                "setvariable": {
                    "name": "custom_aws_region",
                    "value": "eu-west-1"
                }
            }
        },
        {
            "icon": "path::/Users/myuser/Library/CloudStorage/OneDrive-/Documents/btt/icons/lon_gpt.jpg::width@@40::height@@40",
            "title": "London / lon / eu-west-2",
            "action": {
                "named": "named_trigger_aws_region",
                "setvariable": {
                    "name": "custom_aws_region",
                    "value": "eu-west-2"
                }
            }
        },
        {
            "icon": "path::/Users/myuser/Library/CloudStorage/OneDrive-/Documents/btt/icons/par_gpt.jpg::width@@40::height@@40",
            "title": "Paris / par / eu-west-3",
            "action": {
                "named": "named_trigger_aws_region",
                "setvariable": {
                    "name": "custom_aws_region",
                    "value": "eu-west-3"
                }
            }
        },
        {
            "icon": "path::/Users/myuser/Library/CloudStorage/OneDrive-/Documents/btt/icons/sto_gpt.jpg::width@@40::height@@40",
            "title": "Stockholm / sto / eu-north-1",
            "action": {
                "named": "named_trigger_aws_region",
                "setvariable": {
                    "name": "custom_aws_region",
                    "value": "eu-north-1"
                }
            }
        },
        {
            "icon": "path::/Users/myuser/Library/CloudStorage/OneDrive-/Documents/btt/icons/sao_gpt.jpg::width@@40::height@@40",
            "title": "Sao Paulo / sao / sa-east-1",
            "action": {
                "named": "named_trigger_aws_region",
                "setvariable": {
                    "name": "custom_aws_region",
                    "value": "sa-east-1"
                }
            }
        }
    ];

    return JSON.stringify(items);
}

The named trigger is:

[
  {
    "BTTLastUpdatedAt" : 1760607103.8301082,
    "BTTTriggerType" : 643,
    "BTTTriggerTypeDescriptionReadOnly" : "Named Trigger: named_trigger_aws_region",
    "BTTTriggerTypeDescription" : "Used with \"Open aws region specific URL\" in \"Keyboard shortcuts\"",
    "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
    "BTTUUID" : "4CBBA0D9-15A7-439A-91DC-A52D6F62CB6A",
    "BTTTriggerName" : "named_trigger_aws_region",
    "BTTNotesInsteadOfDescription" : 1,
    "BTTOrder" : 12,
    "BTTActionsToExecute" : [
      {
        "BTTLastUpdatedAt" : 1760988000.7450271,
        "BTTTriggerParentUUID" : "4CBBA0D9-15A7-439A-91DC-A52D6F62CB6A",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
        "BTTUUID" : "C9AC3C6F-DCB0-446D-AFB3-45907546E109",
        "BTTPredefinedActionType" : 490,
        "BTTPredefinedActionName" : "Comment (Does Nothing Else)",
        "BTTGenericActionConfig" : "Below script is checking the currently opened AWS URL in MS Edge (should be in focus) and then transforms it so that the same URL can be opened in the desired\/selected region. Something like:\nhttps:\/\/{custom_aws_region}.console.aws.amazon.com\/{custom_aws_service}\/home?region={custom_aws_region}#",
        "BTTOrder" : 0
      },
      {
        "BTTLastUpdatedAt" : 1748619653.2503018,
        "BTTTriggerParentUUID" : "4CBBA0D9-15A7-439A-91DC-A52D6F62CB6A",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
        "BTTUUID" : "FF3F4A38-97F4-456E-8ECA-74003A2A99E7",
        "BTTPredefinedActionType" : 195,
        "BTTPredefinedActionName" : "Run Apple Script (async in background)",
        "BTTAdditionalActionData" : {
          "BTTAppleScriptRunInBackground" : true,
          "BTTScriptType" : 0,
          "BTTAppleScriptString" : "tell application \"BetterTouchTool\"\n    -- Get the active website URL from BTT\n    set websiteURL to get_string_variable \"active_website_url\"\n\n    -- Check if the URL contains AWS console\n    if websiteURL contains \"console.aws.amazon.com\" then\n\n        -- Extract the hash fragment if it exists\n        set hashFragment to \"\"\n        if websiteURL contains \"#\" then\n            set oldDelimiters to AppleScript's text item delimiters\n            set AppleScript's text item delimiters to \"#\"\n            set urlWithHash to text items of websiteURL\n            set AppleScript's text item delimiters to oldDelimiters\n\n            if (count of urlWithHash) ≥ 2 then\n                set hashFragment to \"#\" & item 2 of urlWithHash\n            end if\n        end if\n\n        -- Split URL by forward slashes to get service\n        set oldDelimiters to AppleScript's text item delimiters\n        set AppleScript's text item delimiters to \"\/\"\n        set urlParts to text items of websiteURL\n        set AppleScript's text item delimiters to oldDelimiters\n\n        -- Extract AWS service (4th element)\n        if (count of urlParts) ≥ 4 then\n            set awsService to (do shell script \"echo \" & item 4 of urlParts & \" | tr [:upper:] [:lower:]\")\n\n            -- Retrieve existing custom_aws_region from BTT\n            set awsRegion to get_string_variable \"custom_aws_region\"\n\n            -- Set the custom_aws_service variable\n            set_string_variable \"custom_aws_service\" to awsService\n\n            -- Create templated URL\n            set templatedURL to \"https:\/\/\" & awsRegion & \".console.aws.amazon.com\/\" & awsService & \"\/home?region=\" & awsRegion & hashFragment\n\n            -- Set the templated URL as a BTT variable\n            set_string_variable \"custom_aws_url_template\" to templatedURL\n\n        end if\n    end if\nend tell\n",
          "changedFile" : "3129D671-91DF-4AA8-8633-A34ED1B3CC5B",
          "SelectedAction" : 195,
          "BTTAppleScriptUsePath" : false,
          "BTTScriptLocation" : 0
        },
        "BTTInlineAppleScript" : "tell application \"BetterTouchTool\"\n    -- Get the active website URL from BTT\n    set websiteURL to get_string_variable \"active_website_url\"\n\n    -- Check if the URL contains AWS console\n    if websiteURL contains \"console.aws.amazon.com\" then\n\n        -- Extract the hash fragment if it exists\n        set hashFragment to \"\"\n        if websiteURL contains \"#\" then\n            set oldDelimiters to AppleScript's text item delimiters\n            set AppleScript's text item delimiters to \"#\"\n            set urlWithHash to text items of websiteURL\n            set AppleScript's text item delimiters to oldDelimiters\n\n            if (count of urlWithHash) ≥ 2 then\n                set hashFragment to \"#\" & item 2 of urlWithHash\n            end if\n        end if\n\n        -- Split URL by forward slashes to get service\n        set oldDelimiters to AppleScript's text item delimiters\n        set AppleScript's text item delimiters to \"\/\"\n        set urlParts to text items of websiteURL\n        set AppleScript's text item delimiters to oldDelimiters\n\n        -- Extract AWS service (4th element)\n        if (count of urlParts) ≥ 4 then\n            set awsService to (do shell script \"echo \" & item 4 of urlParts & \" | tr [:upper:] [:lower:]\")\n\n            -- Retrieve existing custom_aws_region from BTT\n            set awsRegion to get_string_variable \"custom_aws_region\"\n\n            -- Set the custom_aws_service variable\n            set_string_variable \"custom_aws_service\" to awsService\n\n            -- Create templated URL\n            set templatedURL to \"https:\/\/\" & awsRegion & \".console.aws.amazon.com\/\" & awsService & \"\/home?region=\" & awsRegion & hashFragment\n\n            -- Set the templated URL as a BTT variable\n            set_string_variable \"custom_aws_url_template\" to templatedURL\n\n        end if\n    end if\nend tell\n",
        "BTTOrder" : 1
      },
      {
        "BTTLastUpdatedAt" : 1748619653.2502899,
        "BTTTriggerParentUUID" : "4CBBA0D9-15A7-439A-91DC-A52D6F62CB6A",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
        "BTTUUID" : "41A853A8-05B6-4144-9A27-58668C0011AF",
        "BTTPredefinedActionType" : 195,
        "BTTPredefinedActionName" : "Run Apple Script (async in background)",
        "BTTAdditionalActionData" : {
          "BTTAppleScriptRunInBackground" : true,
          "BTTScriptType" : 0,
          "BTTAppleScriptString" : "tell application \"BetterTouchTool\"\n    -- Get the active website URL from BTT\n    set websiteURL to get_string_variable \"active_website_url\"\n\n    -- Check if the URL contains AWS console\n    if websiteURL contains \"console.aws.amazon.com\" then\n\n        -- Extract the hash fragment if it exists\n        set hashFragment to \"\"\n        if websiteURL contains \"#\" then\n            set oldDelimiters to AppleScript's text item delimiters\n            set AppleScript's text item delimiters to \"#\"\n            set urlWithHash to text items of websiteURL\n            set AppleScript's text item delimiters to oldDelimiters\n\n            if (count of urlWithHash) ≥ 2 then\n                set hashFragment to \"#\" & item 2 of urlWithHash\n            end if\n        end if\n\n        -- Split URL by forward slashes to get service\n        set oldDelimiters to AppleScript's text item delimiters\n        set AppleScript's text item delimiters to \"\/\"\n        set urlParts to text items of websiteURL\n        set AppleScript's text item delimiters to oldDelimiters\n\n        -- Extract AWS service (4th element)\n        if (count of urlParts) ≥ 4 then\n            set awsService to (do shell script \"echo \" & item 4 of urlParts & \" | tr [:upper:] [:lower:]\")\n\n            -- Retrieve existing custom_aws_region from BTT\n            set awsRegion to get_string_variable \"custom_aws_region\"\n\n            -- Set the custom_aws_service variable\n            set_string_variable \"custom_aws_service\" to awsService\n\n            -- Create templated URL\n            set templatedURL to \"https:\/\/\" & awsRegion & \".console.aws.amazon.com\/\" & awsService & \"\/home?region=\" & awsRegion & hashFragment\n\n            -- Set the templated URL as a BTT variable\n            set_string_variable \"custom_aws_url_template\" to templatedURL\n\n        end if\n    end if\nend tell\n\n",
          "changedFile" : "D213D4A4-1C20-4F17-91E0-3789DA39751D",
          "SelectedAction" : 195,
          "BTTScriptExternalPath" : "\/Users\/myuser\/Library\/CloudStorage\/OneDrive-\/Documents\/btt\/scripts\/custom_aws_url_2",
          "BTTAppleScriptUsePath" : false,
          "BTTScriptLocation" : 3
        },
        "BTTInlineAppleScript" : "tell application \"BetterTouchTool\"\n    -- Get the active website URL from BTT\n    set websiteURL to get_string_variable \"active_website_url\"\n\n    -- Check if the URL contains AWS console\n    if websiteURL contains \"console.aws.amazon.com\" then\n\n        -- Extract the hash fragment if it exists\n        set hashFragment to \"\"\n        if websiteURL contains \"#\" then\n            set oldDelimiters to AppleScript's text item delimiters\n            set AppleScript's text item delimiters to \"#\"\n            set urlWithHash to text items of websiteURL\n            set AppleScript's text item delimiters to oldDelimiters\n\n            if (count of urlWithHash) ≥ 2 then\n                set hashFragment to \"#\" & item 2 of urlWithHash\n            end if\n        end if\n\n        -- Split URL by forward slashes to get service\n        set oldDelimiters to AppleScript's text item delimiters\n        set AppleScript's text item delimiters to \"\/\"\n        set urlParts to text items of websiteURL\n        set AppleScript's text item delimiters to oldDelimiters\n\n        -- Extract AWS service (4th element)\n        if (count of urlParts) ≥ 4 then\n            set awsService to (do shell script \"echo \" & item 4 of urlParts & \" | tr [:upper:] [:lower:]\")\n\n            -- Retrieve existing custom_aws_region from BTT\n            set awsRegion to get_string_variable \"custom_aws_region\"\n\n            -- Set the custom_aws_service variable\n            set_string_variable \"custom_aws_service\" to awsService\n\n            -- Create templated URL\n            set templatedURL to \"https:\/\/\" & awsRegion & \".console.aws.amazon.com\/\" & awsService & \"\/home?region=\" & awsRegion & hashFragment\n\n            -- Set the templated URL as a BTT variable\n            set_string_variable \"custom_aws_url_template\" to templatedURL\n\n        end if\n    end if\nend tell\n\n",
        "BTTEnabled2" : 0,
        "BTTOrder" : 2
      },
      {
        "BTTLastUpdatedAt" : 1760987917.8035541,
        "BTTTriggerParentUUID" : "4CBBA0D9-15A7-439A-91DC-A52D6F62CB6A",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
        "BTTUUID" : "AE64F740-1826-467F-82B6-CFDD1791C9CD",
        "BTTPredefinedActionType" : 490,
        "BTTPredefinedActionName" : "Comment (Does Nothing Else)",
        "BTTGenericActionConfig" : "Below script is copying the value of \"custom_aws_region\" to the clipboard",
        "BTTEnabled2" : 0,
        "BTTOrder" : 3
      },
      {
        "BTTLastUpdatedAt" : 1754374529.3924451,
        "BTTTriggerParentUUID" : "4CBBA0D9-15A7-439A-91DC-A52D6F62CB6A",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
        "BTTUUID" : "FCFB34C1-0737-40F0-94A6-F10D4F9B296C",
        "BTTPredefinedActionType" : 195,
        "BTTPredefinedActionName" : "Run Apple Script (async in background)",
        "BTTAdditionalActionData" : {
          "BTTAppleScriptRunInBackground" : true,
          "BTTScriptType" : 0,
          "BTTAppleScriptString" : "tell application \"BetterTouchTool\"\n    set varValue to get_string_variable \"custom_aws_region\"\nend tell\n\nset the clipboard to varValue\n",
          "BTTScriptExternalPath" : "\/Users\/myuser\/Library\/CloudStorage\/OneDrive-\/Documents\/btt\/scripts\/copy_var_to_clipboard",
          "SelectedAction" : 195,
          "changedFile" : "B77AE208-7952-472A-B615-1BE420AF8FAA",
          "BTTAppleScriptUsePath" : false,
          "BTTScriptLocation" : 3
        },
        "BTTInlineAppleScript" : "tell application \"BetterTouchTool\"\n    set varValue to get_string_variable \"custom_aws_region\"\nend tell\n\nset the clipboard to varValue\n",
        "BTTEnabled2" : 0,
        "BTTOrder" : 4
      },
      {
        "BTTLastUpdatedAt" : 1748619653.2502799,
        "BTTTriggerParentUUID" : "4CBBA0D9-15A7-439A-91DC-A52D6F62CB6A",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeOtherTriggers",
        "BTTUUID" : "EE1B5A72-B521-4BD6-AB01-B5E017A3A229",
        "BTTPredefinedActionType" : 59,
        "BTTPredefinedActionName" : "Open URL  or  Open URL With Selection",
        "BTTOpenURL" : "{custom_aws_url_template}",
        "BTTOpenURLBrowser" : "Default",
        "BTTOrder" : 5
      }
    ],
    "BTTGestureNotes" : "Used with \"Open aws region specific URL\" in \"Keyboard shortcuts\""
  }
]

The issue is that on initial execution (BTT might run for few days, but if this is the 1st time I'm using this trigger + action this always happens) of the named trigger (basically after selecting the item from the list), BTT hangs for a minute or two, the named trigger is not being executed (at least it doesn't do what it should), but if I'm patient enought eventually BTT starts working again. Afterwards each time I trigger the action (select item from the list) - it is working like a charm.

BTT's list after selecting an item become completely empty:

Here are logs upon triggering the action:

2025/10/20 22:34:00:533|HYPER|enable hyper - 0|
2025/10/20 22:34:00:533|ASL|sending ctrl up|
2025/10/20 22:34:00:543|ASL|performing 293|
2025/10/20 22:34:00:544|ASL|triggering action Act as Hyper Key - F9F4BBB4-4B85-44A7-AA97-8E1D5A9ED66E|
2025/10/20 22:34:00:550|HYPER|after enabling hyperkey modifier mask 1966080|
2025/10/20 22:34:00:635|ASL|key 49 modifier keys 1966080|
2025/10/20 22:34:00:635|ASL|sending ctrl up|
2025/10/20 22:34:00:635|ASL|sending ctrl up|
2025/10/20 22:34:00:636|ASL|sending shift up|
2025/10/20 22:34:00:636|ASL|sending opt up|
2025/10/20 22:34:00:636|ASL|sending cmd up|
2025/10/20 22:34:00:641|ASL|performing 465|
2025/10/20 22:34:00:641|ASL|triggering action Show / Choose From List (Configurable) - 5CA9DD80-B3AF-4936-8976-31C28E89EB04|
2025/10/20 22:34:00:641|ASL|not triggering reply again|
2025/10/20 22:34:00:736|SWIFT|will show|
2025/10/20 22:34:00:736|SWIFT|scrolling to top?|
2025/10/20 22:34:00:736|SWIFT|will show 2|
2025/10/20 22:34:00:737|SWIFT|will show 3|
2025/10/20 22:34:00:824|ASL|key 49 modifier keys 1966080|
2025/10/20 22:34:00:829|ASL|disable capslock|
2025/10/20 22:34:01:017|ASL|not on main|
2025/10/20 22:34:01:046|ASL|not on main|
2025/10/20 22:34:01:053|ASL|not on main|
2025/10/20 22:34:01:053|ASL|not on main|
2025/10/20 22:34:01:163|ASL|not on main|
2025/10/20 22:34:01:166|ASL|not on main|
2025/10/20 22:34:01:170|ASL|not on main|
2025/10/20 22:34:01:170|ASL|not on main|
2025/10/20 22:34:05:048|ASL|not on main|
2025/10/20 22:34:05:051|ASL|not on main|
2025/10/20 22:34:05:058|ASL|not on main|
2025/10/20 22:34:05:058|ASL|not on main|
2025/10/20 22:34:05:068|ASL|not on main|
2025/10/20 22:34:05:069|ASL|not on main|
2025/10/20 22:34:05:082|ASL|not on main|
2025/10/20 22:34:05:082|ASL|not on main|
2025/10/20 22:34:05:579|SWIFT|close 3|
2025/10/20 22:34:05:579|SWIFT|a4|
2025/10/20 22:34:05:778|NAMED|named_trigger_aws_region|
2025/10/20 22:34:05:783|ASL|performing 195|
2025/10/20 22:34:05:783|ASL|triggering action Run Apple Script (async in background) - FF3F4A38-97F4-456E-8ECA-74003A2A99E7|
2025/10/20 22:34:05:783|ASL|not triggering reply again|

And here are the logs after BTT becomes responsive again (exacty 2 min hang):

2025/10/20 22:36:05:865|ASL|[LidAngleSensor] Started monitoring lid angle changes|
2025/10/20 22:36:05:865|ASL|lid angle value 62.000000|
2025/10/20 22:36:05:865|ASL|app: com.github.wez.wezterm|
2025/10/20 22:36:05:867|ASL|performing 420|
2025/10/20 22:36:05:867|ASL|triggering action Change Input Source / Keyboard Layout - 1EC732D7-8BC5-400D-A86D-D8CEDB2A5CE2|
2025/10/20 22:36:05:902|ASL|[LidAngleSensor] Started monitoring lid angle changes|
2025/10/20 22:36:05:902|ASL|lid angle value 62.000000|
2025/10/20 22:36:05:907|ASL|app: org.mozilla.firefox|

I have another "Show / Choose From List (Configurable)" showing the Safari tabs, which works without such issues.

This was working OK at some point, but it is broken for at least 5-10 (or more) alphas.

BTT: 5.717
macOS: 15.5 (24F74)

mh it could be some kind of deadlock, however I can't reproduce it here. Could you check whether adding a very small async delay at the beginning of your named trigger sequence helps?

It might be related to the retrieval of the active_website_url variable, which on first request initializes the script that queries edge. Might be worth a try to replace that with a fixed string for testing.

// edit: 5.718 adds some deadlock prevention mechanisms to the initial active_website_url retrieval, maybe that will help

BTT: 5.718 solves the deadlock, but still the named trigger is not being executed successfully (with or without a async delay). I did some tests and if I open (there's no need to poll the variables) the "Variables & Scripting" window, before executing that trigger for the first time, everything works as expected.

It is almost certainly happening due to the initialization of the active website observer on first access of that variable. The problem is most likely happening due to a limitation with Apple Script inside of nested scripting context's that is hard to workaround.

You can try two things:

1.) At the beginning of your retrieveJSON script add this to initialize the url observation:

get_string_variable("active_website_url");

2.) In case this does not work you might need to initialize out of context e.g. via the "After BetterTouchTool Did Launch" trigger:

get_string_variable("active_website_url"); - did the trick. Thank you!