vogler/free-games-claimer

epic-games: docker: captcha before it claims the game

Darkkingwill opened this issue ยท 128 comments

Hello. im getting a captcha right before it claims the game. Its says one more step. Im using an unraid docker if that helps

+1 on this issue

I don't get any. What's your setup? Shared IP via CGNAT? Do you get captcha challenges in your local browser as well?

Since I solve the captcha-problem during login, I also get a hcaptcha-challenge everytime it tries to claim the game. Have to log into noVNC to solve. No problems when doing it on my desktop maschine.
Vodafone Cable as ISP.

Yeah I get this issue too with the unraid docker. But this has one happened for the past week or two.

i was looking through the logs and it told me untrusted ip too many login attempts. i had to get another ip address. I ended up running the container through a vpn and i will test it next time theres free games

Hi, been having this issue as well, I can click the captures in the vnc window to solve them temporarily, This is the logs when the issue occurs, not sure why its complaining about too many login attempts, its literally this container that logs in and it does so successfully every time. Not behind CGNAT on IPv4 only, no IPv6 Available for me yet.

I'll refresh my IP later and check again next time a game is released. Forgot to mention im running this in a docker container on Unraid

19/08/2023 11:49:24 am
Current free game: Black Book
19/08/2023 11:49:24 am
Not in library yet! Click GET.
19/08/2023 11:49:38 am
Got hcaptcha challenge! Lost trust due to too many login attempts? You can solve the captcha in the browser or get a new IP address.
19/08/2023 11:49:55 am
Claimed successfully!
19/08/2023 11:50:03 am
Current free game: Dodo Peak
19/08/2023 11:50:03 am
Not in library yet! Click GET.
19/08/2023 11:50:15 am
Got hcaptcha challenge! Lost trust due to too many login attempts? You can solve the captcha in the browser or get a new IP address.
19/08/2023 11:50:30 am
Claimed successfully!

Ok, just to confirm: everyone that has the issue is using Unraid?
Please try if you have the issue using the docker run ... command on a different machine in your local network.

Are you using this template: https://github.com/Nackophilz/unraid_templates/blob/main/free-games-claimer/free-games-claimer.xml?
There seems nothing wrong with it, so it must be something about Unraid.
It's weird, but there have been other issues dependent on the host OS: #149 (HAOS), #173 (Arch).

Are you using this template: https://github.com/Nackophilz/unraid_templates/blob/main/free-games-claimer/free-games-claimer.xml? There seems nothing wrong with it, so it must be something about Unraid. It's weird, but there have been other issues dependent on the host OS: #149 (HAOS), #173 (Arch).

I am using that template, it is the one available on the community apps plugin for Unraid.

No, I am not using unraid. Proxmox Server with a docker lxc image from tteck (proxmox helper scripts). Inside the lxc, I run your docker run command.
Best

I use a Pi4 with UmbrelOS and run the docker container linked on this repos main page directly
I get the captcha even when i renewed my ip adresses right before starting the docker container.

Screenshot_20230819_102818_Spark
Here's an email I'm getting every day. But cause of the capcha after you click get the games.

I haven't claimed them yet. And can this weekend to try anything you may want. I can vpn to my server the rest of the week but I can't move the window to click on or do anything with the webgui.

I tried a few times to solve the captchas and it still occurs on the next try

Same issue on rpi4 running DietPi

Running on rpi4 raspios docker, same issue
edit: having this issue since I installed it, so since at least a month

Captcha does not occur on my desktop pc though

Here's an email I'm getting every day.

@DevXen I thought about that problem before. In cases like this, it might be good to have the option to only send notifications when the status changed.

But if you run it standalone without supervision you won't notice if the store changes and the tool breaks. You should notify either way.

You would. It would just not send the same message multiple times.

It's a bit of detective work to figure out what may be the reason.

Many of you mentioned rpi4. Maybe your setups are too slow since captcha services do computations in JS and check the performance. Did someone with a rpi4 try running it without docker?
You can always run it for free in the cloud: https://github.com/vogler/free-games-claimer/wiki/Host-and-run-free-games-claimer-in-the-cloud-periodically

I made a spreadsheet where you can put in your data: https://docs.google.com/spreadsheets/d/1ulC4E59Hs7aDvpgN-D_QFT3lEmf_j88zY9TMve6faQ4/edit?usp=sharing

  • captcha fgc: no / login / claim / both
  • catpcha other: do you get a challenge on the host / other computer in your network?
  • docker/VM: no / docker version / podman / proxmox / lxc / VM...

Make sure that you run the latest version and keep your data/browser (having to login every time may also increase the risk of getting a captcha challenge).

added mine for you

The same goes for me: for some time now, I've been having constant hcaptchas ^^'.

I use my template for unraid of course haha

I don't think it's related to Unraid or anything, but maybe it's just the method that ended up being flagged?

I also encountered the same problem, also using unraid docker

It feels like the browser is a lot slower in the docker container compared to the computer, although i think a raspberry with 4x1,8ghz and 4gb ram shouldn't be too slow. It worked fine a few weeks before.

Docker in UnRaid, template from community apps,
captcha just before claim on both games
added in spreadsheet

added to spreadsheet. I just set this up about two weeks ago, and Epic has been giving me captcha since the start, unfortunately.

So I wanted to add it's not an IP based limit. I just connected to my home server vpn and claimed the game on my phone just fine with no captcha.

I have 3 docker and 2 out of 3 does it. It started out of nowhere.

I also have this problem, every time. A few weeks ago it used to work fine. Running on Raspi 4 4GB, docker crontab.

I have 3 docker and 2 out of 3 does it. It started out of nowhere.

Same here; I have 2 and only one does it. Docker containers running on Unraid.

Also getting this, running with docker, scheduled with crontab on a Gigabyte NUC (added to the sheet)

Getting the same in Unraid, I have a static IP.
1000005931
1000005930

I have a simple script as a temporary solution if your situation is likely to mine:

  1. Having your own server with public ip(which allow remotely connection to VNC to pass captcha mannualy)
  2. Don't want to build a custom docker container by modifying source js code(Installing NPM dependency takes forever for me)
  3. Still want to get in track with latest change, but need a workaround to make current docker image work
sed -i '/error('\''  Got hcaptcha challenge!/a\\t\t\t\t\tawait notify('\''epic-games: Got captcha right before claim.'\'');' epic-games.js

This script will add a new line

await notify('epic-games: Got captcha right before claim.')

right after
https://github.com/vogler/free-games-claimer/blob/6bb1dca93412c82219bd8f68fd1dec8a42aab01b/epic-games.js#L206C11-L206C11
which will notify out to the channel you configured in environment.
After receiving this, you can use your own device to connect to VNC device to pass the captcha yourself.
Hope it helps.:>

@kevinmatthe Thanks, I added another call to notify in 621032e.
Maybe I'll add an option for a reverse tunnel service like https://serveo.net (given that VNC_PASSWORD is set).

I have 3 docker and 2 out of 3 does it. It started out of nowhere.

Same here; I have 2 and only one does it. Docker containers running on Unraid.

@nodiaque @guipace is there anything different between them?

user account. But lately all three of them are doing it now.

Checking the spreadsheet it only seems to be a problem when using docker...
Can someone confirm that running it without docker fixes it for them? Just need to ssh, git clone, npm install (see Readme).

My assumption was that the JS compute challenge changed and hardware too weak to run the browser/JS fast enough via docker now get a captcha challenge. Running a browser on a RPi is pretty slow. However, there's also more powerful hardware in the list - although all those seem to be on Unraid.

I'll add some timing output so people can compare how long steps of the script take for them and if that's really the issue.
(It could also be something specific to the image, although Ubuntu 22.04 is not that uncommon and I don't know what's visible to the browser besides the resolution.)

I don,T think that'S the problem. My server is not a RPI. I'm running a Xeon W-2275 14-cores/28 threads @3.30ghz with 128gb ram and the docker system run on a nvme drive.

On my end, I think it's too much account login at the same time everyday. Like everyday exactly at same time, I think that triggered a warning.

On my end, I think it's too much account login at the same time everyday. Like everyday exactly at same time, I think that triggered a warning.

