Chrome headless (persistent) doesn't save/load cookies on windows
See original GitHub issueOn 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.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:15 (1 by maintainers)
Top Results From Across the Web
Sync pauses and cookies seemingly aren't saved after every ...
I'm dealing with a problem where each time I close chrome, it pauses sync and doesn't seem to use stored cookies (meaning it...
Read more >How to save and load cookies using Python + Selenium ...
You can save the current cookies as a Python object using pickle. ... You need to: from selenium.webdriver.chrome.options import Options ...
Read more >The problem of missing persistent cookies - Microsoft Learn
Describes an issue that occurs when you use hyperlinks to open Office documents in Internet Explorer beginning with version 7.
Read more >Google Chrome does not keep cookies. - Ask Ubuntu
The solution is to remove chrome, including it's cache and config directories. To do this type the following from the terminal.
Read more >Headless: Use persistent cookie storage [chromium/src : master]
Headless : Use persistent cookie storage [chromium/src : master] ... Context: there's a pptr issue about cookies not being saved ... Thanks for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m also experiencing this and it’s a bit frustrating 😄
On Linux/MacOS, I do see that it stores session storage is created with headless mode. However on Windows 10, there’s like 1 file in the ‘user-dir’ folder I specify.
Not sure if anyone has a workaround, if I find one I’ll try to post it here.
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.