[BUG] should get a non-session cookie fails on Chromium ToT
See original GitHub issue
> playwright-internal@1.23.0-next ctest
> playwright test --config=tests/library/playwright.config.ts --project=chromium "tests\\library\\browsercontext-cookies.spec.ts:43" "--reporter=list"
Using executable at C:\Users\maxschmitt\Downloads\Win_x64_1006179_chrome-win\chrome-win\chrome.exe
Running 1 test using 1 worker
✘ [chromium] › library\browsercontext-cookies.spec.ts:43:1 › should get a non-session cookie (605ms)
1) [chromium] › library\browsercontext-cookies.spec.ts:43:1 › should get a non-session cookie ====
Error: expect(received).toBe(expected) // Object.is equality
Expected: "username=John Doe"
Received: ""
50 | return document.cookie;
51 | }, date);
> 52 | expect(documentCookie).toBe('username=John Doe');
| ^
53 | const cookies = await context.cookies();
54 | expect(cookies.length).toBe(1);
55 | expect(cookies[0]).toEqual({
at C:\Users\maxschmitt\development\playwright\tests\library\browsercontext-cookies.spec.ts:52:26
1 failed
[chromium] › library\browsercontext-cookies.spec.ts:43:1 › should get a non-session cookie =====
PS C:\Users\maxschmitt\development\playwright>
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Session Cookies not cleared when Chrome processes closed
Issue 128513: Session Cookies not cleared when Chrome processes closed. This issue has been migrated to Launch, see link in final comment below....
Read more >1345193 - Security: = prepended in document.cookie allows ...
It looks like the fix in https://bugs.chromium.org/p/chromium/issues/detail?id=1345193#c33 should be adjusted to cover the case where some ...
Read more >953306 - Make SameSite=Lax apply by default, and add ...
The current behavior is that cookies without a SameSite option specified are available in third-party contexts by default. This would make ...
Read more >690045 - Cookies received in response not being sent back in ...
Nothing happens. http:// for us only fails if https:// already set a secure cookie with the same name. If we logout of https...
Read more >843371 - We need an error message if insecure cookies are ...
We've encountered issues with several internal applications because of how Chrome is handling a secure cookie set for a different subdomain.
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
Thanks for surfacing this, it ended up being a simple fix but would have been a disaster if it made it past dev to beta. Credit to @sbingler for figuring it out. https://chromium-review.googlesource.com/c/chromium/src/+/3702661
It’s on main now; I’m working to merge it into the M104 release as well and hope to have it in the weekly dev build.
I was able to reproduce on tip-of-trunk with the same inconsistency on windows only. I’ll try to come up with a fix today and should be able to merge it into dev by end of week.