Would be my guess as well, if I try to claim the games on my computer (same network as the automated version) I get no captchas

One would need to log out on the computer and see what happens. Because i'd assume that the ip gets flagged and all devices get treated the same.

On my end, I think it's too much account login at the same time everyday. Like everyday exactly at same time, I think that triggered a warning.

If you keep data/browser, it shouldn't need to login. Even checking the page several times a day should be fine.
I don't think they track requests per client to find patterns (e.g. same time every day) - that would be a lot of data to go through.

I don,T think that'S the problem. My server is not a RPI. I'm running a Xeon W-2275 14-cores/28 threads @3.30ghz with 128gb ram and the docker system run on a nvme drive.

@nodiaque I don't see your entry in the list ๐Ÿ˜„ Do you run it on Unraid as well?

Another thing that could be a factor is that you are claiming for several accounts one after another from the same IP.

I added more columns to the sheet:

  • stay logged in (keep data/browser)
  • #accounts (number of different epic-games user accounts)
  • scheduled (how often do you run it?)

On my end, I think it's too much account login at the same time everyday. Like everyday exactly at same time, I think that triggered a warning.

Would be my guess as well, if I try to claim the games on my computer (same network as the automated version) I get no captchas
Another thing that could be a factor is that you are claiming for several accounts one after another from the same IP.

I added more columns to the sheet:

  • stay logged in (keep data/browser)
  • #accounts (number of different epic-games user accounts)
  • scheduled (how often do you run it?)

I'm not so sure on the timing either. Mine runs at a random interval, and I started getting hit with captcha around the same time as everyone else. Have persistent data configured and on residential IP, and I can confirm that it doesn't need to log in every time. Running on pretty beefy hardware, so performance shouldn't be an issue either. Only claiming for 1 account. If I'm speculating, I would place my bet on a change in hcaptcha's challenge and detection of automated browsers. I'm not sure what else would explain a sudden spike in captchas across multiple installations and users.

I would place my bet on a change in hcaptcha's challenge and detection of automated browsers. I'm not sure what else would explain a sudden spike in captchas across multiple installations and users.

