"Scripting Component Error" for other users of applet – Myriad Tables Lib?

My applet is intended to run in multi-user environments. However, at present it only runs for the user that has copied the applet from the downloaded DMG to /Applications/. Other users on the same Mac get a “Scripting component error. (1750)”. Also, for those other users, the applet’s icon is blank instead of showing the applet’s logo.

But, if other users copy the applet from /Applications/ to their Desktop and run it, there is no error and the icon reverts to the applet’s normal icon. Then, if they copy the applet back to /Applications/, they can run it but the original user cannot – they now get “Scripting component error. (1750)”.

The error occurs with an exported Run-only, signed, notarized copy of the applet and also with a copy that has not been exported.

This behaviour started when I added Myriad Tables Lib to the applet which makes me think I’ve not implemented MTL correctly. MTL is in the bundle’s “Script Libraries” folder and is copied to the user’s ~/Library/Script Libraries/" folder when the user turns on a related applet setting. The error occurs whether or not MTL has been copied to the user’s Library.

The applet uses MTL in a single script with this “use script”:

use script “Myriad Tables Lib” version “1.0.13”

The script is in the bundle’s “Scripts” folder and is loaded and run by “main.scpt” as needed. That is, “main.scpt” does not have a “use script” for MTL.

Should MTL be used differently ?


Why not?

(Having asked that, I suspect you’re asking too much of it, given the latest security stuff. Copying it to the user’s folder is asking for problems.)

Just didn’t think it was needed.

Yes, that gels with troubles. Would it be better to install in /Library/Script Libraries/ ?

Many thanks.

The problem is getting permissions – there’s no simple, consistent UI for doing it.

If you put it in an app’s Script Libraries folder and call it from its main.scpt with the appropriate use script statement, it works. That’s really what it’s designed for. If you want to go beyond that, I’m afraid you’re on your own. With today’s security environment, IMO distributing something further is asking for trouble.

I wish I could be more positive, but I don’t like building false hopes.

OK, I wasn’t looking forward to that anyway.

I’ve made that change but, the behaviour is the same – it works but only for the user who downloads or copies the applet to their Desktop. I really don’t understand how permissions work. When a user copies the applet to /Applications/, permissions on the applet look OK – “everyone” has Read only. But when another user looks at the applet, they see that there is no permission to access some, not all, language folders and the MTL script library is of zero file size. Yet, when that user copies the applet to their own Desktop (after supplying admin credentials), they gain access to those language folders and MTL is the correct file size. That “zero” file size is not real so, I’m thinking it’s a product of some permissions issue.

Anyway, many thanks. I will ponder what to do.


You did remove Myriad Tables from the app for the last test?

Ed, thanks, a good idea. There was no error with the previous version of the applet, which was before adding MTL and in the absence of any other relevant changes concluded there was something amiss with my method of accessing/installing MTL. Did a test today by removing MTL from Script Libraries in the applet and had the same component errors. I really should have thought of that test before posting. My sincere apologies.

I have since found that the permissions on files and folders inside the applet’s bundle are all over the shop. Many items have “everyone” set to “No access” and “staff” either set to “No access” or absent, which would certainly cause problems. It also explains why there were no errors for users who copied the applet to their Desktop.

I’ve tried to force all the permissions to be the same for all items but still get a permission error when copying MTL to the user’s Library (using “cp” in shell):

… unable to copy extended attributes to … Permission denied

Anyway, I think I’m finally on track to fixing the applet.

Many thanks.

UPDATE: No more errors with installing MTL. But still a blank logo in the Dock etc.