Working App stops working - object cannot be nil - missing value

Hello,

I have an AppleScript that I turned into an App in 2018. All of a sudden the app throws this error.

This app basically gets some information from the user and sets the cache location for a Final Cut Pro library (.fcpbundle) file. This was achieved by writing an edited dictionary back to the property list for the .fcpbundle file.

I really haven’t touched AppleScript since 2018 and my skills are a bit rusty.
When I step through the editable script in Script Debugger I get an error when attempting to create a bookmark of a folder path.

– CREATE A BOOKMARK OF A FOLDER PATH
set aBookmark to its getBookmarkDataFor:targetFolderPath
– ADD NEW ENTRY
sourceDictionary’s setObject:aBookmark forKey:“cacheLocation”

So the line where I create a bookmark of a folder path gives me a missing value in the Script Debugger result box…
ResultBox-MissingValue

… and then the add new entry line throws up the error image I posted above and does this in Script Debugger

This is where things go all sideways for me.
This is only happening on my iMac Pro running Big Sur. Other team members have no issue with the app but they’re all running Catalina. I thought maybe it was an issue with Big Sur, so I tried the app on my personal iMac running the macOS Monterrey beta and it worked without issue.
I thought that maybe Apple changed something in Final Cut Pro 10.5.2 (l was on 10.5.2 while users on my team are still on 10.5.1) but I installed FCP 10.5.3 on my Monterrery iMac and I get no issue.
So it seems that the issue was not introduced by a macOS or Final Cut Pro update.
The next possibility I considered was this issue appeared on the day I first returned to the office for work. Our teams Mac’s are JAMF managed and I thought maybe something in JAMF caused this issue. That said, I installed the app on another co-workers computer. They too were in the office and on our network and they did not get this error. So based on that I don’t think it’s a JAMF management thing either. Next, I thought, well if that install I did worked fine for my co-workers Mac, then what if I uninstall the app on my iMac Pro and reinstall with the installer that just worked fine on my co-workers computer. Sadly, after uninstalling and reinstalling on my iMac Pro the issue persists.

I’m having trouble tracking this issue down and when it’s not happening on other machines/mac OS versions/Final Cut Pro versions I wonder if it’s even worth updating the app to fix. But all that said, it’s not working on my machine and I created the app. It’s driving me up a wall to say the least.

Can anyone kick me in the right direction on this one? I’m glad to provide any needed info.

Lost in Illinois…
Ben

Okay, I’ve isolated the issue. The app is working on my machine now, just not on the external drive I’m pointing the app to write to. I’ve discovered an issue where the volume name and the mount point of that drive do not match. I also found an Apple support document stating that this will cause apps that rely on file paths to not work, which is what is happening here. So this issue for now is resolved. I’ll let you know if I figure out how to resolve the mount point and volume name issue.