Skip to content
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

Managed checkout desyncing / not updating #1964

Open
willPrattUPL opened this issue Feb 6, 2025 · 2 comments
Open

Managed checkout desyncing / not updating #1964

willPrattUPL opened this issue Feb 6, 2025 · 2 comments

Comments

@willPrattUPL
Copy link
Contributor

willPrattUPL commented Feb 6, 2025

TLDR: I believe this is a cookie issue, but since this happens on managed checkout pages I can only test one half of this

google_screen_recording_2025-02-06T14-55_03.521Z.webm

We can get this extremely reliably on our current setup on our own live site just by signing out on the managed checkout space.

JWT from session-sync from video

eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiJ9.eyJpc3MiOiJCQyIsImlhdCI6MTczODg1MzM4NCwiZWF0IjoxNzM4ODUzNDE0LCJqdGkiOiIwMTQ1YTcwMC1lOWM0LTRjZTAtODk2Yi1iMWI5MDQ2NWRjNTYiLCJvcGVyYXRpb24iOiJzZXNzaW9uX3N5bmMiLCJzaWQiOjEwMDMyODAyNzMsInNlc3Npb25fcGF5bG9hZCI6eyJjYXJ0X2lkIjoiMzZkYWY3YmYtYWZhYS00MDA1LTg0ZjEtNzgxYjQzZjM1N2U5IiwiY3VzdG9tZXJfaWQiOm51bGwsInZpc2l0b3JfaWQiOm51bGwsInZpc2l0X2lkIjpudWxsfSwicmVxdWVzdF9pcCI6bnVsbCwicmVkaXJlY3RfdG8iOiJodHRwczovL2NoZWNrb3V0LmNhdGFseXN0LWRlbW8uc2l0ZS9jaGVja291dCJ9.f1g1NdUWP_qy7GYcWGkGR8QxB3CqBje7m2TDmO9cJcHRDDndM1j2OoN-HgGUMgA1Gi73v8TXfh_ZLjSlD8Ya6w

Steps I took to get to video state

day 1

  1. sign in on headless
  2. build cart
  3. go to checkout
  4. sign out on managed checkout side
  5. build cart
  6. attempt to get broken state on checkout

at this point, things were still working fine. however...

day 2

  1. have existing cart items
  2. go to checkout

Additional context

There appears to be multiple ways to get this "desync", but the most reliable way is to sign out on the managed checkout space.

We have also gotten it unreliably by doing very wonky user flows (sign in on headless, sign out, sign in, build cart, delete cart, sign out, sign in, build cart, close tab) suggesting that there is a race condition or something not being set correctly at some stage unrelated to the managed checkout

"Fix"

The "fix" is to clear 'SHOP_SESSION_TOKEN' in particular, which is a httponly cookie

@willPrattUPL
Copy link
Contributor Author

This very likely is ONLY an issue on stencil, but there's a chance that there needs to be a fix on Catalyst side, so I'm posting this here

@migueloller
Copy link
Collaborator

Thanks for reporting the issue @willPrattUPL

Just wanted to let you know that we're looking into it. We'll keep you posted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants