Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Applications Scripts Directory does nothing #20

Closed
gavinjerman opened this issue Apr 22, 2020 · 7 comments
Closed

Open Applications Scripts Directory does nothing #20

gavinjerman opened this issue Apr 22, 2020 · 7 comments

Comments

@gavinjerman
Copy link

Running Service Station v2020.3 (14) on macOS 10.15.4.

The Open Application Scripts Directory button in System Setup does nothing. The Sample Scripts button works ok.

Looking in the Console logs, clicking the button raises "UNIX error exception: 13".

It's not obvious what folder it is trying to open so I cannot check if it exists on my system.

@gingerbeardman
Copy link

On mine it is:

~/Library/Group Containers/4G65N8LGGS.ServiceStationAppGroup/Library/Caches/Resources/Scripts

which is a sandboxed folder you should be able to find.

@gavinjerman
Copy link
Author

On mine it is:

~/Library/Group Containers/4G65N8LGGS.ServiceStationAppGroup/Library/Caches/Resources/Scripts

which is a sandboxed folder you should be able to find.

I have that folder. That location is where my Sample Scripts button opens to in Finder. The Open Application Scrips Button does nothing.

@gingerbeardman
Copy link

gingerbeardman commented Apr 22, 2020

Sorry, my misunderstanding.

Trying that again, yes I see the same no-function and console error as you do.

Also see #21 which is a new problem

@pkamb
Copy link
Contributor

pkamb commented Apr 22, 2020

The Applications Scripts directory is:

~/⁨Library⁩/Application Scripts⁩/com.knurling.ServiceStation.Attendant⁩

which you can open manually via Finder and move your scripts there.

I too have occasionally seen this issue, where the Finder location does not open.

The problem is that Scripts must be stored in the background process's Application Scripts directory, but only the process that owns that location is allowed to open it (without a Sandbox bookmark).

There is unfortunately no common App Group member Application Scripts directory:
https://stackoverflow.com/questions/52563637/sharing-application-scripts-directory-between-mac-application-and-extension-ap

@pkamb
Copy link
Contributor

pkamb commented Apr 22, 2020

So there is some kind of problem in my communication channel of Main App > Attendant where the action to open the Application Scripts directory is failing.

I'm wondering now if it's due to the main app being updated to a new version, but the background attendant still running the old version. Not that any code has been changed, but that the ownership of the background process / login items / code signature has changed in the update.

If you terminate the Service Station Attendant process via activity monitor, it should automatically relaunch. If it doesn't, launch it manually in Service Station.app > Contents > Library > LoginItems > Service Station Attendant.app. That may fix the Finder button.

I will investigate this further.

@gingerbeardman
Copy link

Killing does fix things. Thanks for the workaround.

@pkamb
Copy link
Contributor

pkamb commented Apr 30, 2020

In version 2020.4 I'm now restarting the background process every time the main app is launched:

SMLoginItemSetEnabled(attendantBundleID, false) // added in 2020.4
SMLoginItemSetEnabled(attendantBundleID, true)

This should kill the previous version of the attendant, if it's already running, and re-launch the newest version from the updated app bundle. This should happen quickly in the background and be entirely invisible to the user.

Please let me know if you continue to see any non-functioning buttons or communication to the attendant. Or if there are any issues due to the attendant restarting more frequently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants