Cannot add product to cart after variant creation

Hi,
We have dynamic options for product along with dynamic prices. We are creating variant by productVariantsBulkCreate. It’s creating variant with inventory but when the item is adding to cart “cart/add.js” it’s not adding to cart and giving error.

```
{“status”:422,
“message”:“The product ‘Mobile Case With Name - variant-1771845932’ is already sold out.”,“description”:“The product ‘Mobile Case With Name - variant-1771845932’ is already sold out.”}
```

If I wait a few seconds and click “cart/add.js” button this works again. Why is the waiting time? How can it be prevented?

1 Like

Hey @illusionist3886 , this post here looks like a match to the issue you are seeing here: