vendure-ecommerce / vendure

The commerce platform with customization in its DNA.
https://www.vendure.io
Other
5.67k stars 1.01k forks source link

Error when cancelling a delivered fulfilment #2335

Closed skid closed 1 year ago

skid commented 1 year ago

Describe the bug The following error happens on the server when I try to cancel a fulfillment that's been marked as delivered:

Error: error.entity-with-id-not-found
    at TransactionalConnection.getEntityOrThrowInternal (node_modules/@vendure/core/src/connection/transactional-connection.ts:261:19)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at StockMovementService.createAllocationsForOrderLines (node_modules/@vendure/core/src/service/services/stock-movement.service.ts:163:31)
    at Object.onTransitionEnd (node_modules/@vendure/core/src/config/fulfillment/default-fulfillment-process.ts:95:13)
    at awaitPromiseOrObservable 

This happens on a migrated database (1.9.7 -> 2.0.4) - haven't tried it on a fresh 2.0.4 database.

To Reproduce Steps to reproduce the behavior:

  1. Create an order, a fulfillment and mark the fulfillment as delivered
  2. Try to cancel the fulfillment

Expected behavior The fulfillment should be cancelled.

Environment (please complete the following information):

michaelbromley commented 1 year ago

Hi,

I tried to reproduce in the current master branch with freshly-populated data and do not get the error. So for you does this also occur with newly-created orders, and not just orders migrated from v1?

michaelbromley commented 1 year ago

Actually I think this might be the same a #2306, which was fixed in v2.0.5