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

Automation Permission Issue for macOS Mojave #26

Open
JoelProminic opened this issue Jun 1, 2020 · 3 comments
Open

Automation Permission Issue for macOS Mojave #26

JoelProminic opened this issue Jun 1, 2020 · 3 comments
Assignees
Labels
investigation Something that requires investigation

Comments

@JoelProminic
Copy link
Contributor

In my recent testing on macOS Mojave, I found that MoonshineSDKInstaller could not notify Moonshine of newly installed SDKs if it did not have this permission set in System Preferences:
image

The user should see this prompt when MoonshineSDKInstaller attempts to connect to Moonshine.
image

However, if the user misses or rejects this prompt, the application will not work properly until the user updates the setting in System Preferences.

I do not remember if I saw the prompt in my earlier tests. When I tried a fresh test, I found that I got a prompt as expected, but I'm concerned that there is some issue preventing this alert from showing up. I have had trouble with this for other Prominic applications, so we may investigate this further if more users report problems.

Here is the command I used to reset the permissions:

# Reset Automation for all apps
tccutil reset AppleEvents

# Reset all permissions for Moonshine SDK Installer - unfortunately, this command reported an invalid bundle ID, and I couldn't resolve the error.
tccutil reset All net.prominic.MoonshineSDKInstaller
@rat-moonshine
Copy link
Collaborator

rat-moonshine commented Jun 2, 2020

When I tried a fresh test, I found that I got a prompt as expected, but I'm concerned that there is some issue preventing this alert from showing up.

A few details on new updates when the prompt triggered for you, previously we were using 'usr/bin/osascript' as the executable to NativeProcess and ran a direct path-command to it. Later, the executable changed to '/bin/bash' and running a full command like '/usr/bin/osascript $scriptPath ""' - this is the same way we mostly running in Native and I believe you noticed the said automation prompt there. This seems like the way of executing command with NativeProcess which reflects to different results.

@rat-moonshine rat-moonshine added the investigation Something that requires investigation label Jun 2, 2020
@rat-moonshine rat-moonshine self-assigned this Jun 2, 2020
@rat-moonshine
Copy link
Collaborator

rat-moonshine commented Jun 2, 2020

Using the recent change (in Moonshine SDK Installer) when I ran, I prompt with the automation prompt.

When accepted, I able to return focus to Moonshine.

Then I tried to reset the automation against Moonshine SDK Installer, but the said command didn't work for me (as expected) in Terminal (I didn't want to reset other applications):

$ tccutil reset All net.prominic.MoonshineSDKInstaller
tccutil: No such bundle identifier

Next I tried to reset all existing AppleEvents.

After resetting all AppleEvents, Moonshine SDK Installer again prompted for automation. So this procedure seems to work after last change.

However, when I manually unselect the checkbox by going into Security & Privacy > Automation, I see the automation prompt never triggered for me; Even if restarting of Moonshine SDK Installer.

@JoelProminic
Copy link
Contributor Author

Yeah, I got the same "no such bundle identifier" error - it may be a limitation on tccutil.

Manually unselecting the checkbox in Security & Privacy > Automation indicates that Moonshine SDK Installer should be denied access to this feature. The user won't be prompted again unless something resets that decision. So, if a user ends up in this state, they will have to fix it manually in Security & Privacy > Automation.

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

No branches or pull requests

2 participants