Giter Club home page Giter Club logo

claabs / epicgames-freegames-node Goto Github PK

View Code? Open in Web Editor NEW
1.3K 1.3K 89.0 2.11 MB

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.

Home Page: https://hub.docker.com/r/charlocharlie/epicgames-freegames

License: MIT License

JavaScript 0.39% Dockerfile 1.61% TypeScript 96.65% Shell 1.35%
docker epic-games epic-games-client epic-games-store epicgames-freegames-node free-games reverse-engineering self-hosted

epicgames-freegames-node's People

Contributors

bagage avatar beatcracker avatar bjotje avatar boris1993 avatar c-y-x avatar chladog avatar chocoyo avatar claabs avatar davidjameshowell avatar dependabot[bot] avatar dev4mod avatar gonglihai avatar jerry-yuan avatar kairubyte avatar kjaaajk avatar martinbjeldbak avatar miguelangellv avatar mikhail5555 avatar savvasmohito avatar smallinger avatar tonyrl avatar warningimhack3r avatar ypwub5 avatar zhyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

epicgames-freegames-node's Issues

Configure by JSON

Add the ability to configure the project with a JSON file in the ./config folder. It should work in tandem with the environment variable configs, with environment variables taking priority.

Shows GTA is purchaseable but it has already been redeemed

Have not troubleshot yet, posting for my record later

Image: sha256:7ce6aa515fc0ea4a99a784945ede613990e2610b64da51f619150d86c546be5d
RepoDigests: charlocharlie/epicgames-freegames@sha256:130ac2140731abd93b0f4c822b1b39d3c591a2bddd278cb84c6146682c631c56

2020-05-15T12:31:32.791068865Z > [email protected] start /usr/app
2020-05-15T12:31:32.791075525Z > node dist/index.js
2020-05-15T12:31:32.791079888Z 
2020-05-15T12:31:40.966676048Z [2020-05-15 07:31:40.964 -0500] INFO  (31 on ed226ccad552): Captcha successful
2020-05-15T12:31:41.867298508Z [2020-05-15 07:31:41.866 -0500] INFO  (31 on ed226ccad552): Logged in
2020-05-15T12:31:42.819394771Z [2020-05-15 07:31:42.818 -0500] INFO  (31 on ed226ccad552): Available free games
2020-05-15T12:31:42.819431281Z     availableGames: [
2020-05-15T12:31:42.819436341Z       "Grand Theft Auto V"
2020-05-15T12:31:42.819440648Z     ]
2020-05-15T12:31:43.018640771Z [2020-05-15 07:31:43.018 -0500] INFO  (31 on ed226ccad552): Unpurchased free games
2020-05-15T12:31:43.018706613Z     purchasableGames: [
2020-05-15T12:31:43.018711594Z       "Grand Theft Auto V"
2020-05-15T12:31:43.018716009Z     ]
2020-05-15T12:31:43.018822844Z [2020-05-15 07:31:43.018 -0500] INFO  (31 on ed226ccad552): Purchasing Grand Theft Auto V
2020-05-15T12:31:44.299394485Z [2020-05-15 07:31:44.298 -0500] ERROR (HTTPError/31 on ed226ccad552): Response code 400 (Bad Request)
2020-05-15T12:31:44.299422886Z     HTTPError: Response code 400 (Bad Request)
2020-05-15T12:31:44.299428359Z         at EventEmitter.<anonymous> (/usr/app/node_modules/got/dist/source/as-promise.js:118:31)
2020-05-15T12:31:44.299433230Z         at processTicksAndRejections (internal/process/task_queues.js:97:5)
2020-05-15T12:31:44.299660508Z [2020-05-15 07:31:44.299 -0500] ERROR (31 on ed226ccad552):
2020-05-15T12:31:44.299673922Z     error: true
2020-05-15T12:31:44.299679671Z     message: "We could not confirm your purchase at this time.  Please try again later."
2020-05-15T12:31:44.299684310Z     syncToken: "FOOBAR"

Email failure with mailgun provider (openssl error)

Following #29, the mail error is now properly handled:

Error sending email. Please check your configuration
139800907165000:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:
Error: 139800907165000:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:

However I'm using mailgun provider which works great for everything but epicgames-freegames. I'm not sure what's happening, you can replicate the issue using the following credentials:

    "smtpHost": "smtp.mailgun.org",
    "smtpPort": 587,
    "emailSenderAddress": "test-epicfreegames@sandbox78345d8086ff4c639fa14ff539661d8c.mailgun.org",
    "emailSenderName": "Epic Games Captchas",
    "secure": true,
    "auth": {
      "user": "test-epicfreegames@sandbox78345d8086ff4c639fa14ff539661d8c.mailgun.org",
      "pass": "cf4c4c65ccdfa2cabc6fbae1cf51b3b5-0f472795-86d7bb7d"
    }

"errorCode": "errors.com.epicgames.purchase.purchase.captcha.challenge"

I pulled the latest Docker image which worked fine for one account, but fails on a second account even though it says 'Done purchasing'. It looks like it fails on the captcha challenge while confirming the 'purchase'. Both accounts make use of the same region (EURO), yet use endpoint en-us strangely enough.

Below is the complete log, I hope it helps the troubleshooting.

Thank you!

> [email protected] start /usr/app
> node dist/index.js

[2020-05-29 17:23:34.975 +0000] INFO  (17 on f027d15bed9b): Successfully refreshed login
[2020-05-29 17:23:36.772 +0000] INFO  (17 on f027d15bed9b): Available free games
    availableGames: [
      "Borderlands: The Handsome Collection"
    ]
[2020-05-29 17:23:36.776 +0000] DEBUG (17 on f027d15bed9b): Fetching updated IDs
    url: "https://store-content.ak.epicgames.com/api/en-US/content/bundles/borderlands-the-handsome-collection"
[2020-05-29 17:23:36.849 +0000] DEBUG (17 on f027d15bed9b): Getting product info
    linkedOfferNs: "85189f7cf7a64f86aa6aa91d81d36c08"
    linkedOfferId: "a61c6602b5784d36801d0cab73e02337"
[2020-05-29 17:23:36.850 +0000] DEBUG (17 on f027d15bed9b): Posting for offer entitlement
    data: {
      "query": "query launcherQuery($namespace:String!, $offerId:String!) {\n    Launcher {\n      entitledOfferItems(namespace: $namespace, offerId: $offerId) {\n        namespace\n        offerId\n        entitledToAllItemsInOffer\n        entitledToAnyItemInOffer\n      }\n    }\n  }",
      "variables": {
        "namespace": "85189f7cf7a64f86aa6aa91d81d36c08",
        "offerId": "a61c6602b5784d36801d0cab73e02337"
      }
    }
    url: "https://www.epicgames.com/store/backend/graphql-proxy"
[2020-05-29 17:23:37.252 +0000] INFO  (17 on f027d15bed9b): Unpurchased free games
    purchasableGames: [
      "Borderlands: The Handsome Collection"
    ]
[2020-05-29 17:23:37.253 +0000] INFO  (17 on f027d15bed9b): Purchasing Borderlands: The Handsome Collection
[2020-05-29 17:23:38.617 +0000] DEBUG (17 on f027d15bed9b): purchaseToken
    purchaseToken: "XXXXXXXXXXXXXXXXX"
[2020-05-29 17:23:38.619 +0000] DEBUG (17 on f027d15bed9b): Order preview request
    orderPreviewRequest: {
      "useDefault": true,
      "setDefault": false,
      "namespace": "85189f7cf7a64f86aa6aa91d81d36c08",
      "country": null,
      "countryName": null,
      "orderId": null,
      "orderComplete": null,
      "orderError": null,
      "orderPending": null,
      "offers": [
        "a61c6602b5784d36801d0cab73e02337"
      ],
      "offerPrice": ""
    }
[2020-05-29 17:23:39.230 +0000] DEBUG (17 on f027d15bed9b): Order preview response
    orderPreviewResponse: {
      "affiliation": null,
      "catalogResponse": {
        "currencySymbolPlacement": "LEFT",
        "code": "NL",
        "displayName": "NETHERLANDS",
        "ratingSystem": "PEGI",
        "embargoed": false,
        "sellerOfRecord": "EPIC_INT",
        "vatChargeRate": 23,
        "vatPercentage": 21,
        "defaultCurrency": "EUR",
        "vatIncluded": true,
        "region": "EURO",
        "sellerOfRecordName": "Epic Games International S.à r.l.",
        "paymentCurrency": "EUR"
      },
      "country": "NL",
      "countryName": "Netherlands",
      "message": null,
      "namespace": "85189f7cf7a64f86aa6aa91d81d36c08",
      "offers": [
        "a61c6602b5784d36801d0cab73e02337"
      ],
      "orderComplete": false,
      "orderError": false,
      "orderId": null,
      "orderPending": false,
      "orderResponse": {
        "orderType": "PURCHASE",
        "symbol": "€",
        "country": "NL",
        "agentUserName": "anonymous",
        "toUSDExchangeRate": 1.1079040816007766,
        "totalPrice": 0,
        "accountIpCountry": "NL",
        "formattedTotalPrice": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "formattedConvenienceFee": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "paymentCurrencySymbol": "€",
        "orderStatus": "PREVIEW",
        "epicAccountId": "XXXXXXXXXXXXXXXXX",
        "salesChannel": "epic-store-web-purchase",
        "formattedPresentmentAmount": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "canQuickPurchase": true,
        "formattedBillingPaymentAmount": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "taxStatus": "NOT_APPLICABLE",
        "totalTax": 0,
        "isFree": true,
        "coupons": [],
        "walletPaymentAmount": 0,
        "totalDiscounted": 0,
        "useSplitPayment": false,
        "currency": "EUR",
        "formattedTotalTax": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "rewardVoucher": null,
        "fraudScore": 0,
        "lastModifiedDate": "2020-05-29T17:23:39.146+0000",
        "paymentCurrencyCode": "EUR",
        "paymentCurrencyAmount": 0,
        "accountIpAddress": "XXXXXXXXXXXXXXXXX",
        "vat": 0,
        "batchJobFailedRetryCount": 0,
        "lineOffers": [
          {
            "totalPrice": 0,
            "formattedTotalPrice": {
              "amount": "0.00",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "entitlementSource": "AppEpicgamesCom",
            "sellerName": "2K Games, Inc.",
            "refundedRevenueWithoutTax": 0,
            "revenueWithoutTax": 0,
            "title": "Borderlands: The Handsome Collection",
            "formattedBasePrice": {
              "amount": "59.99",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "offerType": "BUNDLE",
            "basePayoutCurrencyCode": "USD",
            "sellerId": "o-37m6jbj5wcvrcvm4wusv7nazdfvbjk",
            "formattedDiscountedPrice": {
              "amount": "0.00",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "refundedBasePayoutPrice": 0,
            "remainingDiscountPrice": 0,
            "refundedConvenienceFee": 0,
            "refundedTax": 0,
            "initiatedBy": "SELLER",
            "basePrice": 5999,
            "formattedBasePayoutPrice": {
              "amount": "0.00",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "unitPrice": 0,
            "refundedDiscountPrice": 0,
            "quantity": 1,
            "vat": 0,
            "formattedVoucherPrice": {
              "amount": "0.00",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "refundedQuantity": 0,
            "shareRate": 0,
            "shareRateByDeveloper": 0,
            "voucherDiscount": 0,
            "namespaceDisplayName": "Ivory",
            "convenienceFee": 0,
            "discountedPrice": 0,
            "formattedTaxPrice": {
              "amount": "0.00",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "namespace": "85189f7cf7a64f86aa6aa91d81d36c08",
            "formattedUnitPrice": {
              "amount": "0.00",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "offerId": "a61c6602b5784d36801d0cab73e02337",
            "taxPrice": 0,
            "basePayoutPrice": 0,
            "roleNames": []
          }
        ],
        "merchantGroup": "EGS_MKT",
        "creationDate": "2020-05-29T17:23:39.146+0000",
        "formattedWalletPaymentAmount": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "convenienceFee": 0,
        "identityId": "XXXXXXXXXXXXXXXXX",
        "fraud": false,
        "billingPaymentAmount": 0,
        "vatIncluded": true,
        "paymentCurrencyExchangeRate": 1,
        "formattedTotalDiscounted": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "canSplitPayment": false
      },
      "paypalError": null,
      "showCurrencyChangeMessage": false,
      "syncToken": "XXXXXXXXXXXXXXXXX",
      "voucherList": null
    }
[2020-05-29 17:23:39.232 +0000] DEBUG (17 on f027d15bed9b): Confirm order request
    confirmOrderRequest: {
      "useDefault": true,
      "setDefault": false,
      "namespace": "85189f7cf7a64f86aa6aa91d81d36c08",
      "country": "NL",
      "countryName": "Netherlands",
      "orderId": null,
      "orderComplete": false,
      "orderError": false,
      "orderPending": false,
      "offers": [
        "a61c6602b5784d36801d0cab73e02337"
      ],
      "includeAccountBalance": false,
      "totalAmount": 0,
      "affiliateId": "",
      "creatorSource": "",
      "threeDSToken": "",
      "voucherCode": null,
      "syncToken": "XXXXXXXXXXXXXXXXX",
      "isFreeOrder": false
    }
[2020-05-29 17:23:39.618 +0000] DEBUG (17 on f027d15bed9b): confirm order response
    confirmOrderResponse: {
      "captchaResult": "CAPTCHA",
      "syncToken": "XXXXXXXXXXXXXXXXX",
      "errorCode": "errors.com.epicgames.purchase.purchase.captcha.challenge"
    }
[2020-05-29 17:23:39.619 +0000] DEBUG (17 on f027d15bed9b): Done purchasing

Global store support

Currently, we're using only 'en-US' endpoints. I'm not sure if it makes an impact for accounts created in other regions.

If someone using this tool is not an en-US user, can you let me know if you have any problems redeeming games and playing them from a non-'en-US' context?

Improve logging

Currently we're using console.log for everything. I'm familiar with pino, so we should probably use it in its pretty print mode. This will also add a config option for log level.

Login Broken (hCaptcha switch)

Epic switched to hcaptcha rather than Arkose. This project needs to be updated to fix login.

It looks like there may be some strict IP checking, so this project may be RIP.

GCP config file not found - " no such file or directory"

When i'm trying to run the script as follows:

docker run -e TZ=America/Chicago -e [email protected] -e PASSWORD=1231231123 -e GCP_CONFIG_NAME=weeklyepicgames-xxxxxxxxxxx.json -e RUN_ON_STARTUP=true -v /mnt/user/appdata/epicgames-freegames/:/usr/app/config:rw charlocharlie/epicgames-freegames:latest

I receive the error even though I've checked "/usr/app/config/" directory and the "fweeklyepicgames-xxxxxxxxxxx.json" is clearly there.

> [email protected] start /usr/app
> node dist/index.js

[2020-04-25 02:16:10.405 -0500] ERROR (24 on 0da6d9c67ee3): ENOENT: no such file or directory, open '/usr/app/config/fweeklyepicgames-xxxxxxxxxxx.json'
    Error: ENOENT: no such file or directory, open '/usr/app/config/weeklyepicgames-xxxxxxxxxxx.json'
(node:24) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'body' of undefined
    at main (/usr/app/dist/index.js:309:24)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:24) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:24) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'body' of undefined

Hi,

I'm running the current latest Docker image and I receive the following error when starting it:

docker run -it -e TZ=Europe/Amsterdam -e [email protected] -e PASSWORD=mypassword -e GCP_CONFIG_NAME=gcp.json -e RUN_ON_STARTUP=true -e LOG_LEVEL=debug -v /volume1/docker/epicgames/config:/usr/app/config:rw charlocharlie/epicgames-freegames:latest

> [email protected] start /usr/app
> node dist/index.js

[2020-05-24 22:54:39.070 +0200] DEBUG (24 on f6b16addd5ba): Could not refresh credentials. Logging in fresh.
[2020-05-24 22:54:40.581 +0200] DEBUG (24 on f6b16addd5ba): Captcha required
[2020-05-24 22:54:41.674 +0200] DEBUG (24 on f6b16addd5ba):
    audioURL: "https://epic-games-api.arkoselabs.com/fc/get_audio/?session_token=XXXXXXX&analytics_tier=40&r=eu-west-1&game=0&language=en&d=1"
(node:24) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'body' of undefined
    at main (/usr/app/dist/index.js:19:24)
(node:24) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:24) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

It seems to be stuck after the captcha. Any ideas how to solve this issue?

Thanks!

Unrecognized productType

Not sure if this is happening because of a certain item or because there is two games.

[2020-06-11 12:00:02.521 -0700] INFO  (17 on epicgames-causefx): Checking free games for [email protected]
[2020-06-11 12:00:03.485 -0700] INFO  (17 on epicgames-causefx): Successfully refreshed login
[2020-06-11 12:00:04.220 -0700] INFO  (17 on epicgames-causefx): Available free games
    availableGames: [
      "SAMURAI SHODOWN NEOGEO COLLECTION",
      "ARK: Survival Evolved"
    ]
[2020-06-11 12:00:04.224 -0700] ERROR (17 on epicgames-causefx): Unrecognized productType: games/edition/base
    Error: Unrecognized productType: games/edition/base
        at /usr/app/src/free-games.ts:125:13
        at Array.map (<anonymous>)
        at updateIds (/usr/app/src/free-games.ts:102:27)
        at Object.getAllFreeGames (/usr/app/src/free-games.ts:135:31)
        at runMicrotasks (<anonymous>)
        at processTicksAndRejections (internal/process/task_queues.js:97:5)
        at main (/usr/app/src/index.ts:18:22)

Games are not claimed?

Originally I ran the docker container and it 'successfully' claimed the two current games. After looking at the account, the games are not available within the library and I've not been sent receipts for them.

The log now shows:


[2020-08-13 16:56:41.445 +0000] INFO  (24 on c6ed7339a4c6): Checking free games for xxx


[2020-08-13 16:56:46.669 +0000] INFO  (24 on c6ed7339a4c6): Successfully logged in fresh


    user: "xxx"


[2020-08-13 16:56:46.940 +0000] INFO  (24 on c6ed7339a4c6): Available free games


    user: "xxx"


    availableGames: [


      "The Alto Collection",


      "Remnant: From the Ashes"


    ]


[2020-08-13 16:56:47.406 +0000] INFO  (24 on c6ed7339a4c6): Unpurchased free games


    user: "xxx"


    purchasableGames: []

Why is it showing them as available?

Make GCP config optional

Not all users will be prompted for a Captcha on login. The GCP setup should be optional unless the user requires it for Captchas.

ARM Docker Image Support?

Hi, would love to get this running on a Raspberry Pi 4 but I noticed you only have an amd64 build.

Any plans for an ARM build as well?

UnhandledPromiseRejectionWarning: HTTPError: Response code 400 (Bad Request)

Hi again :)

I pulled the latest Docker image which worked fine for one account, but fails again on a second account with the following error:

> [email protected] start /usr/app
> node dist/index.js

[2020-05-29 23:27:56.239 +0000] INFO  (17 on 769a785336ff): Successfully refreshed login
[2020-05-29 23:27:57.855 +0000] INFO  (17 on 769a785336ff): Available free games
    availableGames: [
      "Borderlands: The Handsome Collection"
    ]
[2020-05-29 23:27:57.857 +0000] DEBUG (17 on 769a785336ff): Fetching updated IDs
    url: "https://store-content.ak.epicgames.com/api/en-US/content/bundles/borderlands-the-handsome-collection"
[2020-05-29 23:27:57.934 +0000] DEBUG (17 on 769a785336ff): Getting product info
    linkedOfferNs: "85189f7cf7a64f86aa6aa91d81d36c08"
    linkedOfferId: "a61c6602b5784d36801d0cab73e02337"
[2020-05-29 23:27:57.936 +0000] DEBUG (17 on 769a785336ff): Posting for offer entitlement
    data: {
      "query": "query launcherQuery($namespace:String!, $offerId:String!) {\n    Launcher {\n      entitledOfferItems(namespace: $namespace, offerId: $offerId) {\n        namespace\n        offerId\n        entitledToAllItemsInOffer\n        entitledToAnyItemInOffer\n      }\n    }\n  }",
      "variables": {
        "namespace": "85189f7cf7a64f86aa6aa91d81d36c08",
        "offerId": "a61c6602b5784d36801d0cab73e02337"
      }
    }
    url: "https://www.epicgames.com/store/backend/graphql-proxy"
[2020-05-29 23:27:58.314 +0000] INFO  (17 on 769a785336ff): Unpurchased free games
    purchasableGames: [
      "Borderlands: The Handsome Collection"
    ]
[2020-05-29 23:27:58.315 +0000] INFO  (17 on 769a785336ff): Purchasing Borderlands: The Handsome Collection
[2020-05-29 23:27:59.546 +0000] DEBUG (17 on 769a785336ff): purchaseToken
    purchaseToken: "41a588961c774553ba3150a3e5096ec2"
[2020-05-29 23:27:59.548 +0000] DEBUG (17 on 769a785336ff): Order preview request
    orderPreviewRequest: {
      "useDefault": true,
      "setDefault": false,
      "namespace": "85189f7cf7a64f86aa6aa91d81d36c08",
      "country": null,
      "countryName": null,
      "orderId": null,
      "orderComplete": null,
      "orderError": null,
      "orderPending": null,
      "offers": [
        "a61c6602b5784d36801d0cab73e02337"
      ],
      "offerPrice": ""
    }
[2020-05-29 23:28:00.200 +0000] DEBUG (17 on 769a785336ff): Order preview response
    orderPreviewResponse: {
      "affiliation": null,
      "catalogResponse": {
        "currencySymbolPlacement": "LEFT",
        "code": "NL",
        "displayName": "NETHERLANDS",
        "ratingSystem": "PEGI",
        "embargoed": false,
        "sellerOfRecord": "EPIC_INT",
        "vatChargeRate": 23,
        "vatPercentage": 21,
        "defaultCurrency": "EUR",
        "vatIncluded": true,
        "region": "EURO",
        "sellerOfRecordName": "Epic Games International S.à r.l.",
        "paymentCurrency": "EUR"
      },
      "country": "NL",
      "countryName": "Netherlands",
      "message": null,
      "namespace": "85189f7cf7a64f86aa6aa91d81d36c08",
      "offers": [
        "a61c6602b5784d36801d0cab73e02337"
      ],
      "orderComplete": false,
      "orderError": false,
      "orderId": null,
      "orderPending": false,
      "orderResponse": {
        "orderType": "PURCHASE",
        "symbol": "€",
        "country": "NL",
        "agentUserName": "anonymous",
        "toUSDExchangeRate": 1.1079040816007766,
        "totalPrice": 0,
        "accountIpCountry": "NL",
        "formattedTotalPrice": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "formattedConvenienceFee": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "paymentCurrencySymbol": "€",
        "orderStatus": "PREVIEW",
        "epicAccountId": "XXXXXXXXXXXXXXXXXXXXXXXXXX",
        "salesChannel": "epic-store-web-purchase",
        "formattedPresentmentAmount": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "canQuickPurchase": true,
        "formattedBillingPaymentAmount": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "taxStatus": "NOT_APPLICABLE",
        "totalTax": 0,
        "isFree": true,
        "coupons": [],
        "walletPaymentAmount": 0,
        "totalDiscounted": 0,
        "useSplitPayment": false,
        "currency": "EUR",
        "formattedTotalTax": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "rewardVoucher": null,
        "fraudScore": 0,
        "lastModifiedDate": "2020-05-29T23:28:00.118+0000",
        "paymentCurrencyCode": "EUR",
        "paymentCurrencyAmount": 0,
        "accountIpAddress": "XXXXXXXXXXXXXXX",
        "vat": 0,
        "batchJobFailedRetryCount": 0,
        "lineOffers": [
          {
            "totalPrice": 0,
            "formattedTotalPrice": {
              "amount": "0.00",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "entitlementSource": "AppEpicgamesCom",
            "sellerName": "2K Games, Inc.",
            "refundedRevenueWithoutTax": 0,
            "revenueWithoutTax": 0,
            "title": "Borderlands: The Handsome Collection",
            "formattedBasePrice": {
              "amount": "59.99",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "offerType": "BUNDLE",
            "basePayoutCurrencyCode": "USD",
            "sellerId": "o-37m6jbj5wcvrcvm4wusv7nazdfvbjk",
            "formattedDiscountedPrice": {
              "amount": "0.00",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "refundedBasePayoutPrice": 0,
            "remainingDiscountPrice": 0,
            "refundedConvenienceFee": 0,
            "refundedTax": 0,
            "initiatedBy": "SELLER",
            "basePrice": 5999,
            "formattedBasePayoutPrice": {
              "amount": "0.00",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "unitPrice": 0,
            "refundedDiscountPrice": 0,
            "quantity": 1,
            "vat": 0,
            "formattedVoucherPrice": {
              "amount": "0.00",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "refundedQuantity": 0,
            "shareRate": 0,
            "shareRateByDeveloper": 0,
            "voucherDiscount": 0,
            "namespaceDisplayName": "Ivory",
            "convenienceFee": 0,
            "discountedPrice": 0,
            "formattedTaxPrice": {
              "amount": "0.00",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "namespace": "85189f7cf7a64f86aa6aa91d81d36c08",
            "formattedUnitPrice": {
              "amount": "0.00",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "offerId": "a61c6602b5784d36801d0cab73e02337",
            "taxPrice": 0,
            "basePayoutPrice": 0,
            "roleNames": []
          }
        ],
        "merchantGroup": "EGS_MKT",
        "creationDate": "2020-05-29T23:28:00.118+0000",
        "formattedWalletPaymentAmount": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "convenienceFee": 0,
        "identityId": "XXXXXXXXXXXXXXXXXXXXXXXXXX",
        "fraud": false,
        "billingPaymentAmount": 0,
        "vatIncluded": true,
        "paymentCurrencyExchangeRate": 1,
        "formattedTotalDiscounted": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "canSplitPayment": false
      },
      "paypalError": null,
      "showCurrencyChangeMessage": false,
      "syncToken": "XXXXXXXXXXXXXXXXXXXXXXXXXX",
      "voucherList": null
    }
[2020-05-29 23:28:00.202 +0000] DEBUG (17 on 769a785336ff): Confirm order request
    confirmOrderRequest: {
      "useDefault": true,
      "setDefault": false,
      "namespace": "85189f7cf7a64f86aa6aa91d81d36c08",
      "country": "NL",
      "countryName": "Netherlands",
      "orderId": null,
      "orderComplete": false,
      "orderError": false,
      "orderPending": false,
      "offers": [
        "a61c6602b5784d36801d0cab73e02337"
      ],
      "includeAccountBalance": false,
      "totalAmount": 0,
      "affiliateId": "",
      "creatorSource": "",
      "threeDSToken": "",
      "voucherCode": null,
      "syncToken": "XXXXXXXXXXXXXXXXXXXXXXXXXX",
      "isFreeOrder": false
    }
[2020-05-29 23:28:00.203 +0000] DEBUG (17 on 769a785336ff): Done purchasing
[2020-05-29 23:28:00.586 +0000] DEBUG (17 on 769a785336ff): confirm order response
    confirmOrderResponse: {
      "captchaResult": "CAPTCHA",
      "syncToken": "XXXXXXXXXXXXXXXXXXXXXXXXXX",
      "errorCode": "errors.com.epicgames.purchase.purchase.captcha.challenge"
    }
[2020-05-29 23:28:00.587 +0000] DEBUG (17 on 769a785336ff): Captcha required
[2020-05-29 23:28:01.567 +0000] DEBUG (17 on 769a785336ff):
    audioURL: "https://epic-games-api.arkoselabs.com/fc/get_audio/?session_token=XXXXXXXXXXXXXXXXXX&analytics_tier=40&r=eu-west-1&game=0&language=en&d=1"
[2020-05-29 23:28:03.645 +0000] DEBUG (17 on 769a785336ff): Did not transcribe enough digits. Retrying
[2020-05-29 23:28:04.335 +0000] DEBUG (17 on 769a785336ff):
    audioURL: "https://epic-games-api.arkoselabs.com/fc/get_audio/?session_token=XXXXXXXXXXXXXXXXXXXXXX&analytics_tier=40&r=eu-west-1&game=0&language=en&d=1"
[2020-05-29 23:28:06.422 +0000] DEBUG (17 on 769a785336ff): Guessing captcha
    digitString: "9014929"
[2020-05-29 23:28:06.965 +0000] INFO  (17 on 769a785336ff): Captcha successful
[2020-05-29 23:28:06.968 +0000] DEBUG (17 on 769a785336ff): Captcha session token
    verificationCode: "9275ed19a83f17838.5454319505|r=eu-west-1"
[2020-05-29 23:28:06.970 +0000] DEBUG (17 on 769a785336ff): Confirm order request
    confirmOrderRequest: {
      "captchaToken": "XXXXXXXXXXXXXXXX|r=eu-west-1",
      "useDefault": true,
      "setDefault": false,
      "namespace": "85189f7cf7a64f86aa6aa91d81d36c08",
      "country": "NL",
      "countryName": "Netherlands",
      "orderId": null,
      "orderComplete": false,
      "orderError": false,
      "orderPending": false,
      "offers": [
        "a61c6602b5784d36801d0cab73e02337"
      ],
      "includeAccountBalance": false,
      "totalAmount": 0,
      "affiliateId": "",
      "creatorSource": "",
      "threeDSToken": "",
      "voucherCode": null,
      "syncToken": "XXXXXXXXXXXXXXXXXXXXXXXXXX",
      "isFreeOrder": false
    }
(node:17) UnhandledPromiseRejectionWarning: HTTPError: Response code 400 (Bad Request)
    at PromisableRequest.<anonymous> (/usr/app/node_modules/got/dist/source/as-promise/index.js:124:28)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:17) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting
a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:17) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Any idea what this might be causing?

Thanks again :) !

SSL routines:ssl3_get_record:wrong version number

I'm trying to run the docker version with docker run --name efg --rm -v $PWD:/usr/app/config charlocharlie/epicgames-freegames:latest, but it fails with a SSL error:

[2020-08-10 09:18:33.971 +0000] INFO (216 on 4d170ceedaa9): Checking free games for [email protected]
[2020-08-10 09:18:36.597 +0000] ERROR (216 on 4d170ceedaa9): 140516548472136:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:
Error: 140516548472136:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:
[2020-08-10 09:18:36.607 +0000] ERROR (216 on 4d170ceedaa9): 140516548472136:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:
Error: 140516548472136:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:

It works OK on one machine but fails on another (server one). config.json is basically the default one.
Any idea?

New Logins issue - Did not transcribe enough digits

I tried adding a new account today and came across this issue. It seems to effect logins for the first time only. As if the cookie json file is there it will refresh the CSRF token fine.

I went ahead and renamed a cookie json file that I had on a working account and got the same Captcha error.

Thanks for your time.

[2020-06-27 20:38:41.007 -0700] INFO  (32 on epicgames-causefx): Checking free games for [email protected]
[2020-06-27 20:38:41.011 -0700] DEBUG (32 on epicgames-causefx): Setting SID
[2020-06-27 20:38:41.012 -0700] DEBUG (32 on epicgames-causefx): Refreshing CSRF
[2020-06-27 20:38:41.759 -0700] DEBUG (32 on epicgames-causefx): Could not refresh credentials. Logging in fresh.
[2020-06-27 20:38:42.099 -0700] DEBUG (32 on epicgames-causefx): Attempting login
    email: "[email protected]"
    captcha: ""
    attempt: 0
[2020-06-27 20:38:42.101 -0700] DEBUG (32 on epicgames-causefx): Refreshing CSRF
[2020-06-27 20:38:43.176 -0700] DEBUG (32 on epicgames-causefx): Captcha required
[2020-06-27 20:38:45.944 -0700] DEBUG (32 on epicgames-causefx): Did not transcribe enough digits. Retrying
[2020-06-27 20:38:48.387 -0700] DEBUG (32 on epicgames-causefx): Did not transcribe enough digits. Retrying
[2020-06-27 20:38:50.876 -0700] DEBUG (32 on epicgames-causefx): Did not transcribe enough digits. Retrying
[2020-06-27 20:38:53.327 -0700] DEBUG (32 on epicgames-causefx): Did not transcribe enough digits. Retrying
[2020-06-27 20:38:55.900 -0700] DEBUG (32 on epicgames-causefx): Did not transcribe enough digits. Retrying
[2020-06-27 20:38:58.746 -0700] DEBUG (32 on epicgames-causefx): Did not transcribe enough digits. Retrying
[2020-06-27 20:39:01.029 -0700] DEBUG (32 on epicgames-causefx): Did not transcribe enough digits. Retrying

Can't see / solve Captcha

Hey, after your recent fix to captchas I do get the email with a link to my domain and id to solve it. Unfortunately I can't see and solve the captcha when clicking the link. It only says "Solve the Captcha [blank space] After solving, you may receive more Captcha emails." It seems like the captcha itself does not load.

I try to solve it with Chrome browser on my Android phone if that helps. Any idea to fix this? :)

captcha

Ignoring cron schedule

I dont know why, but my container is checking all day long and ignoring my schedule.

My Config:

{
    "accounts": [
        {
            "email": "x",
            "password": "x",
            "totp": "x"
        },
    ],
    "gcpConfigName": "x",
    "runOnStartup": true,
    "cronSchedule": "0 12 * * *",
    "runOnce": false,
    "logLevel": "info",
    "baseUrl": "x",
    "email": {
        "smtpHost": "x",
        "smtpPort": 587,
        "emailSenderAddress": "x",
        "emailSenderName": "Epic Games Captchas",
        "emailRecipientAddress": "x",
        "secure": true,
        "auth": {
            "user": "x",
            "pass": "x",
        },
    }
}

ENV:
Unbenannt

tested with and without the env for the cron.

Log:

> [email protected] start /usr/app
> node dist/src/index.js

[2020-07-10 13:10:57.193 +0200] INFO  (17 on 0fd2d6b4bcb2): Checking free games for x
[2020-07-10 13:11:02.034 +0200] INFO  (17 on 0fd2d6b4bcb2): Successfully logged in fresh
    user: "x"
[2020-07-10 13:11:02.360 +0200] INFO  (17 on 0fd2d6b4bcb2): Available free games
    user: "x"
    availableGames: [
      "Lifeless Planet: Premier Edition",
      "Killing Floor 2",
      "The Escapists 2"
    ]
[2020-07-10 13:11:02.693 +0200] INFO  (17 on 0fd2d6b4bcb2): Unpurchased free games
    user: "x"
    purchasableGames: []

> [email protected] start /usr/app
> node dist/src/index.js

[2020-07-10 13:11:04.741 +0200] INFO  (17 on 0fd2d6b4bcb2): Checking free games for x
[2020-07-10 13:11:06.819 +0200] INFO  (17 on 0fd2d6b4bcb2): Successfully refreshed login
    user: "x"
[2020-07-10 13:11:06.831 +0200] INFO  (17 on 0fd2d6b4bcb2): Available free games
    user: "x"
    availableGames: [
      "Lifeless Planet: Premier Edition",
      "Killing Floor 2",
      "The Escapists 2"
    ]
[2020-07-10 13:11:07.151 +0200] INFO  (17 on 0fd2d6b4bcb2): Unpurchased free games
    user: "x"
    purchasableGames: []

> [email protected] start /usr/app
> node dist/src/index.js

[2020-07-10 13:11:09.619 +0200] INFO  (18 on 0fd2d6b4bcb2): Checking free games for x
[2020-07-10 13:11:11.666 +0200] INFO  (18 on 0fd2d6b4bcb2): Successfully refreshed login
    user: "x"
[2020-07-10 13:11:11.678 +0200] INFO  (18 on 0fd2d6b4bcb2): Available free games
    user: "x"
    availableGames: [
      "Lifeless Planet: Premier Edition",
      "Killing Floor 2",
      "The Escapists 2"
    ]
[2020-07-10 13:11:11.994 +0200] INFO  (18 on 0fd2d6b4bcb2): Unpurchased free games
    user: "x"
    purchasableGames: []

Use `node-epicgames-client` for Epic API backend stuff

Hi,

So I was working on https://github.com/Revadike/epicgames-freebies-claimer and https://github.com/Revadike/node-epicgames-client

But just found this project and it has a lot more functionality already so I think abandoning epicgames-freebies-claimer and using this instead.

But here is a lot of functionality implemented that's already part of https://github.com/Revadike/node-epicgames-client so would you accept a PR which refactors this out and uses node-epicgames-client as dependency instead?

Email notifications best practice

What's the best practice for setting up email notifications for the script?

Currently I run script daily with crontab and i've setup crontab to be sending script's logs to my email.
But it's sending me logs no matter if they are important or not. I think there is only two cases when logs are important and all other logs are unnecessary:

  • new games got activated
  • some issue during script execution
    Whats the best practice to achieve that? Maybe emailing important logs should be option included in script? Given script already have smtp username and login to send those logs.

when using cookies and authentication fails, errors (email and log) do not indicate which account needs new cookies

Was testing out adding an additional account to my setup and noticed that the error message (log output) doesn't indicate the account with issues, but by examining other log output nearby, one can determine the account in need of login help by elimination:

epicgames-freegames    | [2020-12-19 17:21:49.000 -0500] INFO  (30 on b708fb3d9a94): Successfully refreshed login
epicgames-freegames    |     user: "[email protected]"
epicgames-freegames    | [2020-12-19 17:21:50.000 -0500] INFO  (30 on b708fb3d9a94): Action requested. Waiting for Captcha to be solved
epicgames-freegames    |     id: "ffffffff-ffff-ffff-ffff-ffffffffffff"

(from this output I can infer the other account, [email protected] is the one with issues)

Similar issue exists for the email content, except that doesn't indicate which account at all (have to examine the logs)

Connection timeout on SMTPConnection

I have set up correctly the email's parameters (with the Google's app password) and I am having this error (I've hidden the sensitive data):

[2020-10-01 18:08:40.310 +0000] ERROR (39 on 81dbc2ba74d2): Error sending email. Please check your configuration,
    emailConfig: {,
      "smtpHost": "smtp.gmail.com",
      "smtpPort": 587,
      "emailSenderAddress": "", // With my email address
      "emailSenderName": "Epic Games Captchas",
      "emailRecipientAddress": "", // With my email address
      "secure": false,
      "auth": {,
        "user": "", // With my email address
        "pass": "", // With my Google's app password
      },
    },
[2020-10-01 18:08:40.311 +0000] ERROR (39 on 81dbc2ba74d2): Connection timeout,
    Error: Connection timeout,
        at SMTPConnection._formatError (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:784:19),
        at SMTPConnection._onError (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:770:20),
        at Timeout.<anonymous> (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:235:22),
        at listOnTimeout (internal/timers.js:549:17),
        at processTimers (internal/timers.js:492:7),
[2020-10-01 18:08:40.317 +0000] ERROR (39 on 81dbc2ba74d2): Connection timeout,
    Error: Connection timeout,
        at SMTPConnection._formatError (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:784:19),
        at SMTPConnection._onError (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:770:20),
        at Timeout.<anonymous> (/usr/app/node_modules/nodemailer/lib/smtp-connection/index.js:235:22),
        at listOnTimeout (internal/timers.js:549:17),
        at processTimers (internal/timers.js:492:7),

Is it something I'm doing wrong? I have recreated the password from Google's security parameters to try but no success. I have also tried to change the smtp port.
The first time I go to the UI the captcha page shows correctly, then when I get this error and I refresh the page, a Bad Gateway message appears.

Unable to get Email to Work

I've tried setting up email sending with both the config.json and environment variables. However, there's no attempt to send email according to my email server, and there's no logs showing errors for the docker container.

Fix Recognition

As google text-to-speech no longer works, you should consider using Wit.ai with an api(which is free btw) for the recognition. Auto solve is much needed.

Cookies expiring within a few hours

Hi, my cookies keep expiring within a few hours and I need to re-import them daily. Note that I'm staying signed in on my browser the whole time. Anyone else experiencing this?

Cannot read property 'entitledToAllItemsInOffer' of null

From time to time I get the following error (maybe one time out of seven or so), it's not systematic and I can't find a way to surely reproduce it.

[2020-06-18 06:00:11.130 +0000] INFO  (37 on a1b7f87ffb77): Successfully refreshed login
[2020-06-18 06:00:12.812 +0000] INFO  (37 on a1b7f87ffb77): Available free games
    availableGames: [
      "SAMURAI SHODOWN NEOGEO COLLECTION",
      "ARK: Survival Evolved"
    ]
[2020-06-18 06:00:13.219 +0000] ERROR (37 on a1b7f87ffb77): Cannot read property 'entitledToAllItemsInOffer' of null
    TypeError: Cannot read property 'entitledToAllItemsInOffer' of null
        at ownsGame (/usr/app/free-games.ts:76:16)
        at processTicksAndRejections (internal/process/task_queues.js:97:5)
        at async Promise.all (index 0)
        at getPurchasableFreeGames (/usr/app/free-games.ts:84:21)
        at Object.getAllFreeGames (/usr/app/free-games.ts:145:28)
        at main (/usr/app/index.ts:17:22)
Exiting...

New account can't login (Too many login attempts) Captcha loop?

For some reason a new account can't login... I know the credentials are correct as I have gone over there a few times already.

Does the new acct maybe have to have a payment method prior to setup?

Logs:

Setting timezone: America/Phoenix
Setting cron schedule as 0 12 * * *
Incoming env vars:
RUN_ON_STARTUP: true
CRON_SCHEDULE: 
RUN_ONCE: 
Getting settings from JSON: /usr/app/config/config.json
Setting config variables
Run on startup: true
Run once: false

> [email protected] start /usr/app
> node dist/src/index.js

[2020-10-05 21:33:53.510 -0700] INFO  (32 on epicgames-causefx): Checking free games for newacctemail
[2020-10-05 21:33:53.511 -0700] DEBUG (32 on epicgames-causefx): Setting SID
    user: "newacctemail"
[2020-10-05 21:33:53.511 -0700] DEBUG (32 on epicgames-causefx): Refreshing CSRF
    user: "newacctemail"
[2020-10-05 21:33:54.157 -0700] DEBUG (32 on epicgames-causefx): Could not refresh credentials. Logging in fresh.
    user: "newacctemail"
[2020-10-05 21:33:54.493 -0700] DEBUG (32 on epicgames-causefx): Attempting login
    user: "newacctemail"
    email: "newacctemail"
    captcha: ""
    attempt: 0
[2020-10-05 21:33:54.493 -0700] DEBUG (32 on epicgames-causefx): Refreshing CSRF
    user: "newacctemail"
[2020-10-05 21:33:55.166 -0700] DEBUG (32 on epicgames-causefx): Captcha required
    user: "newacctemail"
[2020-10-05 21:33:55.168 -0700] DEBUG (32 on epicgames-causefx): Go to https://captcha.myDomain.com?id=e1522c56-0934-49dc-be57-5bfb927b5627&pkey=37D033EB-6489-3763-2AE1-A228C04103F5 and solve the captcha
[2020-10-05 21:34:25.175 -0700] DEBUG (32 on epicgames-causefx): incoming POST body
    body: {
      "sessionData": "8145f7bf3d0753559.3446647302|r=us-west-2|metabgclr=%23202020|maintxtclr=%23808080|mainbgclr=%23202020%3B|guitextcolor=%23808080|metaiconclr=%238a8a8a|meta_height=384|meta_width=340|meta=11|pk=37D033EB-6489-3763-2AE1-A228C04103F5|at=40|sup=1|rid=51|ag=101|cdn_url=https://cdn.arkoselabs.com/fc|lurl=https://audio-us-west-2.arkoselabs.com|surl=https://epic-games-api.arkoselabs.com",
      "id": "e1522c56-0934-49dc-be57-5bfb927b5627"
    }
[2020-10-05 21:34:25.180 -0700] DEBUG (32 on epicgames-causefx): Attempting login
    user: "newacctemail"
    email: "newacctemail"
    captcha: "8145f7bf3d0753559.3446647302|r=us-west-2|metabgclr=%23202020|maintxtclr=%23808080|mainbgclr=%23202020%3B|guitextcolor=%23808080|metaiconclr=%238a8a8a|meta_height=384|meta_width=340|meta=11|pk=37D033EB-6489-3763-2AE1-A228C04103F5|at=40|sup=1|rid=51|ag=101|cdn_url=https://cdn.arkoselabs.com/fc|lurl=https://audio-us-west-2.arkoselabs.com|surl=https://epic-games-api.arkoselabs.com"
    attempt: 1
[2020-10-05 21:34:25.181 -0700] DEBUG (32 on epicgames-causefx): Refreshing CSRF
    user: "newacctemail"
[2020-10-05 21:34:26.713 -0700] DEBUG (32 on epicgames-causefx): Captcha required
    user: "newacctemail"
[2020-10-05 21:34:26.714 -0700] DEBUG (32 on epicgames-causefx): Go to https://captcha.myDomain.com?id=44796ae9-f543-4a1a-9f28-f078a96c7aa0&pkey=37D033EB-6489-3763-2AE1-A228C04103F5 and solve the captcha
[2020-10-05 21:34:27.965 -0700] DEBUG (32 on epicgames-causefx): Email sent.
    from: "myFromEmailAddress"
    to: "myToEmailAddress"
[2020-10-05 21:34:27.966 -0700] INFO  (32 on epicgames-causefx): Action requested. Waiting for Captcha to be solved
    id: "44796ae9-f543-4a1a-9f28-f078a96c7aa0"
[2020-10-05 21:34:55.357 -0700] DEBUG (32 on epicgames-causefx): incoming POST body
    body: {
      "sessionData": "725f7bf3eeb233a5.9824983102|r=us-west-2|metabgclr=%23202020|maintxtclr=%23808080|mainbgclr=%23202020%3B|guitextcolor=%23808080|metaiconclr=%238a8a8a|meta_height=384|meta_width=340|meta=11|pk=37D033EB-6489-3763-2AE1-A228C04103F5|at=40|sup=1|rid=82|ag=101|cdn_url=https://cdn.arkoselabs.com/fc|lurl=https://audio-us-west-2.arkoselabs.com|surl=https://epic-games-api.arkoselabs.com",
      "id": "44796ae9-f543-4a1a-9f28-f078a96c7aa0"
    }
[2020-10-05 21:34:55.359 -0700] DEBUG (32 on epicgames-causefx): Attempting login
    user: "newacctemail"
    email: "newacctemail"
    captcha: "725f7bf3eeb233a5.9824983102|r=us-west-2|metabgclr=%23202020|maintxtclr=%23808080|mainbgclr=%23202020%3B|guitextcolor=%23808080|metaiconclr=%238a8a8a|meta_height=384|meta_width=340|meta=11|pk=37D033EB-6489-3763-2AE1-A228C04103F5|at=40|sup=1|rid=82|ag=101|cdn_url=https://cdn.arkoselabs.com/fc|lurl=https://audio-us-west-2.arkoselabs.com|surl=https://epic-games-api.arkoselabs.com"
    attempt: 2
[2020-10-05 21:34:55.360 -0700] DEBUG (32 on epicgames-causefx): Refreshing CSRF
    user: "newacctemail"
[2020-10-05 21:34:56.896 -0700] DEBUG (32 on epicgames-causefx): Captcha required
    user: "newacctemail"
[2020-10-05 21:34:56.897 -0700] DEBUG (32 on epicgames-causefx): Go to https://captcha.myDomain.com?id=d86168e2-4876-464f-93e0-0d2f47705385&pkey=37D033EB-6489-3763-2AE1-A228C04103F5 and solve the captcha
[2020-10-05 21:34:58.214 -0700] DEBUG (32 on epicgames-causefx): Email sent.
    from: "myFromEmailAddress"
    to: "myToEmailAddress"
[2020-10-05 21:34:58.214 -0700] INFO  (32 on epicgames-causefx): Action requested. Waiting for Captcha to be solved
    id: "d86168e2-4876-464f-93e0-0d2f47705385"
[2020-10-05 21:35:15.045 -0700] DEBUG (32 on epicgames-causefx): incoming POST body
    body: {
      "sessionData": "1055f7bf40291eff1.8005694202|r=us-west-2|metabgclr=%23202020|maintxtclr=%23808080|mainbgclr=%23202020%3B|guitextcolor=%23808080|metaiconclr=%238a8a8a|meta_height=384|meta_width=340|meta=11|pk=37D033EB-6489-3763-2AE1-A228C04103F5|at=40|sup=1|rid=86|ag=101|cdn_url=https://cdn.arkoselabs.com/fc|lurl=https://audio-us-west-2.arkoselabs.com|surl=https://epic-games-api.arkoselabs.com",
      "id": "d86168e2-4876-464f-93e0-0d2f47705385"
    }
[2020-10-05 21:35:15.046 -0700] DEBUG (32 on epicgames-causefx): Attempting login
    user: "newacctemail"
    email: "newacctemail"
    captcha: "1055f7bf40291eff1.8005694202|r=us-west-2|metabgclr=%23202020|maintxtclr=%23808080|mainbgclr=%23202020%3B|guitextcolor=%23808080|metaiconclr=%238a8a8a|meta_height=384|meta_width=340|meta=11|pk=37D033EB-6489-3763-2AE1-A228C04103F5|at=40|sup=1|rid=86|ag=101|cdn_url=https://cdn.arkoselabs.com/fc|lurl=https://audio-us-west-2.arkoselabs.com|surl=https://epic-games-api.arkoselabs.com"
    attempt: 3
[2020-10-05 21:35:15.047 -0700] DEBUG (32 on epicgames-causefx): Refreshing CSRF
    user: "newacctemail"
[2020-10-05 21:35:16.272 -0700] DEBUG (32 on epicgames-causefx): Captcha required
    user: "newacctemail"
[2020-10-05 21:35:16.272 -0700] DEBUG (32 on epicgames-causefx): Go to https://captcha.myDomain.com?id=135251ae-fa37-4a4e-9461-540a72c939e8&pkey=37D033EB-6489-3763-2AE1-A228C04103F5 and solve the captcha
[2020-10-05 21:35:17.696 -0700] DEBUG (32 on epicgames-causefx): Email sent.
    from: "myFromEmailAddress"
    to: "myToEmailAddress"
[2020-10-05 21:35:17.697 -0700] INFO  (32 on epicgames-causefx): Action requested. Waiting for Captcha to be solved
    id: "135251ae-fa37-4a4e-9461-540a72c939e8"
[2020-10-05 21:35:18.362 -0700] DEBUG (32 on epicgames-causefx): incoming POST body
    body: {
      "sessionData": "4505f7bf406012cd1.2820457202|r=us-west-2|metabgclr=%23202020|maintxtclr=%23808080|mainbgclr=%23202020%3B|guitextcolor=%23808080|metaiconclr=%238a8a8a|meta_height=384|meta_width=340|meta=11|pk=37D033EB-6489-3763-2AE1-A228C04103F5|at=40|sup=1|rid=86|ag=101|cdn_url=https://cdn.arkoselabs.com/fc|lurl=https://audio-us-west-2.arkoselabs.com|surl=https://epic-games-api.arkoselabs.com",
      "id": "135251ae-fa37-4a4e-9461-540a72c939e8"
    }
[2020-10-05 21:35:18.363 -0700] DEBUG (32 on epicgames-causefx): Attempting login
    user: "newacctemail"
    email: "newacctemail"
    captcha: "4505f7bf406012cd1.2820457202|r=us-west-2|metabgclr=%23202020|maintxtclr=%23808080|mainbgclr=%23202020%3B|guitextcolor=%23808080|metaiconclr=%238a8a8a|meta_height=384|meta_width=340|meta=11|pk=37D033EB-6489-3763-2AE1-A228C04103F5|at=40|sup=1|rid=86|ag=101|cdn_url=https://cdn.arkoselabs.com/fc|lurl=https://audio-us-west-2.arkoselabs.com|surl=https://epic-games-api.arkoselabs.com"
    attempt: 4
[2020-10-05 21:35:18.363 -0700] DEBUG (32 on epicgames-causefx): Refreshing CSRF
    user: "newacctemail"
[2020-10-05 21:35:19.651 -0700] DEBUG (32 on epicgames-causefx): Captcha required
    user: "newacctemail"
[2020-10-05 21:35:19.652 -0700] DEBUG (32 on epicgames-causefx): Go to https://captcha.myDomain.com?id=6ae0e61e-c63e-47d5-86c5-95e5a61bd4d7&pkey=37D033EB-6489-3763-2AE1-A228C04103F5 and solve the captcha
[2020-10-05 21:35:20.922 -0700] DEBUG (32 on epicgames-causefx): Email sent.
    from: "myFromEmailAddress"
    to: "myToEmailAddress"
[2020-10-05 21:35:20.923 -0700] INFO  (32 on epicgames-causefx): Action requested. Waiting for Captcha to be solved
    id: "6ae0e61e-c63e-47d5-86c5-95e5a61bd4d7"
[2020-10-05 21:35:21.604 -0700] DEBUG (32 on epicgames-causefx): incoming POST body
    body: {
      "sessionData": "4185f7bf4092d3d18.3892724102|r=us-west-2|metabgclr=%23202020|maintxtclr=%23808080|mainbgclr=%23202020%3B|guitextcolor=%23808080|metaiconclr=%238a8a8a|meta_height=384|meta_width=340|meta=11|pk=37D033EB-6489-3763-2AE1-A228C04103F5|at=40|sup=1|rid=1|ag=101|cdn_url=https://cdn.arkoselabs.com/fc|lurl=https://audio-us-west-2.arkoselabs.com|surl=https://epic-games-api.arkoselabs.com",
      "id": "6ae0e61e-c63e-47d5-86c5-95e5a61bd4d7"
    }
[2020-10-05 21:35:21.606 -0700] DEBUG (32 on epicgames-causefx): Attempting login
    user: "newacctemail"
    email: "newacctemail"
    captcha: "4185f7bf4092d3d18.3892724102|r=us-west-2|metabgclr=%23202020|maintxtclr=%23808080|mainbgclr=%23202020%3B|guitextcolor=%23808080|metaiconclr=%238a8a8a|meta_height=384|meta_width=340|meta=11|pk=37D033EB-6489-3763-2AE1-A228C04103F5|at=40|sup=1|rid=1|ag=101|cdn_url=https://cdn.arkoselabs.com/fc|lurl=https://audio-us-west-2.arkoselabs.com|surl=https://epic-games-api.arkoselabs.com"
    attempt: 5
[2020-10-05 21:35:21.607 -0700] DEBUG (32 on epicgames-causefx): Refreshing CSRF
    user: "newacctemail"
[2020-10-05 21:35:23.030 -0700] DEBUG (32 on epicgames-causefx): Captcha required
    user: "newacctemail"
[2020-10-05 21:35:23.030 -0700] DEBUG (32 on epicgames-causefx): Go to https://captcha.myDomain.com?id=35dab0d1-dfdc-44f1-8256-9c5671bf784a&pkey=37D033EB-6489-3763-2AE1-A228C04103F5 and solve the captcha
[2020-10-05 21:35:24.265 -0700] DEBUG (32 on epicgames-causefx): Email sent.
    from: "myFromEmailAddress"
    to: "myToEmailAddress"
[2020-10-05 21:35:24.266 -0700] INFO  (32 on epicgames-causefx): Action requested. Waiting for Captcha to be solved
    id: "35dab0d1-dfdc-44f1-8256-9c5671bf784a"
[2020-10-05 21:35:25.253 -0700] DEBUG (32 on epicgames-causefx): incoming POST body
    body: {
      "sessionData": "2955f7bf40cd5d1c3.1779741402|r=us-west-2|metabgclr=%23202020|maintxtclr=%23808080|mainbgclr=%23202020%3B|guitextcolor=%23808080|metaiconclr=%238a8a8a|meta_height=384|meta_width=340|meta=11|pk=37D033EB-6489-3763-2AE1-A228C04103F5|at=40|sup=1|rid=100|ag=101|cdn_url=https://cdn.arkoselabs.com/fc|lurl=https://audio-us-west-2.arkoselabs.com|surl=https://epic-games-api.arkoselabs.com",
      "id": "35dab0d1-dfdc-44f1-8256-9c5671bf784a"
    }
[2020-10-05 21:35:25.255 -0700] DEBUG (32 on epicgames-causefx): Attempting login
    user: "newacctemail"
    email: "newacctemail"
    captcha: "2955f7bf40cd5d1c3.1779741402|r=us-west-2|metabgclr=%23202020|maintxtclr=%23808080|mainbgclr=%23202020%3B|guitextcolor=%23808080|metaiconclr=%238a8a8a|meta_height=384|meta_width=340|meta=11|pk=37D033EB-6489-3763-2AE1-A228C04103F5|at=40|sup=1|rid=100|ag=101|cdn_url=https://cdn.arkoselabs.com/fc|lurl=https://audio-us-west-2.arkoselabs.com|surl=https://epic-games-api.arkoselabs.com"
    attempt: 6
[2020-10-05 21:35:25.256 -0700] DEBUG (32 on epicgames-causefx): Refreshing CSRF
    user: "newacctemail"
[2020-10-05 21:35:25.596 -0700] ERROR (32 on epicgames-causefx): Too many login attempts
    Error: Too many login attempts
        at Login.login (/usr/app/src/login.ts:91:13)
        at processTicksAndRejections (internal/process/task_queues.js:97:5)
        at Login.login (/usr/app/src/login.ts:118:11)
        at Login.login (/usr/app/src/login.ts:118:11)
        at Login.login (/usr/app/src/login.ts:118:11)
        at Login.login (/usr/app/src/login.ts:118:11)
        at Login.login (/usr/app/src/login.ts:118:11)
        at Login.login (/usr/app/src/login.ts:118:11)
        at Login.fullLogin (/usr/app/src/login.ts:178:7)
        at /usr/app/src/index.ts:19:7

Unrecognized productType: games/edition/base

Hallo,

ich habe heute folgende Fehlermeldung erhalten:

> node dist/index.js

[2020-06-11 18:22:26.538 +0200] INFO  (24 on 2bf5e6fcefd9): Checking free games for [email protected]
[2020-06-11 18:22:27.733 +0200] INFO  (24 on 2bf5e6fcefd9): Successfully refreshed login
[2020-06-11 18:22:29.297 +0200] INFO  (24 on 2bf5e6fcefd9): Available free games
    availableGames: [
      "SAMURAI SHODOWN NEOGEO COLLECTION",
      "ARK: Survival Evolved"
    ]
[2020-06-11 18:22:29.301 +0200] ERROR (24 on 2bf5e6fcefd9): Unrecognized productType: games/edition/base
    Error: Unrecognized productType: games/edition/base
        at /usr/app/src/free-games.ts:125:13
        at Array.map (<anonymous>)
        at updateIds (/usr/app/src/free-games.ts:102:27)
        at Object.getAllFreeGames (/usr/app/src/free-games.ts:135:31)
        at processTicksAndRejections (internal/process/task_queues.js:97:5)
        at main (/usr/app/src/index.ts:18:22)

Hat schon mal einer das Problem?

Gruß

ERROR (33 on a55c3e77bec5): self signed certificate in certificate chain

Hello, I've just recently tried to setup this on a friend's machine, and ran into some issues that didn't happen on my machine..
This is the error:

[2020-12-22 09:08:25.356 -0300] ERROR (33 on a55c3e77bec5): Error sending email. Please check your configuration

emailConfig: {

"smtpHost": "smtp.gmail.com",

"smtpPort": 587,

"emailSenderAddress": "mymail",

"emailSenderName": "Epic Games Captchas",

"emailRecipientAddress": "hismail",

"secure": false,

"auth": {

"user": "mymail",

"pass": "mypass"

}

}

[2020-12-22 09:08:25.357 -0300] ERROR (33 on a55c3e77bec5): self signed certificate in certificate chain

Error: self signed certificate in certificate chain

at TLSSocket.onConnectSecure (_tls_wrap.js:1502:34)

at TLSSocket.emit (events.js:314:20)

at TLSSocket._finishInit (_tls_wrap.js:937:8)

at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:711:12)

[2020-12-22 09:08:25.358 -0300] ERROR (33 on a55c3e77bec5): self signed certificate in certificate chain

Error: self signed certificate in certificate chain

at TLSSocket.onConnectSecure (_tls_wrap.js:1502:34)

at TLSSocket.emit (events.js:314:20)

at TLSSocket._finishInit (_tls_wrap.js:937:8)

at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:711:12)

I had him setup the config with his email, but since it failed I sent him my email config since I know it works on my machine, but it still threw an error.
Only difference is he has multiple Epic accounts setup on the json, but all seem to be detected correctly as the log mentions it's checking them and created cookie files for them.
What am I doing wrong?
Thanks in advance and sorry if this has been answered before but I wasn't able to find it.

Hosting on a non-SSL domain results in CORS errors

localhost or an HTTPS domain work fine, but non-SSL domains throw CORS errors on the UI.

To solve this, the assets.hcaptcha.com requests need to be proxied, which means hot replacing the JS that calls that domain via proxy intercepts.

GraphQL API Authentication Error

Since a few weeks I always get the warning "Failed to authenticate with GraphQL API, trying again". It is spammed into the console and prevents new games from being claimed.

The warning happens directly after the check for available free games that is successfully executed listing the currently available games.

ERROR (HTTPError/24): Response code 400 (Bad Request)

Hi there :)

The Docker claimed the current free game (Overcooked) fine on one account, but failed on a second account. The first account contains paid games as well whereas the second account only contains 'free' games. The claiming interval between the two accounts is 1 hours and 10 minutes. Both accounts use the same region.

Please find the trace level logging below:

> [email protected] start /usr/app
> node dist/index.js

[2020-06-04 18:23:10.030 +0000] INFO  (24 on 65888ce00991): Checking free games for <REDACTED>
[2020-06-04 18:23:10.041 +0000] DEBUG (24 on 65888ce00991): Setting SID
[2020-06-04 18:23:10.042 +0000] DEBUG (24 on 65888ce00991): Refreshing CSRF
[2020-06-04 18:23:10.043 +0000] TRACE (24 on 65888ce00991): CSRF request
    url: "https://www.epicgames.com/id/api/csrf"
[2020-06-04 18:23:10.722 +0000] TRACE (24 on 65888ce00991): Redirect request
    params: {
      "clientId": "875a3b57d3a640a6b7f9b4e883463ab4",
      "redirectUrl": "https://www.epicgames.com/store/en-US/"
    }
    url: "https://www.epicgames.com/id/api/redirect"
[2020-06-04 18:23:11.180 +0000] TRACE (24 on 65888ce00991): Set SID request
    params: {
      "sid": "<REDACTED>"
    }
    url: "https://www.unrealengine.com/id/api/set-sid"
[2020-06-04 18:23:11.736 +0000] INFO  (24 on 65888ce00991): Successfully refreshed login
[2020-06-04 18:23:11.736 +0000] TRACE (24 on 65888ce00991): Request store homepage
    url: "https://www.epicgames.com/store/en-US/"
[2020-06-04 18:23:12.859 +0000] DEBUG (24 on 65888ce00991): Getting current free games list
[2020-06-04 18:23:12.860 +0000] TRACE (24 on 65888ce00991): Getting free games list
    url: "https://store-site-backend-static.ak.epicgames.com/freeGamesPromotions"
    params: {
      "locale": "en",
      "country": "US",
      "allowCountries": "US"
    }
[2020-06-04 18:23:13.173 +0000] INFO  (24 on 65888ce00991): Available free games
    availableGames: [
      "Overcooked"
    ]
[2020-06-04 18:23:13.175 +0000] DEBUG (24 on 65888ce00991): Mapping IDs to offer
[2020-06-04 18:23:13.176 +0000] TRACE (24 on 65888ce00991): Fetching updated IDs
    url: "https://store-content.ak.epicgames.com/api/en-US/content/products/overcooked"
[2020-06-04 18:23:13.300 +0000] DEBUG (24 on 65888ce00991): Checking ownership on available games
[2020-06-04 18:23:13.301 +0000] DEBUG (24 on 65888ce00991): Getting product info
    linkedOfferNs: "4561b40e52584ac2bcf34bbd5c401480"
    linkedOfferId: "e9428ad618aa45f4b3371b8c8c4f9de9"
[2020-06-04 18:23:13.302 +0000] TRACE (24 on 65888ce00991): Posting for offer entitlement
    data: {
      "query": "query launcherQuery($namespace:String!, $offerId:String!) {\n    Launcher {\n      entitledOfferItems(namespace: $namespace, offerId: $offerId) {\n        namespace\n        offerId\n        entitledToAllItemsInOffer\n        entitledToAnyItemInOffer\n      }\n    }\n  }",
      "variables": {
        "namespace": "4561b40e52584ac2bcf34bbd5c401480",
        "offerId": "e9428ad618aa45f4b3371b8c8c4f9de9"
      }
    }
    url: "https://www.epicgames.com/store/backend/graphql-proxy"
[2020-06-04 18:23:13.692 +0000] INFO  (24 on 65888ce00991): Unpurchased free games
    purchasableGames: [
      "Overcooked"
    ]
[2020-06-04 18:23:13.693 +0000] INFO  (24 on 65888ce00991): Purchasing Overcooked
[2020-06-04 18:23:13.694 +0000] TRACE (24 on 65888ce00991): Request for purchase token
    searchParams: {
      "namespace": "4561b40e52584ac2bcf34bbd5c401480",
      "offers": "e9428ad618aa45f4b3371b8c8c4f9de9"
    }
    url: "https://www.epicgames.com/store/purchase"
[2020-06-04 18:23:14.950 +0000] DEBUG (24 on 65888ce00991): purchaseToken
    purchaseToken: "e3d21b4f898546bcbc54ec4e6b767611"
[2020-06-04 18:23:14.951 +0000] TRACE (24 on 65888ce00991): Order preview request
    body: {
      "useDefault": true,
      "setDefault": false,
      "namespace": "4561b40e52584ac2bcf34bbd5c401480",
      "country": null,
      "countryName": null,
      "orderId": null,
      "orderComplete": null,
      "orderError": null,
      "orderPending": null,
      "offers": [
        "e9428ad618aa45f4b3371b8c8c4f9de9"
      ],
      "offerPrice": ""
    }
    url: "https://payment-website-pci.ol.epicgames.com/purchase/order-preview"
[2020-06-04 18:23:15.600 +0000] DEBUG (24 on 65888ce00991): Order preview response
    orderPreviewResponse: {
      "affiliation": null,
      "catalogResponse": {
        "currencySymbolPlacement": "LEFT",
        "code": "NL",
        "displayName": "NETHERLANDS",
        "ratingSystem": "PEGI",
        "embargoed": false,
        "sellerOfRecord": "EPIC_INT",
        "vatChargeRate": 23,
        "vatPercentage": 21,
        "defaultCurrency": "EUR",
        "vatIncluded": true,
        "region": "EURO",
        "sellerOfRecordName": "Epic Games International S.à r.l.",
        "paymentCurrency": "EUR"
      },
      "country": "NL",
      "countryName": "Netherlands",
      "message": null,
      "namespace": "4561b40e52584ac2bcf34bbd5c401480",
      "offers": [
        "e9428ad618aa45f4b3371b8c8c4f9de9"
      ],
      "orderComplete": false,
      "orderError": false,
      "orderId": null,
      "orderPending": false,
      "orderResponse": {
        "orderType": "PURCHASE",
        "symbol": "€",
        "country": "NL",
        "agentUserName": "anonymous",
        "toUSDExchangeRate": 1.1235278705025642,
        "totalPrice": 0,
        "accountIpCountry": "NL",
        "formattedTotalPrice": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "formattedConvenienceFee": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "paymentCurrencySymbol": "€",
        "orderStatus": "PREVIEW",
        "epicAccountId": "<REDACTED>",
        "salesChannel": "epic-store-web-purchase",
        "formattedPresentmentAmount": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "canQuickPurchase": true,
        "formattedBillingPaymentAmount": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "taxStatus": "NOT_APPLICABLE",
        "totalTax": 0,
        "isFree": true,
        "coupons": [],
        "walletPaymentAmount": 0,
        "totalDiscounted": 0,
        "useSplitPayment": false,
        "currency": "EUR",
        "formattedTotalTax": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "rewardVoucher": null,
        "fraudScore": 0,
        "lastModifiedDate": "2020-06-04T18:23:15.517+0000",
        "paymentCurrencyCode": "EUR",
        "paymentCurrencyAmount": 0,
        "accountIpAddress": "<REDACTED>",
        "vat": 0,
        "batchJobFailedRetryCount": 0,
        "lineOffers": [
          {
            "totalPrice": 0,
            "formattedTotalPrice": {
              "amount": "0.00",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "entitlementSource": "AppEpicgamesCom",
            "sellerName": "Team17 Digital Ltd",
            "refundedRevenueWithoutTax": 0,
            "revenueWithoutTax": 0,
            "title": "Overcooked",
            "formattedBasePrice": {
              "amount": "13.99",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "offerType": "BASE_GAME",
            "basePayoutCurrencyCode": "USD",
            "sellerId": "o-uvtztrtfjdn3xgrwyhbuwwb5z42mbv",
            "formattedDiscountedPrice": {
              "amount": "0.00",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "refundedBasePayoutPrice": 0,
            "remainingDiscountPrice": 0,
            "refundedConvenienceFee": 0,
            "refundedTax": 0,
            "initiatedBy": "SELLER",
            "basePrice": 1399,
            "formattedBasePayoutPrice": {
              "amount": "0.00",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "unitPrice": 0,
            "refundedDiscountPrice": 0,
            "quantity": 1,
            "vat": 0,
            "formattedVoucherPrice": {
              "amount": "0.00",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "refundedQuantity": 0,
            "shareRate": 0,
            "shareRateByDeveloper": 0,
            "voucherDiscount": 0,
            "namespaceDisplayName": "Overcooked",
            "convenienceFee": 0,
            "discountedPrice": 0,
            "formattedTaxPrice": {
              "amount": "0.00",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "namespace": "4561b40e52584ac2bcf34bbd5c401480",
            "formattedUnitPrice": {
              "amount": "0.00",
              "symbol": "€",
              "placement": "f",
              "decimals": 2,
              "digits": 2
            },
            "offerId": "e9428ad618aa45f4b3371b8c8c4f9de9",
            "taxPrice": 0,
            "basePayoutPrice": 0,
            "roleNames": []
          }
        ],
        "merchantGroup": "EGS_MKT",
        "creationDate": "2020-06-04T18:23:15.517+0000",
        "formattedWalletPaymentAmount": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "convenienceFee": 0,
        "identityId": "<REDACTED>",
        "fraud": false,
        "billingPaymentAmount": 0,
        "vatIncluded": true,
        "paymentCurrencyExchangeRate": 1,
        "formattedTotalDiscounted": {
          "amount": "0.00",
          "symbol": "€",
          "placement": "f",
          "decimals": 2,
          "digits": 2
        },
        "canSplitPayment": false
      },
      "paypalError": null,
      "showCurrencyChangeMessage": false,
      "syncToken": "<REDACTED>",
      "voucherList": null
    }
[2020-06-04 18:23:15.602 +0000] TRACE (24 on 65888ce00991): Confirm order request
    body: {
      "useDefault": true,
      "setDefault": false,
      "namespace": "4561b40e52584ac2bcf34bbd5c401480",
      "country": "NL",
      "countryName": "Netherlands",
      "orderId": null,
      "orderComplete": false,
      "orderError": false,
      "orderPending": false,
      "offers": [
        "e9428ad618aa45f4b3371b8c8c4f9de9"
      ],
      "includeAccountBalance": false,
      "totalAmount": 0,
      "affiliateId": "",
      "creatorSource": "",
      "threeDSToken": "",
      "voucherCode": null,
      "syncToken": "<REDACTED>",
      "isFreeOrder": false
    }
    url: "https://payment-website-pci.ol.epicgames.com/purchase/confirm-order"
[2020-06-04 18:23:15.990 +0000] DEBUG (24 on 65888ce00991): confirm order response
    confirmOrderResponse: {
      "captchaResult": "CAPTCHA",
      "syncToken": "<REDACTED>",
      "errorCode": "errors.com.epicgames.purchase.purchase.captcha.challenge"
    }
[2020-06-04 18:23:15.991 +0000] DEBUG (24 on 65888ce00991): Captcha required
[2020-06-04 18:23:16.291 +0000] TRACE (24 on 65888ce00991): Requesting initial captcha page
    url: "https://epic-games-api.arkoselabs.com/fc/api/nojs/?pkey=XXXXXXXXXXXXX&gametype=audio"
[2020-06-04 18:23:16.929 +0000] TRACE (24 on 65888ce00991): Requesting audio file
    url: "https://epic-games-api.arkoselabs.com/fc/get_audio/?session_token=XXXXXXXXXXXXXX&analytics_tier=40&r=eu-west-1&game=0&language=en&d=1"
[2020-06-04 18:23:19.487 +0000] DEBUG (24 on 65888ce00991): Did not transcribe enough digits. Retrying
[2020-06-04 18:23:19.687 +0000] TRACE (24 on 65888ce00991): Requesting initial captcha page
    url: "https://epic-games-api.arkoselabs.com/fc/api/nojs/?pkey=XXXXXXXXXXXXXXXX&gametype=audio"
[2020-06-04 18:23:20.235 +0000] TRACE (24 on 65888ce00991): Requesting audio file
    url: "https://epic-games-api.arkoselabs.com/fc/get_audio/?session_token=XXXXXXXXXXXXXXX&analytics_tier=40&r=eu-west-1&game=0&language=en&d=1"
[2020-06-04 18:23:22.735 +0000] DEBUG (24 on 65888ce00991): Did not transcribe enough digits. Retrying
[2020-06-04 18:23:22.877 +0000] TRACE (24 on 65888ce00991): Requesting initial captcha page
    url: "https://epic-games-api.arkoselabs.com/fc/api/nojs/?pkey=XXXXXXXXXXXXXXXXx&gametype=audio"
[2020-06-04 18:23:23.469 +0000] TRACE (24 on 65888ce00991): Requesting audio file
    url: "https://epic-games-api.arkoselabs.com/fc/get_audio/?session_token=XXXXXXXXXXXXXXXXX&analytics_tier=40&r=eu-west-1&game=0&language=en&d=1"
[2020-06-04 18:23:25.620 +0000] DEBUG (24 on 65888ce00991): Guessing captcha
    digitString: "6653395"
[2020-06-04 18:23:25.620 +0000] TRACE (24 on 65888ce00991): Captcha POST request
    form: {
      "fc-game[session_token]": "<REDACTED>",
      "fc-game[data]": "{\"ct\":\"+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\"iv\":\"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",\"s\":\"XXXXXXXXXXXXXXXXX\"}",
      "fc-game[audio_type]": 2,
      "fc-game[audio_guess]": "6653395"
    }
    url: "https://epic-games-api.arkoselabs.com/fc/api/nojs/?pkey=XXXXXXXXXXXXXXXXXXXXXXXXx&gametype=audio"
[2020-06-04 18:23:26.040 +0000] INFO  (24 on 65888ce00991): Captcha solved successfully
[2020-06-04 18:23:26.042 +0000] DEBUG (24 on 65888ce00991): Captcha session token
    verificationCode: "<REDACTED>|r=eu-west-1"
[2020-06-04 18:23:26.043 +0000] TRACE (24 on 65888ce00991): Confirm order request
    body: {
      "captchaToken": "<REDACTED>|r=eu-west-1",
      "useDefault": true,
      "setDefault": false,
      "namespace": "4561b40e52584ac2bcf34bbd5c401480",
      "country": "NL",
      "countryName": "Netherlands",
      "orderId": null,
      "orderComplete": false,
      "orderError": false,
      "orderPending": false,
      "offers": [
        "e9428ad618aa45f4b3371b8c8c4f9de9"
      ],
      "includeAccountBalance": false,
      "totalAmount": 0,
      "affiliateId": "",
      "creatorSource": "",
      "threeDSToken": "",
      "voucherCode": null,
      "syncToken": "<REDACTED>",
      "isFreeOrder": false
    }
    url: "https://payment-website-pci.ol.epicgames.com/purchase/confirm-order"
[2020-06-04 18:23:26.644 +0000] ERROR (24 on 65888ce00991):
    error: true
    message: ""
    syncToken: "c0df6c8c-0e23-4da7-8a12-02257631a4b6"
[2020-06-04 18:23:26.645 +0000] ERROR (HTTPError/24 on 65888ce00991): Response code 400 (Bad Request)
    HTTPError: Response code 400 (Bad Request)
        at PromisableRequest.<anonymous> (/usr/app/node_modules/got/dist/source/as-promise/index.js:124:28)
        at processTicksAndRejections (internal/process/task_queues.js:97:5)

Thank you!

Feature Request: Ability to Store Cookies in Remote

Hey,

I'm trying to deploy this project on Heroku as Docker Container but Heroku doesn't allow to save files on it's local. Therefore i need keep cookies in a remote storage (such as FTP, S3 etc.). If you make this I can send a PR for ability to one click deploy on Heroku. The only obstacle to doing one click deploy on Heroku is that no ability to saving cookies in remote.

PS: My first choice is FTP because there are many services (like 000webhost) give free storage as hosting.

Thanks for the your work.

Support multiple accounts

Add support for multiple accounts to be farmed on the same instance. This will require some trickery regarding cookie management to avoid logging in fresh each time. We will likely need to use a separate cookie jar/filestore for each account.

Response code 404 (Not Found)

Hi,

Awesome project but I got an error today.

[2020-08-27 18:14:53.595 +0200] INFO (36 on 2bf5e6fcefd9): Available free games user: "[email protected]" availableGames: [ "Sludge Life", "Shadowrun Collection", "Shadowrun: Dragonfall - Director’s Cut", "Shadowrun: Hong Kong", "Shadowrun Returns", "HITMAN" ] [2020-08-27 18:14:53.595 +0200] DEBUG (36 on 2bf5e6fcefd9): Mapping IDs to offer user: "[email protected]" [2020-08-27 18:14:53.729 +0200] ERROR (36 on 2bf5e6fcefd9): error: true [2020-08-27 18:14:53.729 +0200] ERROR (HTTPError/36 on 2bf5e6fcefd9): Response code 404 (Not Found) HTTPError: Response code 404 (Not Found) at PromisableRequest.<anonymous> (/usr/app/node_modules/got/dist/source/as-promise/index.js:124:28) at processTicksAndRejections (internal/process/task_queues.js:97:5)

I tried to restart the container multiple times but still the same error. Is it a problem in the software or on the epicgames store?

Best regards
c0rrre

Failed to authenticate with GraphQL API

Hello, I tried running the docker setup and it gave me the error bellow:

[2020-10-17 14:50:20.741 +0100] WARN (40 on 5d1fdf868c78): Failed to authenticate with GraphQL API, trying again
user: "myemail"

I tried remaking the docker container in case it was outdated but it still threw the same error, is there anything I've done wrong that's breaking my setup or is it an issue with something that changed on epic's side?

Response code 404 (Not Found)

Hi again :)

2 new free games are available to be claimed on Epic Games. However, I receive the following error message while doing so:

[2020-05-28 17:34:02.368 +0000] INFO  (17 on 9f3bd841f846): Successfully refreshed login
[2020-05-28 17:34:03.009 +0000] INFO  (17 on 9f3bd841f846): Available free games
    availableGames: [
      "Borderlands: The Handsome Collection"
    ]
[2020-05-28 17:34:03.309 +0000] ERROR (17 on 9f3bd841f846):
    error: true
[2020-05-28 17:34:03.310 +0000] ERROR (HTTPError/17 on 9f3bd841f846): Response code 404 (Not Found)
    HTTPError: Response code 404 (Not Found)
        at PromisableRequest.<anonymous> (/usr/app/node_modules/got/dist/source/as-promise/index.js:124:28)
        at processTicksAndRejections (internal/process/task_queues.js:97:5)

I have setup 2 factor and Google Speech to Text. What could this be causing?

Thank you!

Scripts doesnt see current week free game

Current week free game is "For the King" and seems like scripts doesnt see it. Previous week everything worked fine.
My account is linked to Russia, so it is possible that my issue is related to #5

Log:

> [email protected] start /usr/app
> node dist/index.js

[2020-04-25 17:18:13.748 +0000] INFO  (24 on d4db033feaf6): Successfully refreshed login
[2020-04-25 17:18:15.057 +0000] INFO  (24 on d4db033feaf6): Available free games
    availableGames: []
[2020-04-25 17:18:15.059 +0000] INFO  (24 on d4db033feaf6): Unpurchased free games
    purchasableGames: []

Sound captcha no more works (funcaptcha/arkoselabs)

Old sound captcha with numbers is not work anymore. Arkoselabs disabled it. But there are possible another one with crowd sound search. Different browsers ask different captcha:

  • firefox: uses old numbers captcha (not work at all);
  • chrome: uses new crowd captcha (works on manual enter);

Crowd captcha: you goes through few steps and plays sound with three parts -- one part contains crowd sound and you must enter part number. Few times.

Tags for docker builds

Hey, nice work so far! Could you tag the docker builds? When using plesk as docker manager, its really a pain in the ass to update the docker container without version tags.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.