claabs / epicgames-freegames-node

Automatically login and find available free games the Epic Games Store. Sends you a prepopulated checkout link so you can complete the checkout after logging in. Supports multiple accounts, login sessions, and scheduled runs.
https://hub.docker.com/r/charlocharlie/epicgames-freegames
MIT License
1.35k stars 92 forks source link

Support request - Too many login attempts #77

Closed penguinairlines closed 3 years ago

penguinairlines commented 3 years ago

Hello,

I am attempting to initialize this container, but I am getting an error, and I am not sure what may be wrong. Possibly this is entirely my fault, but the error reporting may need to be enhanced. Please let me know if there is a better location to request support.

I have taken the recommended configuration steps and I am attempting to use the config.json method. Environment is Windows Docker version 20.10.2, build 2291f61. docker run -d -e TZ=America/NewYork -v E:\docker\epicgames-freegames:/usr/app/config:rw -p 3000:3000 charlocharlie/epicgames-freegames:latest

When I initialize this container, it appears to successfully load in the config.json file and attempts to initialize the captcha with my email. I receive the email which has the a link with the baseurl and some appended string - example: http://localhost:3000?id=300f1231-5848-480a-b0dc-b29a1d8954d2

I am able to follow the link and, as the page indicates, I sometimes do nothing and sometimes fulfill a captcha request. After I have done so it says that the captcha is successful. I receive 3 emails sequentially, followed by the docker log stating:

[2021-01-17 00:00:32.865 +0000] ERROR (46 on 2d13a17afaa9): Too many login attempts
    Error: Too many login attempts
        at Login.login (/usr/app/src/login.ts:101:13)
        at processTicksAndRejections (internal/process/task_queues.js:97:5)
        at Login.login (/usr/app/src/login.ts:128:11)
        at Login.login (/usr/app/src/login.ts:128:11)
        at Login.login (/usr/app/src/login.ts:128:11)
        at Login.fullLogin (/usr/app/src/login.ts:205:7)
        at /usr/app/src/index.ts:20:7
        at async Promise.all (index 0)
        at main (/usr/app/src/index.ts:31:3)
Setting timezone: America/NewYork
Setting cron schedule as 0 12 * * *

I assume this is not the expected result. I do not have a game to claim at this point in time, but I assume this would result in the container failing to meet the objective, given the ERROR seen above. I wonder if the error is code 46? But I see this error code also for the Action Requested log message as well, so maybe not. This info level log message appears 3 times, each before the email is sent to the account. [2021-01-17 00:00:03.619 +0000] INFO (46 on 2d13a17afaa9): Action requested. Waiting for Captcha to be solved

Based on my attempts so far, it would seem that the container is running, the config is being loaded properly, the email is being sent successfully, and the simple web page/service at localhost:3000 is working correctly at least to the point that it can launch the page and captcha elements. I'm not sure if I have some kind of incorrect configuration? I'll try to put what non-secure details I can here:

{
    "accounts": [
        // Multiple accounts can be configured here
        {
            "email": "x -penguinairlines",
            "password": "x -penguinairlines",
            "totp": "x -penguinairlines"
        },
    ],
    "onlyWeekly": false,
    "runOnStartup": true,
    "intervalTime": 60,
    "cronSchedule": "0 12 * * *",
    "runOnce": false,
    "logLevel": "info",
    "baseUrl": "http://localhost:3000",
    "email": {
        "smtpHost": "smtp.gmail.com",
        "smtpPort": 587,
        "emailSenderAddress": "x -penguinairlines",
        "emailSenderName": "Epic Games Captchas",
        "emailRecipientAddress": "x -penguinairlines",
        "secure": false,
        "auth": {
            "user": "x -penguinairlines",
            "pass": "x -penguinairlines",
        },
    }
}

Thank you for taking the time to read my support request. Please let me know if there's anything else I should try.

claabs commented 3 years ago

The container tries to log in a few times before giving up, which is the error you see here. Epic's captcha process is very convoluted and black-box, so we can't see any details from them as to what caused the captcha token to fail.

I've been blindly throwing in solutions in this branch to fix the issue, but it's tough to test as Epic is likely rate limiting my IP in the captcha backend. It's tough to tell if the login is actually consistent on that branch yet.

If you'd like to try that branch out, you can use the image charlocharlie/epicgames-freegames-test:latest. Let me know if that works out. If not, you may also be rate limited, so I'd recommend trying again in 24 hours.

king-gheedorah commented 3 years ago

Working properly on the test branch. Was experiencing the same issue.

Thanks @claabs !

penguinairlines commented 3 years ago

Yes, thank you for working on this. I'm just glad to know there's potential I'm not screwing up. I'll give the test branch a shot after Tuesday when there's a new game to claim, and I'll watch the referenced issue.

claabs commented 3 years ago

I just deployed the test branch to master, so you can just pull the main image now.