prashantgupta24 / automatic-mouse-mover

a minimalistic go library/app to keep your mac active and alive
MIT License
288 stars 33 forks source link

Errors seen on very rare occasions #19

Closed prashantgupta24 closed 3 years ago

prashantgupta24 commented 3 years ago

On very rare occasions the app throws the Unable to move mouse pointer error.

I still haven't been able to figure out the exact scenario when it happens.

Let me know if anyone else also faces the issue and at what time.

Edit: This doesn't affect the ability of the app to move the mouse, it's a one-off error, which means the app had issues moving the mouse 3 times in a row.

Jcragons commented 3 years ago

Yep, it happend here, I was just letting the mouse on a remote streaming computer. Do you need any context?

prashantgupta24 commented 3 years ago

Sure! Let me know if there is a way for you to reproduce it

pjmartorell commented 3 years ago

It happened to me as well, any idea of what is the issue?

prashantgupta24 commented 3 years ago

Most probably the issue is related to the github.com/go-vgo/robotgo repo, since that is the engine behind this app. I can see 2 reasons for this error:

  1. Under a very specific scenario, the robotgo library doesn't let me query robotgo.GetMousePos() accurately, which makes this app think that the mouse didn't move, and hence reports the error.
  2. Under a very specific scenario, the robotgo library doesn't let this app move the mouse itself, which makes this app report the error that the mouse didn't move.

It's all very random, so I am not able to pinpoint where and when it happens.

Also I haven't found the time to integrate with robotgo's latest releases, there's a chance that might fix things (but not sure).

The good thing is the app will continue to move the mouse even after the error occurred, so it won't hinder the functionality.