That would also be my bet if it affected everyone. However, it only seems to be a problem when running via docker (and even there I don't get any captcha challenge).

I don,T think that'S the problem. My server is not a RPI. I'm running a Xeon W-2275 14-cores/28 threads @3.30ghz with 128gb ram and the docker system run on a nvme drive.

@nodiaque I don't see your entry in the list ๐Ÿ˜„ Do you run it on Unraid as well?

yes unraid

The captcha for me occur directly after login. I used to have it after adding a game and clicking "buy", but now it's directly after logging before checking for any games,

Set TIME=1 to show durations for steps.

Without Docker:

$ TIME=1 node epic-games.js
2023-08-31 16:55:23.732 started checking epic-games
startup: 1.740s
Signed in as *
login: 469.2ms
Free games: [ 'https://store.epicgames.com/en-US/p/homeworld-deserts-of-kharak' ]
Current free game: Homeworld: Deserts of Kharak
  Not in library yet! Click GET.
  Claimed successfully!
claim game: 14.704s
claim all games: 15.061s

$ TIME=1 node epic-games.js
2023-08-31 16:56:18.943 started checking epic-games
startup: 1.733s
Signed in as *
login: 472.977ms
Free games: [ 'https://store.epicgames.com/en-US/p/homeworld-deserts-of-kharak' ]
Current free game: Homeworld: Deserts of Kharak
  Already in library! Nothing to claim.
claim game: 2.453s
claim all games: 2.797s

Using Docker I'm now also getting a captcha challenge during login:

$ docker run --rm -it -p 6080:6080 -v fgc:/fgc/data --env-file data/config.env -e DRYRUN=1 -e TIME=1 -e RECORD=0 ghcr.io/vogler/free-games-claimer node epic-games
Version: https://github.com/vogler/free-games-claimer/tree/
Build:
Xvfb display server created screen with resolution 1920x1080
VNC is running on port 5900 (no password!)
noVNC (VNC via browser) is running on http://localhost:6080

2023-08-31 14:57:21.715 started checking epic-games
startup: 2.525s
Not signed in anymore. Please login in the browser or here in the terminal.
Open http://localhost:6080 to login inside the docker container.
Login timeout is 180 seconds!
Press ESC to skip the prompts if you want to login in the browser (not possible in headless mode).
โœ” Enter password ยท *
CAPTCHA!
^C
Interrupted by SIGINT. Exit!

Instead of showing the captcha challenge, it instead showed a message 'Incorrect response. Please refresh the page.' after the script submits the login:
image
After refresh and manual login via noVNC, I got a normal captcha challenge. On another try, the captcha challenge was shown and detected by the script.
However, even when solving it right, I always get the message above.

What didn't have an effect:

  • changing the resolution from 1280x1280 to 1920x1080,
  • commenting out the hardcoded Windows userAgent, navigator.userAgent is Mozilla/5.0 (X11; Linux aarch64; rv:109.0) Gecko/20100101 Firefox/115.0

I noticed that mouse events don't work right in the container, e.g., browser menus like the right click context menu disappear when moving the mouse over it (you can select items with the keyboard). Maybe it's an issue with Xvfb.

Without Docker I first got a captcha challenge for login as well, but only because of the many login attempts in Docker before.
Changed the IP address and got no captcha challenge on login without Docker:

$ SHOW=1 DRYRUN=1 BROWSER_DIR=data/browser3 node epic-games.js
2023-08-31 22:45:50.421 started checking epic-games
startup: 4.281s
Not signed in anymore. Please login in the browser or here in the terminal.
Login timeout is 180 seconds!
Press ESC to skip the prompts if you want to login in the browser (not possible in headless mode).
โœ” Enter password ยท *
Got a captcha during login (likely due to too many attempts)! You may solve it in the browser, get a new IP or try again in a few hours.
Enter the security code to continue - This appears to be a new device, browser or location. A security code has been sent to your email address at ...
Signed in as *
login: 37.885s
Free games: [ 'https://store.epicgames.com/en-US/p/cave-story-plus' ]
Current free game: Cave Story+
  Already in library! Nothing to claim.
claim game: 1.821s
claim all games: 2.338s
...
$ rm -rf data/browser3
$ newip
old: 2001:a61:5ff:9401:34f5:38fc:f13f:96b2
fritzconnection v1.8.0
FRITZ!Box 7583 at http://169.254.1.1
FRITZ!OS: 7.50
new: 2001:a61:406:301:f031:8831:6d44:75df
$ SHOW=1 DRYRUN=1 BROWSER_DIR=data/browser3 node epic-games.js
2023-08-31 22:50:16.719 started checking epic-games
startup: 4.381s
Not signed in anymore. Please login in the browser or here in the terminal.
Login timeout is 180 seconds!
Press ESC to skip the prompts if you want to login in the browser (not possible in headless mode).
โœ” Enter password ยท *
Enter the security code to continue - This appears to be a new device, browser or location. A security code has been sent to your email address at ...
Signed in as kigu1
login: 12.551s
Free games: [ 'https://store.epicgames.com/en-US/p/cave-story-plus' ]
Current free game: Cave Story+
  Already in library! Nothing to claim.
claim game: 1.525s
claim all games: 1.739s

I've just tested the new version, and I get the Captcha alert when the game is claimed, but still the captcha, which I don't get when I test outside docker ... Strange !

I don't entirely understand your sentence ๐Ÿ˜„ I guess you're confirming, just that you're logged in and get the captcha right before claiming.
Yea, it's something specific to the docker image.

Yes, I'm sorry if I wasn't very clear ^^
Translating French literally into English isn't very easy, sometimes I mix up sentences or words ^^

But yes, I can confirm that it's linked to the Docker image.

I just did some additional testing. If I set the xvfb size to 1920x1080, I no longer get captchas. I got captchas on: 1280x1280, 1202x701, 1701x1018. 1280x1280 gave me a medium difficulty captcha, while the other resolutions gave me hard captchas. I did the 1920x1080 last and I didn't solve any of the previous challenges.

Also, I think setting the xvfb size to a different value than the browser window size may help. But it worked without that on my end.

docker compose for the trial that worked:

services:
  free-games-claimer:
    container_name: fgc # is printed in front of every output line
    image: ghcr.io/vogler/free-games-claimer:latest
    stdin_open: true # docker run -i
    tty: true        # docker run -t
    build: .
    #command: "/bin/bash"
    command: bash -c "node epic-games; node prime-gaming; node gog"
    ports:
      - "x:6080" # noVNC (browser-based VNC client)
    volumes:
      - '/x/fgc:/fgc/data'
    environment:
      - TZ=America/Los_Angeles
      - 'EG_OTPKEY=xxx'
      #- PG_REDEEM=1
      - 'NOTIFY=discord://xxx'
      - WIDTH=1920
      - HEIGHT=1080

Service log:

Version: https://github.com/vogler/free-games-claimer/tree/38975e811bac5133a0895ae450de7a7a5a3f2b9d
Build: Thu, 31 Aug 2023 21:09:15 +0000
Xvfb display server created screen with resolution 1920x1080
VNC is running on port 5900 (no password!)
noVNC (VNC via browser) is running on http://localhost:6080
2023-08-31 15:29:16.023 started checking epic-games
Signed in as x
Free games: [ 'https://store.epicgames.com/en-US/p/cave-story-plus' ]
  This game contains mature content recommended only for ages 18+
Current free game: Cave Story+
  Not in library yet! Click GET.
  Claimed successfully!

Can confirm, 1920x1080 works as expected, no captcha. I can only assume they are now checking for standard screen resolutions >= "standard gamer size". Did you happen to try 1280x720?

Yes, I'm sorry if I wasn't very clear ^^ Translating French literally into English isn't very easy, sometimes I mix up sentences or words ^^

But yes, I can confirm that it's linked to the Docker image.

If needed, say in French and I'll translate ;)

Just tried using the HEIGHT and WIDTH value of 1920 and 1080, still got capcha when redeeming the game (not at login this time)

Changed height and width and changed it to be at a random time, and it seems to be working now for me as well

Oh !

Resolution to 1920x1080 solved the issue for me (for now) ^^

random delay might not be necessary as it works fine with a higher resolution. Being less obvious though is a plus if they get more aggressive.

Just wanted to follow up/chime in that the resolution changed fixed it for me as well.

Setting the resolution alone didn't resolve the login captcha for me. I ended up solving the captcha manually over vnc and now it no longer prompts at login for subsequent runs.

I changed the default resolution to 1920x1080.
At least for the login captcha it didn't matter for me before. Solving the login captcha via VNC now works again for me (at 1280x1280) - maybe they changed something in-between.
(Also upgraded node 19 -> 20, but that shouldn't matter.)

@vogler thank you for the update, that seemed to fix it

Hmm , I'm back to having Captchas despite the new resolution :/

Same issue here, at least once.

Same here! On Unraid.

confirmed back as well on synology

Back again in Unraid.

Same on raspberry pi, docker

Problem still present with a docker pull from today.

Free games: [
  'https://store.epicgames.com/en-US/p/out-of-line-209cbb',
  'https://store.epicgames.com/en-US/p/forest-quartet-5d03e3'
]
Current free game: Out of Line
  Not in library yet! Click GET.
  Got hcaptcha challenge! Lost trust due to too many login attempts? You can solve the captcha in the browser or get a new IP address.
page.waitForSelector: Timeout 180000ms exceeded.
=========================== logs ===========================
waiting for locator('text=Thanks for your order!') to be visible
============================================================
    at file:///fgc/epic-games.js:229:20 {
  name: 'TimeoutError'
}
  Failed to claim! To avoid captchas try to get a new IP address.
Current free game: The Forest Quartet
  Not in library yet! Click GET.
  Got hcaptcha challenge! Lost trust due to too many login attempts? You can solve the captcha in the browser or get a new IP address.
page.waitForSelector: Timeout 180000ms exceeded.
=========================== logs ===========================
waiting for locator('text=Thanks for your order!') to be visible
============================================================
    at file:///fgc/epic-games.js:229:20 {
  name: 'TimeoutError'
}
  Failed to claim! To avoid captchas try to get a new IP address.

