I'm using commerce v1 with spree as backend. When the user is not logged in and add something to cart using useAddItem hook it's returning error while normalizing cart Couldn't find product for variant with id even though the variant and product are related.Providing related code below
const product = jsonApi.findSingleRelationshipDocument<ProductAttr>(
spreeSuccessResponse,
variant,
'product'
)
if (product === null) {
throw new MissingLineItemVariantError(
`Couldn't find product for variant with id ${variant.id}.`
)
}
The item is added to cart its just throwing error while normalizing it and that's only for guest user.