-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Bug]: Cookies not set in headless mode #31736
Comments
@develorer You should first navigate to a page that will set some cookies. I don't see that in your snippet. Given the above, I suspect that I misunderstood the issue. Could you please explain in more details what cookies do you expect to see? |
The user-data-dir's |
@develorer Thank you for more details. I think that to achieve interoperability, you should always run the browser with the |
@dgozman thanks for your thoughts. That didn't work out on my end. However I found a workaround: if I use I am not sure why, but in any case I don't mind using the new headless mode. According to chromium's documentation, it is closer to the real thing. I am aware that it is slower, but you can't have everything in life 😉 |
Closing as per above, please feel free to open a new issue if this does not cover your use case. |
Version
1.45.0
Steps to reproduce
Notice this prints an empty list. No cookies are set
Run the exact same script, but flip headless from
True
toFalse
Notice this prints a list full of cookies. Cookies are set
If I do not use
ignore_default_args=['--use-mock-keychain']
then cookies are never set, whether headless or notExpected behavior
I expect that cookies are set in headless mode.
Actual behavior
No cookies are set in headless mode, when a user_data_dir is specified.
Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: