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.33k stars 91 forks source link

[Docker] Failure to claim free game, just outputs three errors and gives up. #216

Closed wertercatt closed 2 years ago

wertercatt commented 2 years ago
**Describe the bug** When attempting to get a free game, it just spits out three errors. First it spits out `Could not find talon_frame_login_prod` and then proceeds to find the current free game. It then spits out `Failed to authenticate with GraphQL API, trying again` followed immediately by `Sid returned null`. It then just gives up and sets the cron scheduling to try again later. **Screenshots or Logs** ``` > epicgames-freegames-node@4.0.0 entrypoint-config > node dist/src/entrypoint-config.js Setting timezone: UTC Run on startup: false Run once: false Setting cron schedule as 0 12 * * * > epicgames-freegames-node@4.0.0 entrypoint-config > node dist/src/entrypoint-config.js Setting timezone: UTC Run on startup: true [2022-01-27 02:26:54.351 +0000] INFO: Started epicgames-freegames-node     COMMIT_SHA: "9a2215e2441d48779be37078856f6aa53e62b6cf"     BRANCH: "master"     DISTRO: "alpine" [2022-01-27 02:26:54.697 +0000] INFO: Checking free games for [My-email] [2022-01-27 02:27:05.521 +0000] WARN: Could not find talon_frame_login_prod     user: "[My-email]"     err: {       "type": "Error",       "message": "Could not find talon_frame_login_prod",       "stack":           Error: Could not find talon_frame_login_prod               at PuppetLogin.waitForHCaptcha (/usr/app/src/puppet/login.ts:111:31)               at processTicksAndRejections (node:internal/process/task_queues:96:5)               at PuppetLogin.handleLoginClick (/usr/app/src/puppet/login.ts:175:20)               at PuppetLogin.startLogin (/usr/app/src/puppet/login.ts:66:64)               at PuppetLogin.login (/usr/app/src/puppet/login.ts:83:7)               at Login.fullLogin (/usr/app/src/login.ts:102:7)               at redeemAccount (/usr/app/src/index.ts:25:5)               at async Promise.all (index 0)               at main (/usr/app/src/index.ts:66:5)     } [2022-01-27 02:27:39.637 +0000] INFO: Successfully logged in fresh     user: "[My-email]" [2022-01-27 02:27:40.309 +0000] INFO: Available free games     user: "[My-email]"     availableGames: [       "Relicta"     ] [2022-01-27 02:27:40.590 +0000] WARN: Failed to authenticate with GraphQL API, trying again     user: "[My-email]" [2022-01-27 02:27:43.741 +0000] ERROR: Sid returned null     err: {       "type": "Error",       "message": "Sid returned null",       "stack":           Error: Sid returned null               at Login.refreshAndSid (/usr/app/src/login.ts:80:24)               at processTicksAndRejections (node:internal/process/task_queues:96:5)               at FreeGames.ownsGame (/usr/app/src/free-games.ts:239:9)               at async Promise.all (index 0)               at FreeGames.getPurchasableFreeGames (/usr/app/src/free-games.ts:255:23)               at FreeGames.getAllFreeGames (/usr/app/src/free-games.ts:325:30)               at redeemAccount (/usr/app/src/index.ts:26:20)               at async Promise.all (index 0)               at main (/usr/app/src/index.ts:66:5)     } [2022-01-27 02:27:43.751 +0000] WARN: Current version     COMMIT_SHA: "9a2215e2441d48779be37078856f6aa53e62b6cf"     BRANCH: "master"     DISTRO: "alpine" Run once: false Setting cron schedule as 0 12 * * * > epicgames-freegames-node@4.0.0 entrypoint-config > node dist/src/entrypoint-config.js Setting timezone: UTC Run on startup: true [2022-01-27 02:30:53.314 +0000] INFO: Started epicgames-freegames-node     COMMIT_SHA: "9a2215e2441d48779be37078856f6aa53e62b6cf"     BRANCH: "master"     DISTRO: "alpine" [2022-01-27 02:30:53.671 +0000] INFO: Checking free games for [My-email] [2022-01-27 02:31:05.107 +0000] WARN: Could not find talon_frame_login_prod     user: "[My-email]"     err: {       "type": "Error",       "message": "Could not find talon_frame_login_prod",       "stack":           Error: Could not find talon_frame_login_prod               at PuppetLogin.waitForHCaptcha (/usr/app/src/puppet/login.ts:111:31)               at processTicksAndRejections (node:internal/process/task_queues:96:5)               at PuppetLogin.handleLoginClick (/usr/app/src/puppet/login.ts:175:20)               at PuppetLogin.startLogin (/usr/app/src/puppet/login.ts:66:64)               at PuppetLogin.login (/usr/app/src/puppet/login.ts:83:7)               at Login.fullLogin (/usr/app/src/login.ts:102:7)               at redeemAccount (/usr/app/src/index.ts:25:5)               at async Promise.all (index 0)               at main (/usr/app/src/index.ts:66:5)     } [2022-01-27 02:31:31.337 +0000] INFO: Successfully logged in fresh     user: "[My-email]" [2022-01-27 02:31:31.337 +0000] INFO: searchStrategy is `all`: searching for weekly and promotional games     user: "[My-email]" [2022-01-27 02:31:33.810 +0000] INFO: Available free games     user: "[My-email]"     availableGames: [       "Relicta"     ] [2022-01-27 02:31:34.102 +0000] WARN: Failed to authenticate with GraphQL API, trying again     user: "[My-email]" [2022-01-27 02:31:36.804 +0000] ERROR: Sid returned null     err: {       "type": "Error",       "message": "Sid returned null",       "stack":           Error: Sid returned null               at Login.refreshAndSid (/usr/app/src/login.ts:80:24)               at processTicksAndRejections (node:internal/process/task_queues:96:5)               at FreeGames.ownsGame (/usr/app/src/free-games.ts:239:9)               at async Promise.all (index 0)               at FreeGames.getPurchasableFreeGames (/usr/app/src/free-games.ts:255:23)               at FreeGames.getAllFreeGames (/usr/app/src/free-games.ts:325:30)               at redeemAccount (/usr/app/src/index.ts:26:20)               at async Promise.all (index 0)               at main (/usr/app/src/index.ts:66:5)     } [2022-01-27 02:31:36.813 +0000] WARN: Current version     COMMIT_SHA: "9a2215e2441d48779be37078856f6aa53e62b6cf"     BRANCH: "master"     DISTRO: "alpine" Run once: false Setting cron schedule as 0 12 * * * ``` **Additional context** config.json: ```json { "cronSchedule": "0 12 * * *", "searchStrategy": "all", "runOnStartup": true, "runOnce": false, "timezone": "UTC", "intervalTime": 60, "logLevel": "info", "puppeteerPurchase": true, "notificationTimeoutHours": 24, "testNotifiers": false, "skipVersionCheck": false, "noHumanErrorHelp": false, "accounts": [ { "email": "[My-email]", "password": "[My-password]", "totp": "[My-TOTP-secret]" } ], "webPortalConfig": { "baseUrl": "https://localhost:3000" } } ``` docker-compose.yml ```yml version: '3.3' services: epicgames-freegames: ports: - '3000:3000' volumes: - './epicgames-freegames/:/usr/app/config:rw' image: charlocharlie/epicgames-freegames ```
claabs commented 2 years ago

Thanks for the bug report. Looks like Epic just updated their HTML surrounding the captcha. Luckily, it actually makes my code a little simpler.

This also affected purchase, so the fix will apply to anyone who was already logged in and experiencing the same error on checkout.