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.39k stars 93 forks source link

Puppeteer timeout on purchase #313

Closed timelf123 closed 1 year ago

timelf123 commented 1 year ago

Describe the bug

No games are successfully redeemed. Every attempt yields a generic 500 error page on Epic

Screenshots or Logs

error-2023-01-12T20-24-41 947Z

DEBUG: Launching a new page
INFO: Loading purchase page
purchaseUrl: ...
WARN: Timeout exceeded while waiting for event
err: {
"type": "TimeoutError",
"message": "Timeout exceeded while waiting for event",
       "stack":
TimeoutError: Timeout exceeded while waiting for event
at Timeout.<anonymous> (/usr/app/node_modules/puppeteer/src/common/util.ts:154:9)
at listOnTimeout (node:internal/timers:564:17)
at processTimers (node:internal/timers:507:7)
"name": "TimeoutError"
}

Additional context This has been happening for a few weeks now

MyUncleSam commented 1 year ago

I am fencing the same troubles. Maybe as an addition, info:

  1. Since today I need to captcha verify my login. I get a notification, open the page and verify the captcha.
  2. Immediatly the 2fa code is entered by the container. Sometimes the page stops there, sometimes I see the epic page and then the container stops to server the browser
  3. In the logs it checks for free games and I get an error (see below)
  4. After that it jumps to my second account and in the logs it seems that everything is fine
  5. As soon as I get the link to enter the purchase captcha I get the exact same error page as described in the ticket (but without any warnings or errors in the log)

The error message:

2023-02-01T20:14:52.367391761Z [2023-02-01 21:14:51.913 +0100] WARN: Failed to lookup weekly free games 2023-02-01T20:14:52.367448023Z user: "mail@domain.tld" 2023-02-01T20:14:52.367460586Z err: { 2023-02-01T20:14:52.367471697Z "type": "Error", 2023-02-01T20:14:52.367482951Z "message": "Execution context was destroyed, most likely because of a navigation.", 2023-02-01T20:14:52.367494619Z "stack": 2023-02-01T20:14:52.367505513Z Error: Execution context was destroyed, most likely because of a navigation. 2023-02-01T20:14:52.367516750Z at rewriteError (/usr/app/node_modules/puppeteer/src/common/ExecutionContext.ts:342:15) 2023-02-01T20:14:52.367528678Z at processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-02-01T20:14:52.367541025Z at ExecutionContext._ExecutionContext_evaluate (/usr/app/node_modules/puppeteer/src/common/ExecutionContext.ts:277:7) 2023-02-01T20:14:52.367552798Z at ExecutionContext.evaluate (/usr/app/node_modules/puppeteer/src/common/ExecutionContext.ts:145:12) 2023-02-01T20:14:52.367564122Z at PuppetFreeGames.request (/usr/app/src/puppet/free-games.ts:41:18) 2023-02-01T20:14:52.367575485Z at PuppetFreeGames.getWeeklyFreeGames (/usr/app/src/puppet/free-games.ts:143:18) 2023-02-01T20:14:52.367586703Z at PuppetFreeGames.getAllFreeGames (/usr/app/src/puppet/free-games.ts:378:27) 2023-02-01T20:14:52.367597929Z at redeemAccount (/usr/app/src/index.ts:35:20) 2023-02-01T20:14:52.367609050Z at run (/usr/app/node_modules/p-queue/dist/index.js:163:29) 2023-02-01T20:14:52.367620507Z }

jackblk commented 1 year ago

I had this issue for weeks, I fixed it by just logging in via normal web browser and confirming the birthday.

timelf123 commented 1 year ago

I had this issue for weeks, I fixed it by just logging in via normal web browser and confirming the birthday.

Confirmed this was the fix, thanks! Generated a TOTP using private key from my config to log in