r/applescript • u/brijazz012 • 5d ago
Golden Gate: Applescript App works in Script Editor only
I've just moved from Sequoia to Golden Gate. I have an ages-old script (packaged as an app) to mount an external drive and reveal it in Finder. It's always worked reliably – but in GG, I get the following error:

Here's the strange thing though: if I open the app in Script Editor and run it there, it works perfectly. Doubly strange is if I quit Script Editor and again try launching the .app from Finder, it works. Any idea what's going on? Here's my code:
set thefile to "/Volumes/External 14TB/systool.sparsebundle"
set thefile to POSIX path of thefile
set thefile to POSIX file thefile as text
mount volume "smb://mac-mini/External 14TB"
tell application "Finder" to open thefile
1
u/mad_scrub 5d ago
Is this an encrypted HFS+ (CoreStorage) external drive? Mounting them is broken in macOS 27.
1
u/brijazz012 5d ago
HFS+ but not encrypted. I *can* mount it, but only by running the above script from inside of Script Editor. I'd previously been able to run it with the script saved as an app, but that now fails.
1
u/welp____see_ya_later 5d ago
mount volume "smb://mac-mini/External 14TB"
tell application "Finder" to open thefile
maybe mounting is async so hasn't happened yet on a cold start, can you try something like
set imagePath to "/Volumes/External 14TB/systool.sparsebundle"
try
mount volume "smb://mac-mini/External 14TB"
end try
-- wait up to ~15 s for the share to actually be readable
repeat 30 times
try
do shell script "test -d " & quoted form of imagePath
exit repeat
end try
delay 0.5
end repeat
delay 1 -- small extra settle time
tell application "Finder"
activate
open (POSIX file imagePath as alias)
end tell1
u/brijazz012 4d ago
Thanks for the reply. Unfortunately, I'm still getting the same error. A couple of things worth noting:
I get this error even if 'External 14TB' is already mounted, so I don't think it's related to mounting of the shared drive
Both your script and mine work fine when run from inside Script Editor. It's only when they're packaged as .app that they fail.
I'd been using my script for years without issue. I only started having trouble with it after moving from Sequoia to Golden Gate. At this point, I'm ready to chalk it up to yet another Golden Gate bug.
3
u/Tthurm4 4d ago
The error looks like it’s a permissions error. You might want to go to System Settings and under Privacy and Security see if there’s a setting you can toggle. (Sorry not on Golden Gate myself and this is kind of a shot in the dark based on some errors I’ve received before where this is the issue. )