Skip to content

[BUG]Getting SameSite Cookie Issue while navigating back to Parent page from new Window #9223

@jithinjosejacob

Description

@jithinjosejacob

Context:

  • Playwright Version: 1.15
  • Operating System: Mac
  • Node.js version: 12.19.1
  • Browser: Chrome
  • Extra: [any specific details about your environment]

Code Snippet

Help us help you! Put down a short code snippet that illustrates your bug and
that we can run and debug locally. For example:
NA

const {chromium, webkit, firefox} = require('playwright');

(async () => {
  const browser = await chromium.launch();
  // ...
})();

Describe the bug

  1. Navigate to merchant site which needs to be tested.

  2. Add any product to cart page, and navigate to Cart

  3. Make a payment with Afterpay express checkout in a new window,and make a successful payment.

  4. Once Payment is successful,user is redirected back to merchant page, but purchase is not successful .

Note:Same action could be done manually successfully

Console error

Indicate whether to send a cookie in a cross-site request by specifying its SameSite attribute
Because a cookie’s SameSite attribute was not set or is invalid, it defaults to SameSite=Lax, which prevents the cookie from being sent in a cross-site request. This behavior protects user data from accidentally leaking to third parties and cross-site request forgery.
Resolve this issue by updating the attributes of the cookie:
Specify SameSite=None and Secure if the cookie should be sent in cross-site requests. This enables third-party use.
Specify SameSite=Strict or SameSite=Lax if the cookie should not be sent in cross-site requests.

Sample Site : https://www.justjeans.com.au/shop/en/justjeans (Once we add a product to Cart , there will be a Checkout with Afterpay button(Thats express checkout). A similar site is bieng tested in lower environments

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions