Skip to content

AppleScript security issues on macOS Mojave #95

@thomvaill

Description

@thomvaill
  • 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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions