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

AppleScript security issues on macOS Mojave #95

Open
thomvaill opened this issue Jun 4, 2019 · 3 comments
Open

AppleScript security issues on macOS Mojave #95

thomvaill opened this issue Jun 4, 2019 · 3 comments

Comments

@thomvaill
Copy link

  • The target platform(s) the problem occurs on (Linux, Mac, Mac App Store, and or Windows): macOS Mojave 10.14.5
  • Node version (run node -v): 10.15.0
  • auto-launch version: 5.0.5
  • The options you're passing to auto-launch:
{
      name: 'xxx',
      isHidden: true,
      mac: {
        useLaunchAgent: false // default value
      }
    }
  • Are you using NW.js or Electron?
    • Yes: Electron
    • If you're using Electron, are you using auto-launch from the main process or a renderer process? -> main process

Since the Mojave version of macOS, Apple introduced some advanced security features which prevent auto-launch to execute its AppleScript.
The Exception "Not authorized to send Apple events to System Events" is thrown when calling autoLaunch.enable().
Here is an example: https://recatch.io/s/UnDGITjNmLYV

Is there any workaround? I prefer to use the AppelScript method so my app appears in the Login Items menu, which is not the case with LaunchAgent.

Thank you,

@aakarim
Copy link

aakarim commented Jan 20, 2020

If I add the Apple Events entitlement https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_automation_apple-events and notarize my app then it works for me.

@sydney-d
Copy link

Hello,

I also have this issue, any way of making it work without notarizing the app ?

Thanks

@RobbieTheWagner
Copy link

My app is notarized and I have the permission set, but we're still getting this error.

    <key>com.apple.security.automation.apple-events</key>
    <true/>

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

4 participants