question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
Proryanatorcommented, Apr 14, 2021

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.

3reactions
JazzPotecommented, Nov 25, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found