sindresorhus / get-windows

Get metadata about the active window and open windows (title, id, bounds, owner, etc)
MIT License
768 stars 159 forks source link

App keeps askig for accessibilityPermission even if accessibilityPermission: false #182

Open krisdante opened 4 months ago

krisdante commented 4 months ago
const info = await activeWindow({
      accessibilityPermission: false,
      screenRecordingPermission: true,
    });

With this code, for some reason, the Electron app keeps asking for accessibility permission. It keeps asking, even if both settings are false.

Is this some macOs 14.2.1 (23C71) miss-compatibility?

Why are those flags marked read-only in the interface?

sindresorhus commented 4 months ago

Can you confirm you are on version 8.2.1?

krisdante commented 4 months ago

Yes I am

sindresorhus commented 4 months ago

// @kentbetita

kentbetita commented 3 months ago

Hey! Sorry for the delay.

I ca confirm that even when setting accessibilityPermission: false, it is still prompting for accessibility permission when fresh installing active-win.

I've been using the locally compiled mac binary ever since my #180 was merged. I didn't realize it was still causing errors because mine was working fine. I ended up forking the repository and commenting out the code for the accessibility check to confirm that was the issue.

Do you think compiling locally could have played a role in this? My version is running smoothly without any problems.

SRichner commented 3 months ago

Having the same issue (also using 8.2.1)

Thank you both very much for another awesome package and your contributions.

casaout commented 3 months ago

I ca confirm that even when setting accessibilityPermission: false, it is still prompting for accessibility permission when fresh installing active-win.

I can confirm this as well. Thanks for bringing this up; we were quite unsure if we've implemented it wrongly

SRichner commented 3 months ago

I've been using the locally compiled mac binary ever since my #180 was merged. I didn't realize it was still causing errors because mine was working fine. I ended up forking the repository and commenting out the code for the accessibility check to confirm that was the issue.

Do you think compiling locally could have played a role in this? My version is running smoothly without any problems.

I can confirm that compiling and running active-win locally (macOS Sonoma, Node 18) does not prompt for the accessibility permission (i.e., I set accessibilityPermission: false in the first active-win test case and no prompt is shown, setting it to true shows the prompt).

SRichner commented 4 weeks ago

Is there any update on this issue? @sindresorhus could you maybe have a look at this or give any pointers for a potential PR?