You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The steps to get the error as shown in the picture are as follows
Add 2 different items to the cart.
Complete the update of address, shipping options, payment method at checkout.
Place order for the first time and get the error above as shown in the picture
error: Variant variant_01JE890NNY4W30XK0WFEF481HK does not have any inventory items associated with it.
{
message: 'Variant variant_01JE890NNY4W30XK0WFEF481HK does not have any inventory items associated with it.',
name: 'Error',
stack: 'Error: Variant variant_01JE890NNY4W30XK0WFEF481HK does not have any inventory items associated with it.\n' +
' at /Users/macbookpro/Documents/bit.country/sources/ecommerce-sdk/backend/node_modules/@medusajs/core-flows/src/cart/utils/prepare-confirm-inventory-input.ts:151:13\n' +
' at Array.forEach (<anonymous>)\n' +
' at formatInventoryInput (/Users/macbookpro/Documents/bit.country/sources/ecommerce-sdk/backend/node_modules/@medusajs/core-flows/src/cart/utils/prepare-confirm-inventory-input.ts:139:9)\n' +
' at Function.prepareConfirmInventoryInput (/Users/macbookpro/Documents/bit.country/sources/ecommerce-sdk/backend/node_modules/@medusajs/core-flows/src/cart/utils/prepare-confirm-inventory-input.ts:110:17)\n' +
' at Proxy.returnFn (/Users/macbookpro/Documents/bit.country/sources/ecommerce-sdk/backend/node_modules/@medusajs/workflows-sdk/src/utils/composer/transform.ts:192:30)\n' +
' at processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
' at async resolveProperty (/Users/macbookpro/Documents/bit.country/sources/ecommerce-sdk/backend/node_modules/@medusajs/workflows-sdk/src/utils/composer/helpers/resolve-value.ts:17:11)\n' +
' at async resolveValue (/Users/macbookpro/Documents/bit.country/sources/ecommerce-sdk/backend/node_modules/@medusajs/workflows-sdk/src/utils/composer/helpers/resolve-value.ts:78:7)\n' +
' at async invoke (/Users/macbookpro/Documents/bit.country/sources/ecommerce-sdk/backend/node_modules/@medusajs/workflows-sdk/src/utils/composer/helpers/create-step-handler.ts:71:32)\n' +
' at async Object.handle.invoke (/Users/macbookpro/Documents/bit.country/sources/ecommerce-sdk/backend/node_modules/@medusajs/workflows-sdk/src/utils/composer/create-step.ts:319:12)\n' +
'⮑ sat /Users/macbookpro/Documents/bit.country/sources/ecommerce-sdk/backend/node_modules/@medusajs/core-flows/dist/cart/workflows/complete-cart.js: [complete-cart -> reserve-inventory-step (invoke)]',
__isMedusaError: true,
type: 'invalid_data',
code: undefined,
date: 2025-01-06T12:23:46.115Z
}
From the second time onwards, get the error as shown below in the picture.
error: Order address with id: caaddr_01JGXRY8KT24MZKXDMQAQF4YNW, already exists.
{
message: 'Order address with id: caaddr_01JGXRY8KT24MZKXDMQAQF4YNW, already exists.',
name: 'Error',
stack: 'Error: Order address with id: caaddr_01JGXRY8KT24MZKXDMQAQF4YNW, already exists.\n' +
' at dbErrorMapper (/Users/macbookpro/Documents/bit.country/sources/ecommerce-sdk/backend/node_modules/@medusajs/utils/src/dal/mikro-orm/db-error-mapper.ts:35:11)\n' +
' at processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
' at async MikroOrmBaseRepository.transaction (/Users/macbookpro/Documents/bit.country/sources/ecommerce-sdk/backend/node_modules/@medusajs/utils/src/dal/mikro-orm/mikro-orm-repository.ts:74:12)\n' +
' at async OrderModuleService.descriptor.value (/Users/macbookpro/Documents/bit.country/sources/ecommerce-sdk/backend/node_modules/@medusajs/utils/src/modules-sdk/decorators/inject-transaction-manager.ts:32:14)\n' +
' at async OrderModuleService.createOrders (/Users/macbookpro/Documents/bit.country/sources/ecommerce-sdk/backend/node_modules/@medusajs/order/src/services/order-module-service.ts:610:20)\n' +
' at async Proxy.<anonymous> (/Users/macbookpro/Documents/bit.country/sources/ecommerce-sdk/backend/node_modules/@medusajs/orchestration/src/workflow/local-workflow.ts:129:20)\n' +
' at async Object.exports.createOrdersStep.async.container.container (/Users/macbookpro/Documents/bit.country/sources/ecommerce-sdk/backend/node_modules/@medusajs/core-flows/src/order/steps/create-orders.ts:14:21)\n' +
' at async invoke (/Users/macbookpro/Documents/bit.country/sources/ecommerce-sdk/backend/node_modules/@medusajs/workflows-sdk/src/utils/composer/helpers/create-step-handler.ts:72:52)\n' +
' at async Object.handle.invoke (/Users/macbookpro/Documents/bit.country/sources/ecommerce-sdk/backend/node_modules/@medusajs/workflows-sdk/src/utils/composer/create-step.ts:319:12)\n' +
' at async DistributedTransaction.handler (/Users/macbookpro/Documents/bit.country/sources/ecommerce-sdk/backend/node_modules/@medusajs/orchestration/src/workflow/workflow-manager.ts:214:16)\n' +
'⮑ sat /Users/macbookpro/Documents/bit.country/sources/ecommerce-sdk/backend/node_modules/@medusajs/core-flows/dist/cart/workflows/complete-cart.js: [complete-cart -> create-orders (invoke)]',
__isMedusaError: true,
type: 'invalid_data',
code: undefined,
date: 2025-01-06T12:28:57.279Z
}
This error only occurs when the place order is from 2 or more different items. As for 1 item, the place order is always successful
Expected behavior
The order should be placed successfully when there are 2 or more items in the cart. The user should see a confirmation message without encountering any errors
Actual behavior
When placing an order with 2 or more items in the cart, the first attempt results in an error as shown in the screenshot. On subsequent attempts, another error occurs. The order cannot be placed successfully, and the process fails
The above error only occurs when I place an order with an order that has 2 different items in 1 cart.
If it is the same 2 items but I split the order into 2 times, meaning each time I place an order 1 item, it is working fine.
Package.json file
Node.js version
v2.1.3
Database and its version
PostgreSQL 16.4
Operating system name and version
MacOS Sonama 14.1
Browser name
Brave
What happended?
The steps to get the error as shown in the picture are as follows
This error only occurs when the place order is from 2 or more different items. As for 1 item, the place order is always successful
Expected behavior
The order should be placed successfully when there are 2 or more items in the cart. The user should see a confirmation message without encountering any errors
Actual behavior
When placing an order with 2 or more items in the cart, the first attempt results in an error as shown in the screenshot. On subsequent attempts, another error occurs. The order cannot be placed successfully, and the process fails
Link to reproduction repo
https://store.comedian.meme/us/store
The text was updated successfully, but these errors were encountered: