Playwright: Chrome headless (persistent) doesn't save/load cookies on windows

Created on 28 Jan 2020  路  6Comments  路  Source: microsoft/playwright

On Windows, headless chrome can't read cookies from a userdatadir. It is specific to cookies, localStorage works. The Default\Cookies file exists, and is a valid SQLite table, but it has no rows. Launching with headful, I can see the cookie in the SQLite file, but launching headless chrome afterwards clears the file again, and doesn't read the cookie.

Possibly related to, Puppeteer/Puppeteer#4111, but where that was flaky, this is consistently broken.

680

P3-collecting-feedback browser-chromium upstream

All 6 comments

Confirmed, my problem is the same. Take hours to figure this because it works fine on my Ubuntu machine.

i though i was going crazy, i am on win10 same problem headless true cookies don't get restored with it false it works fine, is there a workaround?

We need a solution for this issue please

Hello guys. Still face it on Version 86.0.4240.75 (Official Build) (64-bit) for Windows 10.

Confirmed, my problem is the same. Take hours to figure this because it works fine on my Ubuntu machine.

@meotimdihia maybe you just got lucky on Ubuntu with an older version of Chromium installed? I cannot get cookies from my 鈥攗ser-data-dir on either Windows or Ubuntu to work when in headless mode.

Same issue on headless Ubuntu Bionic, but with Webkit.
The browser context has no cookie, won't set them after receiving a Set-Cookie header response, and I can't set them manually neither.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

saltyshiomix picture saltyshiomix  路  3Comments

andyricchuiti picture andyricchuiti  路  4Comments

juliomatcom picture juliomatcom  路  3Comments

grajesh690 picture grajesh690  路  3Comments

JoelEinbinder picture JoelEinbinder  路  4Comments