Closed tacohitbox closed 2 years ago
Mhm, we just updated the iframe.contentWindow evasion in the latest stealth release to actually make it break less things :-/ Will test if this is a regression tomorrow
Can't confirm 🤔
Your first code snippet has a typo, should be pup.use(stl())
const pup = require("puppeteer-extra");
const stl = require("puppeteer-extra-plugin-stealth");
const cap = require("puppeteer-extra-plugin-recaptcha");
(async function() {
pup.use(stl());
pup.use(cap({
provider: {
id: "2captcha",
token: process.env.TWOCAPTCHA_KEY
}
}));
let b = await pup.launch({headless: false});
let p = await b.newPage();
await p.goto("https://google.com/recaptcha/api2/demo");
await p.solveRecaptchas();
await p.click("#recaptcha-demo-submit");
})();
Binaries:
Node: 16.15.0 - ~/.nvm-intel/versions/node/v16.15.0/bin/node
Yarn: 1.22.19 - ~/.nvm-intel/versions/node/v16.15.0/bin/yarn
npm: 8.5.5 - ~/.nvm-intel/versions/node/v16.15.0/bin/npm
npmPackages:
puppeteer: ^14.4.1 => 14.4.1
puppeteer-extra: ^3.3.0 => 3.3.0
puppeteer-extra-plugin-adblocker: ^2.13.0 => 2.13.0
puppeteer-extra-plugin-recaptcha: ^3.6.0 => 3.6.0
puppeteer-extra-plugin-stealth: ^2.10.0 => 2.10.0
Can confirm with hcaptcha:
const puppeteer = require("puppeteer-extra")
const stealth = require("puppeteer-extra-plugin-stealth")()
stealth.enabledEvasions.delete("iframe.contentWindow")
puppeteer.use(stealth)
;(async function () {
const browser = await puppeteer.launch({ headless: false })
const page = await browser.newPage()
await page.goto("https://democaptcha.com/demo-form-eng/hcaptcha.html")
// then click on checkbox and see challenge popup
})()
This is connected to #565 - I'll probably roll that back until we had time for a better fix
We've reverted the captcha iframe breaking changes in #657
Successfully published:
- puppeteer-extra-plugin-stealth@2.10.1
Closing this for now :)
Thanks!
Describe the bug
I was using a combination of
puppeteer-extra-plugin-stealth
andpuppeteer-extra-plugin-recaptcha
on sites with CAPTCHAs on them until I started to notice an issue where the CAPTCHA was reloading before the CAPTCHA was solved, until an error was given (The CAPTCHA would either say "Cannot reconnect to ReCAPTCHA" or the app would crash.)This is an example of what I'm talking about.
However, I found a workaround for other people who have a similar issue, simply disable the
"iframe.contentWindow"
evasion before launching your browser.An example of this code would be this:
I still reported this issue, as the evasion is probably not functioning as intended.
Versions