Kap: `mac-screen-capture-permissions` causing Unhandled Promise Rejection

Sentry Issue: KAP-BPC

macOS version: Monterey (12) Kap version: 3.5.3

Unhandled Promise Rejection

Error: Command failed: /Applications/Kap.app/Contents/Resources/app.asar.unpacked/node_modules/mac-screen-capture-permissions/screen-capture-permissions
spawnSync /Applications/Kap.app/Contents/Resources/app.asar.unpacked/node_modules/mac-screen-capture-permissions/screen-capture-permissions Unknown system error -86
    at Function.module.exports.sync (/Applications/Kap.app/Contents/Resources/app.asar/node_modules/mac-screen-capture-permissions/node_modules/execa/index.js:168:25)
    at exports.hasScreenCapturePermission (/Applications/Kap.app/Contents/Resources/app.asar/node_modules/mac-screen-capture-permissions/index.js:27:25)
    at ensureScreenCapturePermissions (/Applications/Kap.app/Contents/Resources/app.asar/dist-js/common/system-permissions.js:64:23)
    at /Applications/Kap.app/Contents/Resources/app.asar/dist-js/index.js:102:65

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 21
  • Comments: 19 (3 by maintainers)

Commits related to this issue

Most upvoted comments

Hi, tested on Macbook Pro 2021 (arm CPU, MacOS Mojave) with Kap 3.5.5 as suggested by @thethomasz:

  • if Rosetta (x86_64 emulator) is NOT installed, Kap raises the exception and doesn’t work at all
  • if Rosetta is installed, Kap works –> Kap is not working on the pure ARM, but it works with the Rosetta emulator “workaround”.

PS: To install Rosetta, run softwareupdate --install-rosetta --agree-to-license

As a troubleshooting step I tried manually granting Kap screen recording access (System Prefs -> Security -> Screen Recording -> Click ‘+’ and add Kap.app), but that did not help unfortunately

I’m running macOS 12.3 on an M1 Pro MacBook

Any chance of getting a fix for this for Macs without Rosetta installed?

I did two things and the error went away:

  • Restarted my Mac (MacBook Pro M2)
  • Installed Rosetta for old intel apps (even though I’m using the latest KAP version for Apple Silicon)

This error also occurs for me

  • MacBook Pro (M1 Pro - 2021)
  • macOS Ventura 13.1
  • Kap version: 3.6.0
Unhandled Promise Rejection
Error: Command failed: /Applications/Kap.app/Contents/Resources/app.asar.unpacked/node_modules/mac-screen-capture-permissions/screen-capture-permissions
spawnSync /Applications/Kap.app/Contents/Resources/app.asar.unpacked/node_modules/mac-screen-capture-permissions/screen-capture-permissions Unknown system error -86
    at Function.module.exports.sync (/Applications/Kap.app/Contents/Resources/app.asar/node_modules/mac-screen-capture-permissions/node_modules/execa/index.js:168:25)
    at exports.hasScreenCapturePermission (/Applications/Kap.app/Contents/Resources/app.asar/node_modules/mac-screen-capture-permissions/index.js:27:25)
    at ensureScreenCapturePermissions (/Applications/Kap.app/Contents/Resources/app.asar/dist-js/common/system-permissions.js:64:23)
    at Object.openCropperWindow [as open] (/Applications/Kap.app/Contents/Resources/app.asar/dist-js/windows/cropper.js:81:66)
    at Object.openCropperWindow (/Applications/Kap.app/Contents/Resources/app.asar/dist-js/tray.js:26:129)

UPDATE (25.09.23): For me the issue is resolved. I’m currently on

  • MacBook Pro (M1 Pro - 2021)
  • macOS Ventura 13.5.2
  • Kap version: 3.6.0

I ran into this after upgrading from Big Sur to Monterey on an Intel MacBook. I was eventually able to get things working after trying the following a few times:

rm -rf /Applications/Kap.app
brew install --cask kap
open /Applications/Kap.app

When the System Preferences Privacy dialogue came up, I pressed - to remove Kap. I then clicked + to add /Applications/Kap.app. Quit Kap & re-open. I tried variations of this a few times and it didn’t work… so your mileage may vary!

Also, the Kap issue tracker has a bunch of seemingly duplicate issues related to this problem.

I’m still seeing this on macOS 12.4 on an M1 computer. I tried a full reinstall, and also manually adding the screen recording permissions for Kap, but no luck. This machine currently does not have Rosetta installed, which could possibly be a factor (another machine with the same specs that does have Roesetta installed is not having this problem).