twitch-points-autoclicker icon indicating copy to clipboard operation
twitch-points-autoclicker copied to clipboard

Timeout breaks the auto-clicker

Open Mydnaa opened this issue 5 years ago • 6 comments

If you get a timeout from a mod/bot, the auto-clicker stops working until you refresh the page. The chest icon still appears though.

Mydnaa avatar May 06 '20 15:05 Mydnaa

Will look into it. Thank you for feedback!

xinitrc-dev avatar May 06 '20 16:05 xinitrc-dev

Is this fixed?

gbzret4d avatar Mar 21 '21 02:03 gbzret4d

Is this fixed?

I haven't looked into this since I changed how element detection works. Let me know if the issue persists so I can focus on debugging it

xinitrc-dev avatar Mar 21 '21 02:03 xinitrc-dev

Hey @xinitrc-dev thought I'd add into this issue as I've spent this evening looking into this issue the bonus chest (for want of a better word) sometimes isn't clicked. Firstly I also want to take the opportunity from me and the other 8000+ users to say a big thank you for this amazing extension. I saw others making comments on the chrome extensions main page about it not working - so thought I'd look into it. I've recreated it working and not working.

So quick background: I'm using the lite version v1.2 on Microsoft Edge (in strict tracking mode + uBlock origin).

Root cause: the v1.2 lite code is actually working completely fine - it's all just down to the 10 seconds in the setTimout() in twitch-clicker.js. I've found that even on my 100Mbit connection, with all the tracking-blocking I'm doing, that the line

document.getElementsByClassName('community-points-summary').arrive('button', clickPoints);

never takes since the points (with class 'community-points-summary') just isn't there when the code is ran. To confirm it, I've turned off uBlock origin, tried again - and it works fine. To confirm it's not uBlock I also turned it back on, and found that when the page loads quickly (within 10 secs) then it all works.

How you want to correct I'll leave to you - maybe wrap the document.getElementsByClassName('community-points-summary').arrive('button', clickPoints); line in a try catch and set a bool to false if it errors and have another function which fires a minute later which checks that bool and tries again? (lol or just increase the timeout - easier, if less elegant)?

Again, big thanks for your work on this. Has saved thousands of us twitch watchers from annoyingly having to stop what we're doing just to click the bonus box!

MrSimonC avatar May 04 '21 22:05 MrSimonC

@MrSimonC thank you for your very kind words and time spent looking into this! I am not sure if the original problem of timeouts affecting the page could be resolved with this, however I did add a 10-try system where the script will now only give up after all 10 tries are unsuccessful (1.5 mins total, 10 seconds apart), see -> eaab635 . This should hopefully be sufficient for all your tracker-blocker hamsters to spin their wheels! :p P.S.: If timeout issue is still a thing, let me know, so I can look into that separately :) P.P.S.: I've uploaded the new version to the webstore, however google be slow pokes, so it'll probably take at least couple of hours

xinitrc-dev avatar May 05 '21 00:05 xinitrc-dev

Just wanna say a super quick thanks for pushing out this change so quickly! I had a quick look, and can see the update working well… But I'll look more thoroughly during the week to see if the issue reappears (and will open a different issue if it does)! Thanks again! Appreciate it!

MrSimonC avatar May 08 '21 09:05 MrSimonC