Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API purchase experienced an error #209

Closed
Snazzie opened this issue Jan 6, 2022 · 9 comments
Closed

API purchase experienced an error #209

Snazzie opened this issue Jan 6, 2022 · 9 comments
Labels
bug Something isn't working

Comments

@Snazzie
Copy link

Snazzie commented Jan 6, 2022

Describe the bug

Failing to purchase.
Screenshots or Logs

[2022-01-06 06:22:21.905 +0000] INFO : Purchasing Shadow of the Tomb Raider: Definitive Edition
[2022-01-06 06:22:24.322 +0000] WARN (HTTPError): Response code 400 (Bad Request)
HTTPError: Response code 400 (Bad Request)
at Request.<anonymous> (/usr/app/node_modules/got/dist/source/as-promise/index.js:117:42)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
[2022-01-06 06:22:24.323 +0000] WARN : API purchase experienced an error, trying puppeteer purchase

Additional context

Running latest in docker.

@Snazzie Snazzie added the bug Something isn't working label Jan 6, 2022
@claabs
Copy link
Owner

claabs commented Jan 6, 2022

This is just #164.

I'm kind of surprised to see it because I put in a dozen fixes for this recently. Can you set logLevel: debug and try again?

@Snazzie
Copy link
Author

Snazzie commented Jan 6, 2022

Will do when the next round of free games come. I've redeemed them manually after not getting it to work.

@Snazzie
Copy link
Author

Snazzie commented Jan 18, 2022

> epicgames-freegames-node@4.0.0 entrypoint-config /usr/app
> node dist/src/entrypoint-config.js

Setting timezone: Europe/London
Run on startup: true
Setting timezone: Europe/London
Run on startup: true
[2022-01-18 12:33:28.583 +0000] INFO : Started epicgames-freegames-node
COMMIT_SHA: "5989a60c848fa577223e9d7fe310df7cf9eeb567"
BRANCH: "master"
DISTRO: "alpine"
[2022-01-18 12:33:28.657 +0000] DEBUG: Performing version check

PROJECT_NAME: "epicgames-freegames-node"
BRANCH: "master"
COMMIT_SHA: "5989a60c848fa577223e9d7fe310df7cf9eeb567"
[2022-01-18 12:33:28.959 +0000] INFO : Checking free games for REDACTED@hotmail.com
[2022-01-18 12:33:28.964 +0000] DEBUG: Refreshing login session
user: "REDACTED@hotmail.com"
[2022-01-18 12:33:34.943 +0000] INFO : Successfully refreshed login
user: "REDACTED@hotmail.com"
[2022-01-18 12:33:34.943 +0000] DEBUG: Getting global free games
user: "REDACTED@hotmail.com"
[2022-01-18 12:33:35.625 +0000] DEBUG: Retrieved catalog data for 17 games
user: "REDACTED@hotmail.com"
[2022-01-18 12:33:35.626 +0000] DEBUG: Found 1 unique free games in catalog
user: "REDACTED@hotmail.com"
[2022-01-18 12:33:35.626 +0000] INFO : Available free games
user: "REDACTED@hotmail.com"
availableGames: [
"Galactic Civilizations III"
]
[2022-01-18 12:33:35.626 +0000] DEBUG: Checking ownership on available games
user: "REDACTED@hotmail.com"
[2022-01-18 12:33:35.626 +0000] DEBUG: Getting product ownership info
user: "REDACTED@hotmail.com"
offerId: "5d63b78c08184c10933a47874117db8c"
namespace: "3c52fbac843d4375803187739db84801"
[2022-01-18 12:33:35.625 +0000] DEBUG: Retrieved catalog data for 17 games
user: "REDACTED@hotmail.com"
[2022-01-18 12:33:35.626 +0000] DEBUG: Found 1 unique free games in catalog
user: "REDACTED@hotmail.com"
[2022-01-18 12:33:35.626 +0000] INFO : Available free games
user: "REDACTED@hotmail.com"
availableGames: [
"Galactic Civilizations III"
]
[2022-01-18 12:33:35.626 +0000] DEBUG: Checking ownership on available games
user: "REDACTED@hotmail.com"
[2022-01-18 12:33:35.626 +0000] DEBUG: Getting product ownership info
user: "REDACTED@hotmail.com"
offerId: "5d63b78c08184c10933a47874117db8c"
namespace: "3c52fbac843d4375803187739db84801"
[2022-01-18 12:33:36.092 +0000] INFO : Unpurchased free games
user: "REDACTED@hotmail.com"
purchasableGames: [
"Galactic Civilizations III"
]
[2022-01-18 12:33:36.092 +0000] INFO : Purchasing Galactic Civilizations III
[2022-01-18 12:33:37.416 +0000] DEBUG: purchaseToken
user: "REDACTED@hotmail.com"
purchaseToken: "REDACTED PURCHASE TOKEN"
[2022-01-18 12:33:37.416 +0000] DEBUG: purchaseToken
user: "REDACTED@hotmail.com"
purchaseToken: "REDACTED PURCHASE TOKEN"
[2022-01-18 12:33:38.659 +0000] DEBUG: Error encountered during purchase

user: "REDACTED@hotmail.com"
errorBody: {
"error": true,

"message": "We could not confirm your purchase at this time. Please try again later.",
"order": null,
"syncToken": "87fc861d-b911-4997-b5a3-6ae439db03db"
}
code: 400
[2022-01-18 12:33:38.659 +0000] WARN (HTTPError): Response code 400 (Bad Request)
HTTPError: Response code 400 (Bad Request)
at Request.<anonymous> (/usr/app/node_modules/got/dist/source/as-promise/index.js:117:42)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
[2022-01-18 12:33:38.659 +0000] WARN : API purchase experienced an error, trying puppeteer purchase

[2022-01-18 12:33:38.662 +0000] DEBUG: Setting hCaptcha accessibility cookies
[2022-01-18 12:33:53.736 +0000] DEBUG: Killing new browser processes spawned
chromiumProcesses: []
[2022-01-18 12:33:53.736 +0000] WARN : browser launch did not work after 15000ms. Trying again.
attempts: 0
MAX_ATTEMPTS: 5
[2022-01-18 12:34:00.677 +0000] DEBUG: Error from hCaptcha get_cookie request, continuing without hCaptcha accessibility cookies

status: 401
errorBody: {
"status": "error"

}
[2022-01-18 12:34:00.834 +0000] DEBUG: Purchasing with puppeteer (short)
user: "REDACTED@hotmail.com"
[2022-01-18 12:34:16.725 +0000] INFO : Loading purchase page
user: "REDACTED@hotmail.com"
purchaseUrl: "https://www.epicgames.com/store/purchase?highlightColor=0078f2&offers=1-3c52fbac843d4375803187739db84801-5d63b78c08184c10933a47874117db8c&orderId&purchaseToken&showNavigation=true"
[2022-01-18 12:34:28.175 +0000] DEBUG: Clicking placeOrderButton
user: "REDACTED@hotmail.com"
[2022-01-18 12:34:28.330 +0000] DEBUG: Clicking euRefundAgreeButton
user: "REDACTED@hotmail.com"
[2022-01-18 12:34:28.487 +0000] DEBUG: Waiting for receipt
user: "REDACTED@hotmail.com"
[2022-01-18 12:34:28.175 +0000] DEBUG: Clicking placeOrderButton
user: "REDACTED@hotmail.com"
[2022-01-18 12:34:28.330 +0000] DEBUG: Clicking euRefundAgreeButton
user: "REDACTED@hotmail.com"
[2022-01-18 12:34:28.487 +0000] DEBUG: Waiting for receipt
user: "REDACTED@hotmail.com"
[2022-01-18 12:34:30.065 +0000] DEBUG: Captcha detected
user: "REDACTED@hotmail.com"
[2022-01-18 12:34:30.530 +0000] INFO : Go to this URL and do something
user: "REDACTED@hotmail.com"
url: "https://tasty-bobcat-23.loca.lt/?targetId=5A7C865B9361DAB732BDA17B0949C149"
[2022-01-18 12:34:30.530 +0000] WARN : No notifiers configured globally, or for the account. This log is all you'll get
url: "https://tasty-bobcat-23.loca.lt/?targetId=5A7C865B9361DAB732BDA17B0949C149"
accountEmail: "REDACTED@hotmail.com"
reason: "PURCHASE"
[2022-01-18 12:34:30.065 +0000] DEBUG: Captcha detected
user: "REDACTED@hotmail.com"
[2022-01-18 12:34:30.530 +0000] INFO : Go to this URL and do something
user: "REDACTED@hotmail.com"
url: "https://tasty-bobcat-23.loca.lt/?targetId=5A7C865B9361DAB732BDA17B0949C149"
[2022-01-18 12:34:30.530 +0000] WARN : No notifiers configured globally, or for the account. This log is all you'll get
url: "https://tasty-bobcat-23.loca.lt/?targetId=5A7C865B9361DAB732BDA17B0949C149"
accountEmail: "REDACTED@hotmail.com"
reason: "PURCHASE"

@claabs
Copy link
Owner

claabs commented Jan 18, 2022

From the logs, it just looks like you don't have any notifiers configured. Some example configs are listed here: https://github.com/claabs/epicgames-freegames-node#configjson-or-configjson5

@Snazzie
Copy link
Author

Snazzie commented Jan 18, 2022

Is notifiers required? i left it because i dont need it. im hoping it will just claim it for me and thats it :P

@Snazzie
Copy link
Author

Snazzie commented Jan 18, 2022

i think this is the culprit of why its failing?

[2022-01-18 12:34:00.677 +0000] DEBUG: Error from hCaptcha get_cookie request, continuing without hCaptcha accessibility cookies

status: 401
errorBody: {
"status": "error"

}

@Snazzie
Copy link
Author

Snazzie commented Jan 18, 2022

then later it fails because it cant auto complete the captcha

@claabs
Copy link
Owner

claabs commented Jan 18, 2022

Auto captcha complete doesn't work currently (see #178). You'll need a notifier to be configured in order to solve the captcha yourself. These days, every free game purchase requires solving a captcha.

@claabs
Copy link
Owner

claabs commented Feb 15, 2024

No longer relevant in latest version

@claabs claabs closed this as not planned Won't fix, can't repro, duplicate, stale Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants