Closed pwnz22 closed 3 weeks ago
For now you can use it as follows. The library is currently using @rebrowser. So I am waiting for the update for now. https://github.com/rebrowser/rebrowser-patches
let cookies = []
if (cookies && cookies.length > 0) {
console.log('Set Cookies');
const client = await page.target().createCDPSession();
for (let cookie of cookies) {
try { await client.send('Network.setCookie', cookie); } catch (e) {
try {
cookie.partitionKey = undefined
await client.send('Network.setCookie', cookie);
} catch (e) {
console.log(e.message);
}
}
}
}
Can you try again with the latest version?
Updated to version 1.3.9
. Working like a charm. 🚀
Hey!
I'm having an error when setting cookie with
page.setCookie(cookie)
. There is a partitionKey in cookie object and in the previous version of puppeteer there was an error but they updated and fixed it. Can you please update also puppeteer to version 23 please to fix this, thanksissue link