-
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]: Local storage items set via browser.newContext()
missing for an iframe in Chromium
#32230
Comments
In your example, it looks like the iframe is on |
But this is working on And about "trying outside of Playwright", I think the issue comes from the fact that local storage items set through |
Apologies, I hadn't looked at the repro close enough. I can reproduce and we'll look at fixing it. |
See https://developers.google.com/privacy-sandbox/cookies/storage-partitioning for more details. References #32230.
Version
1.45.3, but it is present in ANY version >1.37.1
Steps to reproduce
npm install
andnpx playwright install
);tests/foo.spec.ts
with a breakpoint atawait page.pause()
;https://clausa.app.carto.com
.Expected behavior
The local storage item set during
browser.newContext()
call, for an external origin which is embedded into aniframe
, is present in Chromium.Example in Firefox
Actual behavior
The local storage item set during
browser.newContext()
call, for an external origin which is embedded into aniframe
, is missing in Chromium.As a result, we have failing tests because the user ends up being not automatically logged in to the application loaded by the
iframe
since the access token is missing from the local storage (which is how we perform the authentication, i.e. we set specific items in the local storage, viabrowser.newContext()
, and the FE identifies us).If in that repo you roll back to
1.37.1
and run again, it works as expected - the local storage item is present in Chromium.Additional context
It would be great if this can be prioritised, because it is currently BLOCKING us from updating our Playwright version and we are stuck at
1.37.1
, which is 1 year old now.The test application is basically just a
iframe
tag with asrc
pointing to a URL with another origin.Environment
It happens in any environment (also tested in linux github actions runners), but here's my laptop's:
The text was updated successfully, but these errors were encountered: