rxhanson / Rectangle

Move and resize windows on macOS with keyboard shortcuts and snap areas
https://rectangleapp.com
Other
25.1k stars 742 forks source link

MacOS Sonoma(14.2.1) Unable to obtain window id #1325

Open abdlkrmdlgr opened 5 months ago

abdlkrmdlgr commented 5 months ago

When i wake up my device, rectangle not working properly. There are not working any shortcut and action. After restart my device, it's working again. I guess it's related with macOS version, before update to Sonoma it did not happened.

macOS version: 14.2.1 Rectangle version: Version 0.75 (81) Logs if applicable (In Rectangle menu, hold option, "View Logging..."):

2024-01-22T10:03:16+03:00: Unable to obtain window id
2024-01-22T10:03:17+03:00: Unable to obtain window id
2024-01-22T10:03:17+03:00: Unable to obtain window id
2024-01-22T10:03:19+03:00: Unable to obtain the accessibility element with the specified attribute at mouse location
kurzdev commented 5 months ago

Experiencing the same issue with macOS 14.2.1 and Rectangle v0.75 Build 81

rxhanson commented 5 months ago

You could try unregistering Rectangle from accessibility privileges in macOS and re-adding it. If you do this, you'll want to follow these steps:

  1. Close Rectangle if it's running
  2. In System Settings -> Privacy & Security -> Accessibility, first disable Rectangle, then remove it with the minus button. (it's important to do both of those steps in that order)
  3. Restart your mac.
  4. Launch Rectangle and enable settings for it as prompted.

Or, if you're handy with the Terminal you can just execute this terminal command: tccutil reset All com.knollsoft.Rectangle

Sometimes the accessibility registration can just be flaky.

webskigosc commented 4 months ago

Hey 👋🏻 I have the same problem, after wake up my device, rectangle not working but if I again switch the laptop to sleep mode and immediately wake it up it starts to work properly. This always happens after the device has been in sleep mode for about maybe 3h+ (for a long time). Of course, I checked the above solution, but unfortunately, after switching to sleep mode, the problem returns.

macOS Sonoma - version: 14.2.1 Rectangle - version 0.75 (81) Logs looks the same as above.

rxhanson commented 4 months ago

@webskigosc thanks for reporting. Sometimes other apps that are using accessibility permissions can cause accessibility instability issues like this. You could try pruning your list if there's anything unnecessary in there.

Aside from that, you could also try this terminal command to change the way that Rectangle obtains the window under the cursor:

defaults write com.knollsoft.Rectangle systemWideMouseDown -int 1

webskigosc commented 4 months ago

Thanks @rxhanson! Before writing the previous message, I looked at the access list and removed everything unnecessary. However, there are still such applications left as:

Maybe the given information will help in some way. In any case, I will check the given command in the terminal and try to let you know in a few days if it helped.