octalmage / robotjs

Node.js Desktop Automation.
http://robotjs.io
MIT License
12.34k stars 953 forks source link

Entitlement for Latest Mac OS #515

Open sajjanbalar opened 4 years ago

sajjanbalar commented 4 years ago

Robot JS doesn't work with the lastest mac os.

Expected Behavior

It should send a keyword tap to the user

Current Behavior

It errors out saying "Permission Denied"

Possible Solution

I am guessing it is missing the entitlement required for apps to be notarized in the latest mac os.

Steps to Reproduce (for bugs)

  1. Update your MAC os to version 10.15 Catalina
  2. Write a simple electron app that sends a keyword tap
  3. Notarize your electron app. [https://medium.com/@TwitterArchiveEraser/notarize-electron-apps-7a5f988406db](Follow these instructions)
  4. Run the app.

Context

Our electron app stops sending key taps in the latest Mac OS.

Your Environment

Th3S4mur41 commented 4 years ago

Not sure it's the same root cause yet, but we're seing similar issues with version 10.14 Mojave while 10.13 High Sierra is still working fine

albemala commented 4 years ago

What worked for me was to add this entitlement:

<key>com.apple.security.cs.disable-library-validation</key>
<true/>

to the entitlements.mac.plist.

Source: https://github.com/electron-userland/electron-builder/issues/3940

oktapodia commented 4 years ago

I think that it is related to the new privacy/authorization flow on OSX, authorizing the app in the Security & Privacy settings should work

bbedevian commented 3 years ago

Oktapodia's suggestion worked for me. Needed to authorize VS code to "control computer"