Closed ahmedmz877 closed 3 months ago
I'm glad it worked for you.
Could you please clarify, what's the issue with this code? If you want to disable the patch after passing CF, you can disable the fix by:
process.env.REBROWSER_PATCHES_RUNTIME_FIX_MODE = "";
But you might need to open a new page in order to disable the patch and get back to default Runtime.Enable behaviour.
Actually, I think it's not necessary to disable the patch as everything should work as it was before the patch. Let me know if it doesn't.
I can't open new page because if the patch enabled the cf will succeed but the next step for me set the username and the password then sign in stop working and can't reach to the login function. when disable the patch again it will need to open new page the cf get failure and it's continue the username and password. but i can't sign in as i say the cf failure. The question here. How to continue using the patch and reach to the login function without disable it or even i close or restart the script?
Interesting case, could you share your login function code? I'm curious where does it fail wit the patch.
Your discord please or any social account. I will record a video to explain the issue
Discord - @nwebson
found the issue was in my codes😁😎
setInterval(() => clickTurnstile(page), 1000);
await page.setCacheEnabled(true);
let turnstileToken = null;
while (true) {
try {
turnstileToken = await getTurnstileToken(page);
if (turnstileToken) {
break;
}
} catch (e) {
console.error(`Error getting Turnstile token: ${e}`);
break;
}
}
// Reset the environment variable to its original value
const customerData = await loadCustomerData();
await login(page, customerData);
clearInterval(cl)
the patch works with amazing way😍 this my code now👌
setInterval(() => clickTurnstile(page), 1000);
const customerData = await loadCustomerData();
await login(page, customerData);
ه
Thanks, I appreciate the feedback!
the patch worked very good and the cf turnstile passed i want to get back again to access the await login(page, customerData);