Skip to content

On Mac, the Electron program will always display a permission setting window every time it is opened. #476

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

Closed
1 of 3 tasks
mushan0x0 opened this issue Feb 15, 2023 · 9 comments

Comments

@mushan0x0
Copy link

Version

3.0.0

Short overview

import { Key, keyboard } from "@nut-tree/nut-js";
keyboard.pressKey(Key.LeftControl);

Issue occurs on

  • Virtual machine
  • Docker container
  • Dev/Host system

Detailed error description

Every time the official packaged Electron program is opened on a MacOS 13.0.1, a permission request window will pop up, even for those that have already been authorized. I hope that it can be manually triggered and that those who have already been authorized will not be prompted again.

@s1hofmann
Copy link
Member

The lowlevel provider of nut.js checks the required permissions during runtime. If they are not given, the permission request dialogue is shown.

So once the required permissions are given, the dialogue wont be shown.

@mushan0x0
Copy link
Author

The lowlevel provider of nut.js checks the required permissions during runtime. If they are not given, the permission request dialogue is shown.

So once the required permissions are given, the dialogue wont be shown.

Yes, I have already authorized both the authorization for assistive functions and the authorization for screen recording, and have also added programs developed by both terminal and Electron.

image

@s1hofmann s1hofmann added the Can't reproduce A bug report that can't be reproduced label Feb 15, 2023
@s1hofmann
Copy link
Member

I can't reproduce said issue.

I just double checked and did a clean build of an Electron application using nut.js.
Works exactly like I described above.

Closing, feel free to re-open with additional info like a repo I can use to test.

Best regards

Simon

@ahmedmukhtar1133
Copy link

ahmedmukhtar1133 commented Mar 21, 2023

Facing exact same issue, it keep asking for permissions each time app opened on arm64 machine.

@s1hofmann
Copy link
Member

@ahmedmukhtar1133 On which version of nut.js?

@ahmedmukhtar1133
Copy link

@s1hofmann
"@nut-tree/nut-js": "^3.0.0"
"electron": "^22.1.0"

@s1hofmann
Copy link
Member

@ahmedmukhtar1133 Please upgrade nut.js to latest, e.g. 3.1.1

@ahmedmukhtar1133
Copy link

@s1hofmann In latest version now it just don't show the permission pop-up but quietly opens the accessibility screen each time.

@ahmedmukhtar1133
Copy link

ahmedmukhtar1133 commented Mar 22, 2023

@s1hofmann
It seems actual issue is different.

Here is how I've fixed it:
Development app and production apps were mixed up due to same names (so I was giving permission to development app and was testing the production one). So I completely removed all the apps from accessibility list.
Renamed the app to different one, then move the .app to applications.

And provided the access on first ask for renamed app and now it's working fine.

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

3 participants