-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] [debug] BAD BOT! [error] Failed to claim drop reward #212
Comments
It seems Twitch is starting to implement some anti-bot checks which prevents the bot from doing some actions like claiming drops. I'm not sure how to get around this yet. |
Yep they start uses https://www.kasada.io/ how i hear. |
What is mean ? Watching channels ? Or set "climed"' drops in inventory ? |
Have you tried "claiming" through the inventory page? - Or does that enforce the same checks? |
Locally claiming them seems to work fine, even if you "script" it with a tampermonkey script like https://greasyfork.org/es/scripts/420346-auto-claim-twitch-drop . |
I couldn't get the greasyfork script to work (I use greasemonkey, not tampermonkey, so that may be the issue), but there are also browser extensions that do the job. EDIT: Disregard, multiple monitor woes. |
From what I've seen, you can't login (unless you already have saved cookies), and you can't claim drops. Watching stream should still work. It seems that they are somehow detecting that the bot is using Puppeteer and blocking those requests. Using a browser extension to auto claim drops might be the best alternative for now. |
Currently, the bot still: Watches streams for you (making you eligible for a drop) The bot can currently not: Claim drops for you - this is the 'claim' button on the inventory page. |
The greasyfork script runs well. |
Or use puppeteer's ability load extension and use simple ChannelPointCollector. It has both chrome and firefox version. |
|
Maybe it is possible to include this chrome addon or talk with the dev about how he fixed his stuff? |
Not working, you can see in the "Support" tab several people saying it is no longer claiming drops (since ~1 week ago). |
The extension claimed correctly for me, today. While the bot didn't. |
Hum, nice. I use Tampermonkey to do this for me and it works too (I just made a small JS script). But, the extension worked with Puppeteer?
|
Does the bot claim the drops on the inventory page? For me the button to claim drops in the chat doesn't show up anymore. |
@yukaiin I tried this extension with Puppeteer and it does not work! However, I opened another instance of Chromium (without Puppeteer) with the extension and let a tab at https://www.twitch.tv/drops/inventory and, yes, it does claim the drop! The only problem is Twitch might be detecting Puppeteer, so it is not as simple as simply putting this extension as a chrome addon. It's not the best solution, but I have now two instances of Chrome (one from Twitch-Drop-Bot being called by Puppeteer, and another with the extension), but, at least, it is working. |
I've been messing around with it a bit and it seems like their anti-bot detection is pretty complicated. I believe they are using some sort of browser fingerprinting to detect bots, maybe in addition to other factors. If I launch a normal Chrome instance and attach to it with Puppeteer (as opposed to launching it via Puppeteer), I can successfully claim drops but it only works sometimes. Sometimes it passes the integrity check and sometimes it doesn't and I'm not sure why. The other thing to note is that it never works in headless mode so I guess they can detect that every time. I've also tried running a non-headless Chrome instance in a docker container but I keep getting some rendering errors when trying to load the Twitch page. I tried Firefox as well, which does not have any rendering issue, but it doesn't seem to work properly with the existing code. |
I think migration to Firefox for drop claiming might be a necessary switch. What a hassle, though. |
We could run both in parallel. |
Or it's then a question of time until they also block instrumented Firefox. |
TychoTheTaco any way manage FF an Chome not use puppetir ? Simple use commad line swithes for launche browsers in headles mode or hiding chrome/ff windows and set minima screen size . Manage browser via switches and devtool and set minimal resource consumptions and load extension or just use installd ? |
While suggesting things that are not Puppeteer, there is https://github.com/ultrafunkamsterdam/undetected-chromedriver |
I believe for me the extension works, at least with the browser (Twitch) window increased to a big enough size that it shows the chat, and not in headless mode. Notes: |
I say trivial things but bot need to open 2 pages - a page with a video stream and inventory page from which extension claim drop. How i can see chat drop not now working in that extensions and userjs. If chorme or puppeter can execute userjs directly we may use lightweight js from greasyfork or openuserjs.org. |
• My account that worked in headful mode also claims new drops in headless, at |
If what answer for me " chat drop not working" meaning extensions or js no claim drops from chat by viewing in normal browser (no matter Chrome or FF) on usual windows size like before twitch was that anibot update(no relogins in FF).But if open inv.tab drop got clime or keep invetory tab open then they works. Of course it only behavior descriptions on me. Ah and chat allway be closed. |
If you have a "What kind of cookies would you like?" prompt that refuses to disappear, or you get "Something went wrong" when you try to log in, or you cannot manually claim a drop in that browser profile with "Error Occurred: Drop was not claimed.", you are shitlisted as a bot. These are all symptoms of integrity check failure. I spent a lot of time on trial and error to fix that troubled account. Spoilers: I think that I had ~10 pending drops was a big part of the problem. If you don't feel like replacing the cookies-accountname.json values with new ones by hand and just delete the file, you will run into trouble with TWB wanting to make you log in, which will crash due to the lack of a login prompt; an ugly way to skip it is to neuter After that, with a persistent browser profile created manually (using the same profile every time is not supported in the current TDB release version), and using the extension, and (I guess) with the screen resized so that the chat with drop prompt appears for the extension to claim the drops, .. it works. 😅 so for "browser": whatever browser you made the browser profile folder with (I use Chrome & Edge) How to specify the path to your not-yet-detected user profile is a topic for #219 To test if your profile works, And as a bonus, once you are happy and don't want to die of gigabyte sized log files anymore,
P.S.: I didn't figure out if there is a way to have Puppeteer launch Chrome without harming already installed Chrome Web Store extensions. It's of course not great to have to unpack the extension and keep it updated yourself, especially if using the same profile folder every time. |
I guess this kinda died now :( |
How about adding functionality to send email when drop is ready to be claimed until you figure out some workaround? |
i can tell that this tool is working for me without docker just normal chrome and this addon https://chrome.google.com/webstore/detail/automatic-twitch-drops-mo/kfhgpagdjjoieckminnmigmpeclkdmjm |
With a secondary Chrome or the method I describe above? |
Sry im not into coding etc, xd its just a normal chrome nothing special with this addon |
Hoping this is still being looked into and hopefully a solution can be found soon.. |
This isn't viable right now, but I would keep an eye on this https://github.com/Kappador/twitch-integrity at least, seems like they are trying to solve the integrity issue (though it seems they are currently sick so commits have kind of stopped for the time being) but it could be of some use in the future. Edit: also I'm not sure how exactly, but it seems like https://github.com/DevilXD/TwitchDropsMiner got around the integrity system by using an unprotected Android app Client ID.. Maybe you could try something like that? @TychoTheTaco ----- Would obviously need some testing before releasing if it was something that is possible in this script. |
Checked on this again and went into the TwitchDropsMiner that @JourneyOver mentioned. This is the actual issue that was opened and investigated DevilXD/TwitchDropsMiner#40. I'll see if I have time to check how they did it in v13. But I can only see Twitch locking down their platform with more "extra security check" so not big hopes for the future. |
@sirmaestro this issue is currently a continuation of issue 40 seems they had locked down login a bit more as of recent but going by this comment there is somewhat of a solution in the making and he is planning on pushing something for testing when he has time. edit: the login lockdown seems to have been somewhat limited as at least the twitchdropminer from DevilXD is back to working order in being able to login again. |
Hi. @TychoTheTaco If you're struggling with drop claiming and the integrity system, the android app client ID seems to not require having to deal with integrity at all. And this is how you can obtain an authorization token for the new ID (new ID included at the top too) in Python: https://github.com/6accOnThe6locc/twitch-mobile-token/blob/main/main.py Caution! This linked repo is volatile and can/will disappear later on, use it while you can or save contents locally for later. Make sure not to criss-cross the old cookie / authorization token with this new client ID for GQL usage, because Twitch is going to slap you on the wrist - you have to obtain an authorization token for the same client ID you plan on using for GQL requests later on. I'm leaving implementing all of this to you. Hope this helps =) |
Hi, By removing the headless and random navigation on twitch, I was able to redeem a drop via the puppeteer instance. Cheers, |
Hi all, Worked around the issue on an ugly way, You can use this container: https://hub.docker.com/r/jlesage/firefox Cheers, |
Could you explain how you did this? I can't seem to login on firefox in docker. |
On this particular docker image? |
Yeah with this docker, however I downloaded a cookie export extension and imported it into the browser... that works too. |
is there a docker version for chrome? the greasymonkey tool doent realy work but his addon does work very well for me but cant find a chrome docker thing sry xd not rly into docker https://chrome.google.com/webstore/detail/automatic-twitch-drops-mo/kfhgpagdjjoieckminnmigmpeclkdmjm |
I don't know how it works for you because even claiming drops does not work in the docker.. Twitch detects it is in a docker and doesn't allow me to do anything like logging in or claiming drops. |
I would say it is related to your cookies then or your IP maybe? I had an issue few week ago prior to that approach that even my Chrome browser wasn't able to login. Since then didn't got any issue; would you mind give a try? Do you have your 2FA enable? Are you over a VPN? On my case:
Cheers, |
Could you please write how to setup it? I'm just bad at linux and docker. |
I just got a working (non headless) bot on a linux VM by using remote debugging feature. I also opend a feature request which contains a small how-to: #275 The bot controlled Chromium did not yet reach the point to claim a drop, but the browser instance was able to claim before. so i have hope =) I'll try to update the info if claiming the next drop was successful. |
the extensions its working, you just need a workaround bc of new Chrome version. The dev of extensions in his discord said: To remedy the situation, a new experimental feature was added to the extension. |
Describe the bug
With the latest version of the branch dev, it still seems to give an error when claiming drops.
Attached on logs whole log since started.
Logs
log-1664265690313.txt
The text was updated successfully, but these errors were encountered: