-
Notifications
You must be signed in to change notification settings - Fork 115
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
Turnstile completion callback, and waitforselector error in 1.3.0 version #136
Comments
I also had problems with waitForSelector, I will find a solution for this. |
Hi, this issue has been resolved with the upgrade of rebrowser to puppeteer-core. If the problem persists, please report it here. |
@zfcsoftware It didn't work for many sites. For the example: import { connect } from "puppeteer-real-browser"
async function main() {
const path = "/tmp/puppeteer-real-browser/"
const url = "https://ezmanga.org/series/92ae7351c3e"
console.log(" --- " + url)
const selector = "#chapters a.group"
const { browser, page } = await connect({
headless: false,
customConfig: {
userDataDir: path
},
args: [],
turnstile: true,
connectOption: {},
})
await page.goto(url)
await page.waitForSelector(selector)
await browser.close()
}
main()
.catch(console.error)
.finally(async () => {
console.log("Done")
})
puppeteer-real-browser: ^1.3.16 |
@zfcsoftware I tagged you in case, you forgot to recheck this issue. Please re-open this problem. |
I didn't have any problems, but I will add an additional function called page.waitForSelectorPatch for those who have problems. |
@zfcsoftware did you test the problem on Windows only? I have this problem on both macOS and Ubuntu. |
@zfcsoftware Please add function waitForSelectorPatch. Thank you very much. |
For me, the issue occurred with version 1.3.18. However, 1.3.17 works fine. Maybe try downgrading. I didn't have problems with page.waitForSelector, but with page.evaluate. Where page.evaluate was executed on the "wrong page". I noticed, because the window object, when accessed via the dev tools in the browser, was different from the window object in puppeteer. Sounds like a bug on my side, I know, but the same exact code does not have this issue with the older version. |
I tried with 1.3.17 and 1.3.22 Funny enough, when I wrapped each |
that was expected behaviour when you wrap each of them with try catch. and for the issue, maybe you can try to do checking inside page.evaluate with JS for now |
How do I know the callback of the completed turnstile action? I use page.waitforselector to check. Unfortunately, after the 1.3.0 update, waitforselector cannot query the element of the page where the turnstile has completed the redirection, and always times out. Here is a demo:
await page.goto('<turnstile_url>'); await page.waitForSelector('<app_id>', { timeout: 30000 })
The text was updated successfully, but these errors were encountered: