Chromium based browsers stuck after 10k
lucahammer opened this issue · 6 comments
For some reason Chromium based browsers (Chrome, Microsoft Edge, Brave,...) stall after the deletion of 10k Tweets. By using the Advanced Options and skipping the already removed Tweets, the rest of the Tweets can be deleted.
Firefox does not have this issue and removes up to 350k Tweets in one go. Probably more, but that was the highest amount that got reported back.
With Chrome and with Edge, the process stops at circa 16300 deleted tweets. With Firefox, this does not happen.
Closing the browser console after pasting the script seems to improve speed and memory usage. I wasn't able to reproduce the issue myself, but maybe someone who experiences it, could test if closing the browser console solves it.
Looking at the script myself in Chrome, as I'm hitting timeouts after ~900 tweets. I've made a modification to deleteTweets() that adds a 5 second timeout (given that the replies come back in under 100 milliseconds). If it times out, it warns the user, pushes the tweet ID back in, and sleeps for 15 seconds. It then loops back around. Adding the timeout seems to make the script more robust -- I'm now getting rate limiting responses back.
I also added some style tweaks because I'm using dark mode and it's inheriting the white text.
That sounds great, do you want to create a pull request or should I add the modifications directly?
Apologies for not getting on this earlier. It's been a busy few days. :(
Thanks for getting involved anyways. As you may have seen, I added your suggestions and added you as an author.