kasper / phoenix

A lightweight macOS window and app manager scriptable with JavaScript
https://kasper.github.io/phoenix/
Other
4.38k stars 127 forks source link

Does not consistently reposition Google Chrome windows? #224

Closed j6k4m8 closed 4 years ago

j6k4m8 commented 6 years ago

With latest Google Chrome (69 - nice), it appears that while some repositioning commands work, others — especially when run in quick combination with other commands — fail without an error logged.

Curious if others have experienced this? Perhaps a fluke, but my profile available here has worked for many version of Chrome before this one.

j6k4m8 commented 6 years ago

The issue logged to the console is:

Error: Could not set accessibility attribute “AXSize” with value “<AXValue 0x60000005e960> 
{value = w:1920.000000 h:1080.000000 type = kAXValueCGSizeType}” for element 
<AXUIElement 0x60400024e6a0> {pid=11088}. (-25200)
joeshaw commented 6 years ago

I've started seeing this as well on macOS 10.14 and Chrome 69.

In my phoenix.js I set certain fixed screen layouts when I connect or detach an external monitor, so for me the repositioning is triggered by a screensDidChange event. If I reload from the Phoenix menu item, the Chrome window is repositioned.

I see the same errors in my logs:

Error: Could not get process identifier for accessibility element (null). (-25201)
Error: Could not set accessibility attribute “AXPosition” with value “<AXValue 0x600002263630> {value = x:931.000000 y:0.000000 type = kAXValueCGPointType}” for element (null). (-25201)
Error: Could not set accessibility attribute “AXSize” with value “<AXValue 0x600002263630> {value = w:1629.000000 h:1417.000000 type = kAXValueCGSizeType}” for element (null). (-25201)
kasper commented 5 years ago

I would assume they broke something in their accessibility support. Still happening with newer Chrome builds?

joeshaw commented 5 years ago

Yes, I removed my workaround (to reposition it after 5s) and it seems to be working consistently from screensDidChange now.

kasper commented 5 years ago

@joeshaw To just clarify, newer Chrome builds work?

joeshaw commented 5 years ago

@kasper Yes, with Chrome 71 it appears to work for me 100% of the time now.

kasper commented 5 years ago

@joeshaw Great! Thanks for the information!

joeshaw commented 5 years ago

Unfortunately this seems to have cropped back up. 🙁 Still on Chrome 71, so I can't explain why.

kasper commented 4 years ago

I think this is mostly a bug in Chrome so it doesn’t support accessibility commands properly. If you find anything more, let me know.