[shop_events_listener] Error when adding product by /cart/add.js

user7856
Tourist
8 0 3

Hi, In the frontend I'm using React and when I try to add product with add.js and axios, the product is added but, I'm getting a notice.

[shop_events_listener] Error in handleXhrDone:  Inconsistent IDs between server response and request payload

I have searched a lot but don't found any solution. Here is my code:

let data = {
    items: [{
        quantity: 1,
        id: variantId,//comes from product
    }]
}
axios.post('/cart/add.js', data )
.then(res => {
    console.log(res);
}).catch(error => {
    console.log(error.response.data.message)
});
Replies 4 (4)

user7856
Tourist
8 0 3

Still finding solution for this

TomDempster
Visitor
1 0 1

Any luck with this? This is happening to me too.

user7856
Tourist
8 0 3

No, haven’t found any solution 😞

mttd
Shopify Partner
21 0 12

Any luck with finding the cause or a solution? I'm getting this too and it appears to be the cause of a bug I'm trying to fix! 

 

Thanks.