When doing manually the two hcaptcha challenges to get the 1st game, Epic still requests 2 hcaptcha challenges for the 2nd game.

Watching things with VNC and moving the mouse around may be enough to unflag the session. I was observing with my iPhone, and trying to move to see when the captcha appears, but no captcha popped.

Perhaps simulating random mouse movement would be enough to unflag the sessions?

Perhaps simulating random mouse movement would be enough to unflag the sessions?

I'll try it out. I guess there's some trust score that includes stuff like mouse movement, IP, OS, browser fingerprint etc.
The interesting part is that it changed while the image didn't and that it still works perfectly fine without docker.
Since the user-agent is the same in both cases, it must be something about the browser or environment (screen, GPU, fonts etc.) that they started to take into account.

Here's some background: https://seon.io/resources/browser-fingerprinting/
And here you can check some fingerprint data: https://amiunique.org/fingerprint

Playwright now also has support for Debian besides Ubuntu. Maybe it works with that.

ZoXx commented

same problem with captcha on unraid.

This is weird.. for the past few weeks I've been having the captcha issue with epic games. Yesterday they both failed like they have been..I didn't do anything and today one failed but one succeeded. I didn't do anything. I was sleeping.

Screenshot_20230930_063316_Spark

Screenshot_20230930_063004_Spark

