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

using cookie method emit errors. #345

Closed jangshik closed 1 year ago

jangshik commented 1 year ago

Describe the bug

I was having a issue with login returned error : incorrect response so i went with the cookie method. Followed your guide, exported the cookie from the browser that uses the same public ip as my docker container and logs shows this. can you look into it? have pulled the latest docker container up to date. region : KR(no vpn) account regoin : KR

Screenshots or Logs

[2023-05-03 11:09:02.393 +0900] ERROR: Encountered an error during browser automation. Saved a screenshot for debugging purposes. user: "--@gmail.com" errorFile: "error-2023-05-03T02:09:02.328Z.png" [2023-05-03 11:09:02.395 +0900] ERROR: Protocol error (Network.setCookies): Invalid parameters Failed to deserialize params.cookies.name - BINDINGS: mandatory field missing at position 63 user: "--@gmail.com" err: { "type": "ProtocolError", "message": "Protocol error (Network.setCookies): Invalid parameters Failed to deserialize params.cookies.name - BINDINGS: mandatory field missing at position 63", "stack": ProtocolError: Protocol error (Network.setCookies): Invalid parameters Failed to deserialize params.cookies.name - BINDINGS: mandatory field missing at position 63 at new Callback (/usr/app/node_modules/puppeteer-core/src/common/Connection.ts:65:12) at CallbackRegistry.create (/usr/app/node_modules/puppeteer-core/src/common/Connection.ts:126:22) at Connection._rawSend (/usr/app/node_modules/puppeteer-core/src/common/Connection.ts:266:22) at CDPSessionImpl.send (/usr/app/node_modules/puppeteer-core/src/common/Connection.ts:525:29) at PuppetLogin.setupPage (/usr/app/src/puppet/base.ts:46:23) at processTicksAndRejections (node:internal/process/task_queues:95:5) at PuppetLogin.fullLogin (/usr/app/src/puppet/login.ts:28:18) at redeemAccount (/usr/app/src/index.ts:34:5) at run (/usr/app/node_modules/p-queue/dist/index.js:163:29) "name": "ProtocolError" } [2023-05-03 11:09:02.422 +0900] WARN: Current version COMMIT_SHA: "7dda5cbcf484f6eee15d78edd35ebbe15c2de60b" BRANCH: "master" DISTRO: "alpine"

Additional context

claabs commented 1 year ago

You were quick enough to try it out before the image finished building. Re-pull and try again. The latest hash is now c0dfe30ee94fa609a9efcb5eb2b8fd0c1dafe6e2.

jangshik commented 1 year ago

You were quick enough to try it out before the image finished building. Re-pull and try again. The latest hash is now c0dfe30ee94fa609a9efcb5eb2b8fd0c1dafe6e2.

login works like a charm. thank you. but now having a error product is not available in your region. i have set in config.json each "countryCode": "KR", "timezone": "Asia/Seoul", on the log poker club whici is not purchasable in my region has showed up. is there any configuration for me to do more?

claabs commented 1 year ago

I see the bug in my code. In the short term, setting searchStrategy to weekly might fix it. I'll try to get to it when I have time.

jangshik commented 1 year ago

lovely. working as intended. thank you for your effort