spark-solutions / spree2vuestorefront

Build complete E-Commerce PWA with this Spree Commerce (https://github.com/spree/spree) to Vue Storefront (https://github.com/DivanteLtd/vue-storefront) bridge
50 stars 9 forks source link

Cart API Hi. 404 error retrieving cart from Spree. #77

Open pmaojo opened 5 years ago

pmaojo commented 5 years ago

When I started a local vue storefront with spree2vuestorefront I get 404 error retrieving cart from Spree.

"message": [ "Could not get Spree cart for cartId = hnswNU9vALP1qc2D7yDESQ1560377905502.", { "name": "BasicSpreeError", "serverResponse": { "status": 404, "statusText": "Not Found" }, "summary": "The resource you were looking for could not be found.", "message": "Spree returned a HTTP 404 error code", "stack": "BasicSpreeError: Spree returned a HTTP 404 error code\n at t.value (/app/node_modules/@spree/storefront-api-v2-sdk/dist/server/webpack:/src/Http.ts:87:14)\n at t.processSpreeError (/app/node_modules/@spree/storefront-api-v2-sdk/dist/server/webpack:/src/Http.ts:70:19)\n at t.processError (/app/node_modules/@spree/storefront-api-v2-sdk/dist/server/webpack:/src/Http.ts:47:31)\n at tryCatch (/app/node_modules/regenerator-runtime/runtime.js:62:40)\n at Generator.invoke [as _invoke] (/app/node_modules/regenerator-runtime/runtime.js:288:22)\n at Generator.prototype.(anonymous function) [as throw] (/app/node_modules/regenerator-runtime/runtime.js:114:21)\n at i (/app/node_modules/@spree/storefront-api-v2-sdk/dist/server/webpack:/src/interfaces/errors/ErrorClass.ts:1:23)\n at process._tickCallback (internal/process/next_tick.js:68:7)" }

and also this on the vue storefront log: (maybe not related)

Entity cache is enabled for productList null [search] Can not connect the vue-storefront-api / ElasticSearch instance! { FetchError: invalid json response body at http://localhost:8080/api/catalog/vue_storefront_catalog/product/_search?_source_exclude=%2A.msrp_display_actual_price_type%2Crequired_options%2Cupdated_at%2Ccreated_at%2Cattribute_set_id%2Coptions_container%2Cmsrp_display_actual_price_type%2Chas_options%2Cstock.manage_stock%2Cstock.use_config_min_qty%2Cstock.use_config_notify_stock_qty%2Cstock.stock_id%2Cstock.use_config_backorders%2Cstock.use_config_enable_qty_inc%2Cstock.enable_qty_increments%2Cstock.use_config_manage_stock%2Cstock.use_config_min_sale_qty%2Cstock.notify_stock_qty%2Cstock.use_config_max_sale_qty%2Cstock.use_config_max_sale_qty%2Cstock.qty_increments%2Csmall_image%2Csgn%2C%2A.sgn&from=0&request=%7B%22query%22%3A%7B%22bool%22%3A%7B%22filter%22%3A%7B%22bool%22%3A%7B%22must%22%3A%5B%7B%22terms%22%3A%7B%22category.name.keyword%22%3A%5B%22Tees%22%5D%7D%7D%2C%7B%22terms%22%3A%7B%22visibility%22%3A%5B2%2C3%2C4%5D%7D%7D%2C%7B%22terms%22%3A%7B%22status%22%3A%5B0%2C1%5D%7D%7D%5D%7D%7D%7D%7D%7D&size=8&sort=created_at%3Adesc reason: Unexpected end of JSON input