Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
We have noticed that for each purchase made through our store, Shopify appends a "checkout_session_token__cn__*" cookie. The accumulation of these cookies eventually leads to a "Cookie Too Large" error. We can clear the cookies, but it just starts again until the error happens again.
It looks like the "checkout_session_token__cn__" cookies contain the history of purchases by that user. Even purchases that have been fully checked out.
We are using the Storefront API with the checkout url provided by the API.
I am hoping someone can point in the right direction on how to resolve this.
We are having the same issue.
Hey @jneusteter
Thanks for flagging this - running it by the Checkout team and will report back.
Scott | Developer Advocate @ Shopify
I'm also seeing this on live shops now.
Hi @SBD_ ,
I've had tickets open with Shopify Plus support about this since Jan 10th, but I haven't made much progress there and it's still an issue.
The duplicate cookie issue can be easily replicated by placing a few orders in a row.
I've also noticed the 400 "Cookie Too Large" error is easier to trigger when the products in the cart have longer titles, because the "checkout_session_token__cn__" cookies contain the product names.
Thanks for your help!
Possible fix:
monorail-edge.shopifysvc.com might be blocked by your network.
After unblocking this endpoint it seems the cookies behave differently, so far this is working after about a week of no issues. For us this would happen at least a few times a week.
There is more here about that url: https://shopify.dev/docs/custom-storefronts/hydrogen/analytics
FYI, this ended up not solving the issue. We are still getting the error.
Thanks. Chasing up the checkout folks.
Scott | Developer Advocate @ Shopify
Same issue here. Any updates to fix this? Shopify should delete the old cookies.
Hey everyone,
Just heard back - there's a team working on resolving this. Thanks for all the reports.
Scott | Developer Advocate @ Shopify
Any news about this issue?