"{\"message\":\"Cart with person identity 242932b2-a64d-4c5e-8e31-acd995d65933 not found\",\"details\":{}}"

When trying to use this code:
import wixStoresBackend from ‘wix-stores-backend’

export function getCurrentCart() {
return wixStoresBackend.getCurrentCart();
}
from my backend file and pasting this code onto my front-end file:
getCurrentCart().then(product => {
console.log(product);
// Logs: 20
})
. catch (error => {
console.log(error);
});

Inside my cart page I am getting this error:
“{"message":"Cart with person identity 242932b2-a64d-4c5e-8e31-acd995d65933 not found","details":{}}”

In the Preview mode inside the cart module. Can you, please help me and let me know what is going on!? I have added an item the cart is not empty.

Thanks to this video i manage to get it work send my Wix support team.
https://www.screencast.com/t/I6VGhMgcX
I just had to view the page using the live version and not using the Preview version

Were you able to solve it? What was the route cause of it? Thanks in advance!

Hola,
La solución cuando invocamos el método getCurrentCart() de wix-stores-backend y da el sigiuente error:
Cart with person identity 46ef0d8c-23d5-46f5-87dd-5142a87f7a86 not found

//Backend → archivo producto.jsw
import wixStoresBackend from ‘wix-stores-backend’

export function getCurrentCart ( ) {
return wixStoresBackend . getCurrentCart ();
}

//Cart Page
import { getCurrentCart } from ‘backend/productos.jsw’

$w . onReady ( function () {
getCurrentCart ()
. then ( result => { arguments
console . log ( result , ‘current cart’ )
})
});

El problema es que en el ambiente de ‘Vista Previa’ no funciona el código su totalidad, debes publicar y ver el sitio, en ese ‘ambiente’ verás los cambios (el console.log())

Saludos!