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

headless mode fails at hcaptcha challenge #2

Closed
vogler opened this issue Jan 6, 2022 · 5 comments
Closed

headless mode fails at hcaptcha challenge #2

vogler opened this issue Jan 6, 2022 · 5 comments
Assignees
Labels
feature New feature or request help wanted Extra attention is needed store: epic-games

Comments

@vogler
Copy link
Owner

vogler commented Jan 6, 2022

Currently the script runs not in headless mode, i.e., the automated browser is visible.
Comment out this line to not show the browser:
https://github.com/vogler/epicgames-claimer/blob/fd3f947223733b187c5e1903be1209f8fd3b618c/main.stealth.js#L28

Running in headless mode resulted in the 20s timeout and the game not being claimed.
https://github.com/vogler/epicgames-claimer/blob/fd3f947223733b187c5e1903be1209f8fd3b618c/main.stealth.js#L124
Running in headful mode afterwards successfully claimed the game.

Assumption is that the captcha is shown in headless mode, despite the stealth plugin.

@vogler vogler self-assigned this Jan 6, 2022
@vogler vogler added store: epic-games feature New feature or request help wanted Extra attention is needed labels Jan 20, 2022
@vogler
Copy link
Owner Author

vogler commented Feb 2, 2022

Proxies to bypass Cloudflare protection also have problems with hcaptcha:

There are several browser extensions but extensions can not be used in headless mode: https://playwright.dev/docs/chrome-extensions

Free captcha solvers:

General info, detecting headless mode, anti-scraping:

@vogler vogler changed the title Timeout in headless mode headless mode fails at hcaptcha challenge Feb 2, 2022
@vogler
Copy link
Owner Author

vogler commented Feb 2, 2022

Tried https://www.hcaptcha.com/accessibility, got a link via E-Mail:

This will let you set a cookie that enables you to skip requests for hCaptcha challenges.

Save this email or bookmark the link above, then open it and click the link again in order to refresh the cookie if you start to see challenges again.

Please note that the number of requests per day is limited, and your IP and account will be banned in the event of abuse.

Visited link, but after clicking 'Set Cookie' button, it just says 'Could not issue a cookie'.

@vogler
Copy link
Owner Author

vogler commented Feb 3, 2022

Assumption is that the captcha is shown in headless mode, despite the stealth plugin.

Confirmed by saving screenshots on failure: 3766754.

@vogler
Copy link
Owner Author

vogler commented Apr 9, 2022

Fixed by #11 (run non-headless in docker).

@vogler vogler closed this as completed Apr 9, 2022
@vogler
Copy link
Owner Author

vogler commented Sep 29, 2022

Tried https://www.hcaptcha.com/accessibility, got a link via E-Mail:

Visited link, but after clicking 'Set Cookie' button, it just says 'Could not issue a cookie'.

Maybe that was because I didn't read the Browser Instructions for Cross-Site Cookies:

Go to Privacy and Security, then Cookies and other site data.
Make sure "Block third-party cookies" is not enabled.

Edit: no, the setting already was 'Block third-party cookies in Incognito'.
However, now it seems to work. Requested a new link and got 'Cookie set'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request help wanted Extra attention is needed store: epic-games
Projects
None yet
Development

No branches or pull requests

1 participant