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

Need an update of puppeteer-core to version ^23 #134

Closed
pwnz22 opened this issue Aug 23, 2024 · 3 comments
Closed

Need an update of puppeteer-core to version ^23 #134

pwnz22 opened this issue Aug 23, 2024 · 3 comments

Comments

@pwnz22
Copy link

pwnz22 commented Aug 23, 2024

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, thanks

issue link

@zfcsoftware zfcsoftware added Work in Progress This problem is being investigated and resolved. and removed Work in Progress This problem is being investigated and resolved. labels Aug 24, 2024
@zfcsoftware
Copy link
Owner

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);
                            }
                        }
                    }
                }

@zfcsoftware
Copy link
Owner

Can you try again with the latest version?

@pwnz22
Copy link
Author

pwnz22 commented Sep 7, 2024

Updated to version 1.3.9. Working like a charm. 🚀

@pwnz22 pwnz22 closed this as completed Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants