question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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:

> epicgames-freegames-node@1.0.0 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!

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
claabscommented, Jun 5, 2020

I’m not really sure what’s causing this. I was able to recreate the error, and I was also able to redeem it after a second try.

Here’s what I can confirm it likely isn’t:

  • Regionalized payment URL (uses the same payment URL for an NL account, saw the error on US accounts)
  • New captcha public key
  • New captcha policy to disable v1 audio (like account creation)
  • Cookie conflict between account runs (Arkose only has a timestamp cookie, I saw it on the first run)
  • New confirm-order params (I updated them, still saw the issue)

I did make some improvements, though, so I’ll push what I have.

I also saw this funny error message after an hour of testing on new accounts lol:

confirm order response
    confirmOrderResponse: {
      "captchaResult": "DECLINE",
      "syncToken": "502c9bcf-4db4-416c-a3d8-8d0d8f452eff",
      "message": "Your account is unable to download any more free games at this time, please wait 24 hours before trying to redeem a free game again.",
      "errorCode": "errors.com.epicgames.purchase.purchase.captcha.decline"
    }
0reactions
Wunderharkecommented, Sep 17, 2021

edit: opened #143 instead

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix a 400 Bad Request Error (Causes and Fixes) - Kinsta
The 400 (Bad Request) status code indicates that the server cannot or will not process the request due to something that is perceived...
Read more >
How to Fix the 400 Bad Request Error - Lifewire
The 400 Bad Request error means that the request you sent to the website server to view the page was somehow incorrect.
Read more >
400 Bad Request Error: What It Is and How to Fix It
An in-depth explanation of what a 400 Bad Request Error response code is, including tips to help you resolve this error in your...
Read more >
HTTP Error 400 Bad Request: What It Is and How to Fix It
The HTTP error 400 Bad Request is a client-side error that can happen when you visit a website. Learn more about the common...
Read more >
How to Fix a 400 Bad Request Error: 8 Easy Methods
The 400 bad request error is an HTTP status code that describes an error caused by an invalid request. Thus, the server can't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found