sindresorhus / get-windows

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

active-win not working after release #121

Open thanhnvpk01168 opened 3 years ago

thanhnvpk01168 commented 3 years ago

This is the error when i log in catch

my code: let result="" try { result = await activeWindow() } catch (error) { console.log("erorr: ",JSON.stringify(error)) }

error: { "killed":false, "code":null, "signal":"SIGILL", "cmd":"/Users/myname/Documents/projecttest/dist/mas/AppTest.app/Contents/Resources/app.asar.unpacked/node_modules/active-win/main", "stdout":"", "stderr":"" }

Environment: macOS Big Sur 11.2.3 electron:11.2.1 node: 14.15.0 active-win: 7.6.0

Can anyone help me urgently? thanks in advance

ahmedmukhtar1133 commented 3 years ago

@thanhnvpk01168 how fid you fix it? Me also facing the same issue on BigSur but in development environment as well.

cesarvarela commented 3 years ago

Are you guys using electron forge?

ahmedmukhtar1133 commented 3 years ago

Nope, I'm not using any boilerplate.

smearumi commented 2 years ago

I'm facing the same issue. Has anyone already resolved the issue? Best regards.

ambarvm commented 2 years ago

This could be due to the app not having the screen recording permission and getting killed by macOS. Does the permission prompt show up in your case? If not, try manually adding the screen recording permission to the binary active-win/main shown in the error.