{"id":36427,"date":"2022-07-06T09:34:57","date_gmt":"2022-07-06T13:34:57","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=36427"},"modified":"2022-07-12T14:38:55","modified_gmt":"2022-07-12T18:38:55","slug":"applescript-broken-in-macos-12-5-beta-5","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2022\/07\/06\/applescript-broken-in-macos-12-5-beta-5\/","title":{"rendered":"AppleScript Broken in macOS 12.5 Beta 5"},"content":{"rendered":"<p><a href=\"https:\/\/twitter.com\/LucCogZest\/status\/1544559297975111680\">Luc Beaudoin<\/a> brought to my attention that there is a serious bug in the current Monterey beta. So far it&rsquo;s affected every app I&rsquo;ve tried that uses AppleScript. The script will fail with error -609 (<a href=\"https:\/\/developer.apple.com\/documentation\/coreservices\/1560050-anonymous\/connectioninvalid\">connectionInvalid<\/a>). Sometimes the script succeeds the first time, but then it will fail every subsequent time.<\/p>\n\n<p>I can reproduce the error with a script as simple as:<\/p>\n\n<pre>tell application \"Safari\" to get URL of document of window 1<\/pre>\n\n<p>or this similar <a href=\"https:\/\/twitter.com\/LucCogZest\/status\/1544576711034974208\">script for BBEdit<\/a>.<\/p>\n\n<p>Until this bug is fixed, I recommend not updating to the latest Monterey beta, as it is likely to cause widespread breakage. Even if you don&rsquo;t write scripts yourself, many apps rely on them under the hood. For example, there are confirmed problems with:<\/p>\n\n<ul>\n<li>Finding and opening links using <a href=\"https:\/\/discourse.hookproductivity.com\/t\/macos-12-5-beta-5-bug-hold-off-on-updating-it-if-you-can\/5324\">Hook<\/a><\/li>\n<li>Launching and using <a href=\"https:\/\/community.folivora.ai\/t\/app-crashes-on-latest-monterey-12-5-beta-5\/27563\">BetterTouchTool<\/a><\/li>\n<li>Capturing from Finder, Mail, and Safari with <a href=\"https:\/\/forum.c-command.com\/t\/applescript-bug-in-macos-12-5-beta-5\/14502\">EagleFiler<\/a><\/li>\n<li>Training from Mail with <a href=\"https:\/\/forum.c-command.com\/t\/applescript-bug-in-macos-12-5-beta-5\/14502\">SpamSieve<\/a><\/li>\n<li>Creating a disk image with a layout in <a href=\"https:\/\/forum.c-command.com\/t\/applescript-bug-in-macos-12-5-beta-5\/14502\">DropDMG<\/a><\/li>\n<\/ul>\n\n<p>I have filed a feedback (FB10565806) about this, as has Beaudoin (FB10563311).<\/p>\n\n<p id=\"applescript-broken-in-macos-12-5-beta-5-update-2022-07-07\">Update (2022-07-07): It also affects <a href=\"https:\/\/twitter.com\/LeoNatan\/status\/1545108576888389633\">the Dock<\/a> and <a href=\"https:\/\/twitter.com\/dnanian\/status\/1545056522450874368\">SuperDuper<\/a>.<\/p>\n\n<p id=\"applescript-broken-in-macos-12-5-beta-5-update-2022-07-12\">Update (2022-07-12): This seems to be fixed in the <a href=\"https:\/\/www.macrumors.com\/2022\/07\/12\/apple-seeds-macos-monterey-12-5-release-candidate\/\">release candidate<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Luc Beaudoin brought to my attention that there is a serious bug in the current Monterey beta. So far it&rsquo;s affected every app I&rsquo;ve tried that uses AppleScript. The script will fail with error -609 (connectionInvalid). Sometimes the script succeeds the first time, but then it will fail every subsequent time. I can reproduce the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2022-07-06T13:35:00Z","apple_news_api_id":"aee6ab43-0be5-4a7e-b0b5-418ac7542f0f","apple_news_api_modified_at":"2022-07-12T18:38:58Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAABg==","apple_news_api_share_url":"https:\/\/apple.news\/AruarQwvlSn6wtUGKx1QvDw","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[159,154,1585,131,371,595,1840,30,2077,103,372],"class_list":["post-36427","post","type-post","status-publish","format-standard","hentry","category-technology","tag-applescript","tag-bbedit","tag-bettertouchtool","tag-bug","tag-dropdmg","tag-eaglefiler","tag-hook","tag-mac","tag-macos-12","tag-safari","tag-spamsieve"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/36427","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=36427"}],"version-history":[{"count":7,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/36427\/revisions"}],"predecessor-version":[{"id":36478,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/36427\/revisions\/36478"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=36427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=36427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=36427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}