And today was even stranger. Didn't do anything. Didn't update the docker container or anything and it claimed the one it didn't yesterday.

Screenshot_20231001_203606_Spark

I'd assume they are playing with the trust level requirements in an attempt to pin down bots while inconveniencing as few humans as possible.

On Sunday I restarted my container and the claim worked. The Thursday before it did not work with the cron job. It really seems like the trust level requirements are adjusted.

I get it every time, I've been playing with this code, could be a more robust solution.

I've filled in the google sheet. Tried it on a Synology NAS and on a RPi 4 with 4GB RAM. Both experience the exact same Captchas at the same points

I'm on unraid latest pull, and have been getting the captcha just before claim, then if I run it manually they claim fine, that's without using the vnc viewer , as one user suggested maybe the mouse movement but as mine runs the same time every morning what if its detecting the same account logging in at the same time

I got a captcha for one of the epic free games this week but not for the other. Really weird. I set my resolution to 1920x1080 and it worked for a few weeks.

might be interesting to test out some captcha bots like https://github.com/JacobLinCool/recaptcha-solver#readme

@lostb1t I tried a few, but at the time they didn't work that well. See #2 (comment)
Also, Playwright currently doesn't support browser extensions for Firefox.
Going back to Chrome will likely give you a captcha when running natively as well, not just when running via docker. At least that was the case for headless mode: #39

cj0r commented

Confirming same issues on an Unraid docker install. I logged into VNC manually and solved the captchas so maybe logging in enough manually to correct will temporarily trick their trust policies but it'd be nice for something more automated to be developed to help. Regardless, happy with the amount of road I got out of this script up to now. Fingers crossed

Regardless, happy with the amount of road I got out of this script up to now. Fingers crossed

As mentioned above, as a workaround, you can just run it without docker to avoid the captcha.
I understand that people with Unraid etc. will want to manage everything with containers, but I assume it shouldn't be too hard to just ssh into it, install nodejs and clone the repo to run the scripts (at least for now).

im guessing they are checking specific platform features.

Simulating a real device with https://github.com/apify/fingerprint-suite might be a solution

@lostb1t I'm already using https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-stealth which according to https://github.com/apify/fingerprint-suite#performance passes more tests, but I'll try this one as well.

oh nice, also seeing they have https://github.com/berstend/puppeteer-extra/blob/master/packages/puppeteer-extra-plugin-recaptcha/readme.md

i might give that a go this week see if that does anything

The recent version also worked for me after getting captcha challenges for months previously. ๐Ÿ‘

I'm having this come up now - was working ok previously. And it's saying "Too many failed attempts" even after correctly answering the captcha right the first time.

I am also having the issue; if I follow the VNC it gets stuck before it claims the game and even though I picked the right answer it fails with "Too many failed attempts"

Same, It also won't let me solve the captcha and just says "Failed challenge captcha, please try again later"

Accessibility cookie didn't help either.