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

Bug: IOHIDDeviceOpen error: (iokit/common) not permitted #1211

Open
1 task done
aljustiet opened this issue Aug 27, 2024 · 6 comments
Open
1 task done

Bug: IOHIDDeviceOpen error: (iokit/common) not permitted #1211

aljustiet opened this issue Aug 27, 2024 · 6 comments
Assignees
Labels
bug Something isn't working macos Issue pertains to macos; jtroo has no macOS devices and does not maintain the support for it.

Comments

@aljustiet
Copy link

Requirements

Describe the bug

Can't run the kanata. having permission related issue
When I run:

sudo kanata --nodelay --cfg ~/Documents/mac-arch/kanata.lsp

I get:

2024-08-27T22:38:02.385497+05:00 [INFO] kanata v1.6.1 starting
2024-08-27T22:38:02.386648+05:00 [INFO] process unmapped keys: true
2024-08-27T22:38:02.387009+05:00 [INFO] NOTE: kanata was compiled to never allow cmd
2024-08-27T22:38:02.389551+05:00 [INFO] config file is valid
2024-08-27T22:38:02.389593+05:00 [INFO] entering the processing loop
2024-08-27T22:38:02.389608+05:00 [INFO] entering the event loop
2024-08-27T22:38:02.389615+05:00 [INFO] Starting kanata proper
2024-08-27T22:38:02.389618+05:00 [INFO] You may forcefully exit kanata by pressing lctl+spc+esc at any time. These keys refer to defsrc input, meaning BEFORE kanata remaps keys.
IOHIDDeviceOpen error: (iokit/common) not permitted
IOHIDDeviceOpen error: (iokit/common) not permitted
IOHIDDeviceOpen error: (iokit/common) not permitted
2024-08-27T22:38:02.404165+05:00 [ERROR] failed to open keyboard device(s): Couldn't register any device


Press enter to exit
2024-08-27T22:38:02.404174+05:00 [ERROR] channel disconnected

Relevant kanata config

https://rentry.co/4qvbsknp/raw

To Reproduce

  1. Open terminal
  2. Run kanata --cfg config.kbd
  3. Get an error

Expected behavior

Shouldn't have error

Kanata version

kanata 1.6.1

Debug logs

2024-08-27T22:48:30.251437+05:00 [INFO] kanata v1.6.1 starting
2024-08-27T22:48:30.252508+05:00 [INFO] process unmapped keys: false
2024-08-27T22:48:30.252827+05:00 [INFO] NOTE: kanata was compiled to never allow cmd
2024-08-27T22:48:30.252833+05:00 [DEBUG] (1) kanata_parser::cfg::alloc: freeing allocations of length 0
2024-08-27T22:48:30.255348+05:00 [INFO] config file is valid
2024-08-27T22:48:30.255394+05:00 [INFO] entering the processing loop
2024-08-27T22:48:30.255407+05:00 [INFO] entering the event loop
2024-08-27T22:48:30.25542+05:00 [INFO] Starting kanata proper
2024-08-27T22:48:30.255424+05:00 [INFO] You may forcefully exit kanata by pressing lctl+spc+esc at any time. These keys refer to defsrc input, meaning BEFORE kanata remaps keys.
IOHIDDeviceOpen error: (iokit/common) not permitted
IOHIDDeviceOpen error: (iokit/common) not permitted
IOHIDDeviceOpen error: (iokit/common) not permitted
2024-08-27T22:48:30.27162+05:00 [ERROR] failed to open keyboard device(s): Couldn't register any device


Press enter to exit
2024-08-27T22:48:30.271629+05:00 [ERROR] channel disconnected
2024-08-27T22:48:30.271657+05:00 [DEBUG] (2) kanata_parser::cfg::alloc: freeing allocations of length 2983

Operating system

MacOS Sonoma 14.6.1

Additional context

Installed using cargo.

@aljustiet aljustiet added the bug Something isn't working label Aug 27, 2024
@rsomani95
Copy link

rsomani95 commented Aug 31, 2024

I'm facing the same error (I'm also on macOS Sonoma 14.6.1). I installed via the binary in the Releases. I've cycled through some other issues that discuss this but none of the suggestions worked there either.

I verified that the dext part of the installation happened correctly as I can see the virtual keyboard in system settings:
CleanShot 2024-08-31 at 15 17 45@2x

Additionally, I verified the version like so:

> defaults read /Applications/.Karabiner-VirtualHIDDevice-Manager.app/Contents/Info.plist CFBundleVersion
3.1.0

@Reucherian
Copy link

Reucherian commented Sep 3, 2024

This error is likely due to macOS's TCC (Transparency, Consent and Control).
Under Settings > Privacy and Security > Input Monitoring
Check if Kanata (and/or the terminal of your choice is present along with karabiner)
Screenshot 2024-09-03 at 2 10 55 PM
Adding the Kanata binary ( from ~/.cargo/bin/kanata especially if you're using it as a launch daemon) and adding your terminal to this list should solve the issue.

@rsomani95
Copy link

@Reucherian i believe i've set that up correctly. Here's what my input monitoring window looks like:

CleanShot 2024-09-03 at 15 06 37@2x

Still doesn't resolve the issue for me

@rsomani95
Copy link

I noticed you have a karabiner_observer, which I'm missing.
Is that something you added explicitly? If so, how does one go about doing it?

@Reucherian
Copy link

That is not something I added explicitly. Are you certain that kanata or the terminal application you use is on this list?
I don't see either in the screenshot.

To add a new application you can click the + button on the bottom and either drag the application to the new finder window or navigate to it using that window.

@jtroo jtroo added the macos Issue pertains to macos; jtroo has no macOS devices and does not maintain the support for it. label Sep 14, 2024
@Z233
Copy link

Z233 commented Oct 6, 2024

I faced the same problem and resolved it by:

  1. Adding the terminal app (in my case, iTerm) to the "Input Monitoring" list.
  2. Completely quitting Karabiner-Elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macos Issue pertains to macos; jtroo has no macOS devices and does not maintain the support for it.
Projects
None yet
Development

No branches or pull requests

5 participants