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

ERROR: Response code 404 (Not Found) #222

Closed IcyTower1337 closed 2 years ago

IcyTower1337 commented 2 years ago

Using the latest image: bcb72ffdce54

Describe the bug

When trying to claim free games, bot fails to fetch games for any account with a 404 Error...

Screenshots or Logs


> epicgames-freegames-node@4.0.0 entrypoint-config

> node dist/src/entrypoint-config.js

Setting timezone: Europe/Lisbon

Run on startup: true

npm notice 

npm notice New minor version of npm available! 8.3.1 -> 8.5.2

npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.5.2>

npm notice Run `npm install -g npm@8.5.2` to update!

npm notice 

[2022-02-25 18:59:20.668 +0000] INFO: Started epicgames-freegames-node

    COMMIT_SHA: "b10370bb8b5b88602d038294b4924b4b73aefab4"

    BRANCH: "master"

    DISTRO: "alpine"

[2022-02-25 18:59:21.026 +0000] INFO: Checking free games for email1 

[2022-02-25 18:59:27.250 +0000] INFO: Successfully refreshed login

    user: "email1"

[2022-02-25 18:59:27.251 +0000] INFO: searchStrategy is `all`: searching for weekly and promotional games

    user: "email1"

[2022-02-25 18:59:27.597 +0000] ERROR:

    error: true

[2022-02-25 18:59:27.597 +0000] ERROR: Response code 404 (Not Found)

    err: {

      "type": "HTTPError",

      "message": "Response code 404 (Not Found)",

      "stack":

          HTTPError: Response code 404 (Not Found)

              at Request.<anonymous> (/usr/app/node_modules/got/dist/source/as-promise/index.js:117:42)

              at processTicksAndRejections (node:internal/process/task_queues:96:5)

      "name": "HTTPError",

      "timings": {

        "start": 1645815567370,

        "socket": 1645815567371,

        "lookup": 1645815567401,

        "connect": 1645815567421,

        "secureConnect": 1645815567443,

        "upload": 1645815567443,

        "response": 1645815567592,

        "end": 1645815567592,

        "phases": {

          "wait": 1,

          "dns": 30,

          "tcp": 20,

          "tls": 22,

          "request": 0,

          "firstByte": 149,

          "download": 0,

          "total": 222

        }

      }

    }

[2022-02-25 18:59:27.597 +0000] WARN: Current version

    COMMIT_SHA: "b10370bb8b5b88602d038294b4924b4b73aefab4"

    BRANCH: "master"

    DISTRO: "alpine"

[2022-02-25 19:00:21.071 +0000] INFO: Checking free games for email2 

[2022-02-25 19:00:27.258 +0000] INFO: Successfully refreshed login

    user: "email2"

[2022-02-25 19:00:27.258 +0000] INFO: searchStrategy is `all`: searching for weekly and promotional games

    user: "email2"

[2022-02-25 19:00:27.586 +0000] ERROR:

    error: true

[2022-02-25 19:00:27.586 +0000] ERROR: Response code 404 (Not Found)

    err: {

      "type": "HTTPError",

      "message": "Response code 404 (Not Found)",

      "stack":

          HTTPError: Response code 404 (Not Found)

              at Request.<anonymous> (/usr/app/node_modules/got/dist/source/as-promise/index.js:117:42)

              at processTicksAndRejections (node:internal/process/task_queues:96:5)

      "name": "HTTPError",

      "timings": {

        "start": 1645815627376,

        "socket": 1645815627376,

        "lookup": 1645815627406,

        "connect": 1645815627425,

        "secureConnect": 1645815627445,

        "upload": 1645815627445,

        "response": 1645815627584,

        "end": 1645815627585,

        "phases": {

          "wait": 0,

          "dns": 30,

          "tcp": 19,

          "tls": 20,

          "request": 0,

          "firstByte": 139,

          "download": 1,

          "total": 209

        }

      }

    }

[2022-02-25 19:00:27.586 +0000] WARN: Current version

    COMMIT_SHA: "b10370bb8b5b88602d038294b4924b4b73aefab4"

    BRANCH: "master"

    DISTRO: "alpine"

[2022-02-25 19:01:21.079 +0000] INFO: Checking free games for email3 

[2022-02-25 19:01:27.112 +0000] INFO: Successfully refreshed login

    user: "email3"

[2022-02-25 19:01:27.112 +0000] INFO: searchStrategy is `all`: searching for weekly and promotional games

    user: "email3"

[2022-02-25 19:01:27.479 +0000] ERROR:

    error: true

[2022-02-25 19:01:27.479 +0000] ERROR: Response code 404 (Not Found)

    err: {

      "type": "HTTPError",

      "message": "Response code 404 (Not Found)",

      "stack":

          HTTPError: Response code 404 (Not Found)

              at Request.<anonymous> (/usr/app/node_modules/got/dist/source/as-promise/index.js:117:42)

              at runMicrotasks (<anonymous>)

              at processTicksAndRejections (node:internal/process/task_queues:96:5)

      "name": "HTTPError",

      "timings": {

        "start": 1645815687276,

        "socket": 1645815687276,

        "lookup": 1645815687306,

        "connect": 1645815687323,

        "secureConnect": 1645815687336,

        "upload": 1645815687337,

        "response": 1645815687478,

        "end": 1645815687478,

        "phases": {

          "wait": 0,

          "dns": 30,

          "tcp": 17,

          "tls": 13,

          "request": 1,

          "firstByte": 141,

          "download": 0,

          "total": 202

        }

      }

    }

[2022-02-25 19:01:27.479 +0000] WARN: Current version

    COMMIT_SHA: "b10370bb8b5b88602d038294b4924b4b73aefab4"

    BRANCH: "master"

    DISTRO: "alpine"

Run once: false

Setting cron schedule as 5 16 * * *

Additional context

Tried to reset the docker container just in case, didn't change anything, can provide further logs if needed.

claabs commented 2 years ago

Just pushed a fix. I made the all search strategy more resilient as well, so it will keep going even if one of the strategies fail.