Reaction: Can't add to cart as an anonymous user

Created on 24 Aug 2018  路  8Comments  路  Source: reactioncommerce/reaction

Issue Description

When attempting to add to cart as an anonymous user, it appears to add to cart but when you go to checkout it says "looks like your cart is empty"

cant_add_to_cart

Steps to Reproduce

  1. Fully reset Reaction
  2. Don't log in
  3. Visit the site in an incognito window
  4. Add an item to cart
  5. Click on "Checkout"
  6. Observe that your cart is still empty

Versions

Reaction: release-1.15.0

bug

All 8 comments

It looks like every time I add something to cart, a new cart is being created, but the app cannot find it.

If I log in and out, that seems to make it work.

Removing the Release Blocker label as we've determined that this is not a regression.

Added needs-to-be-reproduced mostly because we need to get a more readily reproducible set of steps. This is reproducible for certain people, and we've seen at least 3 reports. It's not readily reproducible for everyone with the steps provided.

Spent a while trying to understand how to reproduce this. The only way I cannot reproduce this error is by opening in a new incognito tab.

Steps:

  • Clone 1.4.1
  • Login as admin & create a new product
  • Hit add to cart as admin & click on your cart to see that it has worked
  • Log out whilst still on the product page and click add to cart -> get the empty cart warning
  • Open incognito window -> see that adding to cart works

Potentially related -> when I hit "go back" to go the previous page in the browser the "Sign In" button disappears until the page is refreshed.

Further findings:

  • I found that some of the carts within store did not have an _id ; just atoken and shopId
  • By changing my storageKey in anonymousCarts.js to a new value the issue is no longer present

Believed to be fixed in latest 2.0 RCs

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aldeed picture aldeed  路  4Comments

Eduard-Hasa picture Eduard-Hasa  路  4Comments

ticean picture ticean  路  4Comments

ajporlante picture ajporlante  路  4Comments

spencern picture spencern  路  4Comments