Question

It would appear that Gatekeeper in macOS Sierra is a bit pickier. At any rate, it is causing a small utility I made some years ago to throw a rather annoying error.

As I haven't yet had the time to dig into the under-the-hood changes in Sierra, I'm not sure how to fix the error. Does anyone have experience dealing with errors relating to AppTranslocation and fixing them?

Code and error follow:

Code:

tell application "Finder"
set currentDir to POSIX path of ((container of (path to me)) as text)
end tell
set currentDir to quoted form of currentDir
set lib80211 to quoted form of "AirPort Utility 5.6.1 Launcher.app/Contents/Resources/Apple80211.framework/Versions/A/Apple80211"

do shell script "export DYLD_INSERT_LIBRARIES=" & currentDir & lib80211 & "
cd " & currentDir & "AirPort\\ Utility\\ 5.6.1.app/Contents/MacOS
./AirPort\\ Utility"

Error:

sh: line 1: cd: /private/var/folders/t4/7k5z832d2tjd4xpzvvq43n4m0000gn/T/AppTranslocation/23AF67A4-3DF7-4982-A1A3-B019CDACB4C2/dAirPort Utility 5.6.1.app/Contents/MacOS: No such file or directory
sh: line 2: ./AirPort Utility: No such file or directory (127)
Was it helpful?

Solution 2

Well, after a fairly significant amount of trial and error (and a bit of reading about how AppTranslocation works in macOS 10.12 Sierra), I've discovered a fix.

In essence, you have to open the *.dmg and then move the contents to some other folder in Finder. The catch: If you move both simultaneously, AppTranslocation may 'tag' them (seemingly permanently) and continue to run every time you try to launch either *.app); this seems like a bug, and I intend to report it to Apple.

The Solution

Re-download the *.dmg (as others have stated) and move the two files it contains one at a time into a folder (preferably Utilities, but it's up to you where you want them to reside). Once you've done this, run the Launcher and everything should work as before.

OTHER TIPS

Another solution would be to execute a shell script that removes the quarantine flags after you've copied the files. The command would be like this:

/usr/bin/xattr -dr com.apple.quarantine /path/to/fileOrFolderOrApp

The problem seems to be simpler than that—It looks like the update removed Airport Utility 5.6.1.app from under /Applications/Airport Utility 5.6.1. I copied the directory back in place from an old backup and things work again.

It's working perfectly for me under macOS Sierra 10.12. I redownloaded the .dmg and installed it and everything is the same as it was under El Capitan.

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top