medusa icon indicating copy to clipboard operation
medusa copied to clipboard

Error on initialize payment (many request at the same time)

Open rrums123 opened this issue 3 years ago • 3 comments

Bug report

Describe the bug

I'm doing a test, many full-flow checkout process in one time (greater then 5 process at the same time).

The process:

  1. Create cart
  2. Update cart with address
  3. Initialize payment (Stripe and manual)
  4. Select payment (Manual)
  5. Cart completion

I often get error (below) when hit Initialize payment (Step 3)

error:   Cannot read properties of undefined (reading 'queryRunner')
TypeError: Cannot read properties of undefined (reading 'queryRunner')
    at CustomerService.<anonymous> (/Users/ryanrumlaklak/Sites/medusa-test/node_modules/@medusajs/medusa/dist/interfaces/transaction-base-service.js:111:80)
    at step (/Users/ryanrumlaklak/Sites/medusa-test/node_modules/@medusajs/medusa/dist/interfaces/transaction-base-service.js:44:23)
    at Object.throw (/Users/ryanrumlaklak/Sites/medusa-test/node_modules/@medusajs/medusa/dist/interfaces/transaction-base-service.js:25:53)
    at rejected (/Users/ryanrumlaklak/Sites/medusa-test/node_modules/@medusajs/medusa/dist/interfaces/transaction-base-service.js:17:65)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

System information

Medusa version (including plugins): Node.js version: 16.15.0 Database: Postgres Operating system: OSX Medusa version: 1.3.5

Steps to reproduce the behavior

Run this process many times at the same time (more than 5)

  1. Create cart
  2. Update cart with address
  3. Initialize payment (Stripe and manual)
  4. Select payment (Manual)
  5. Cart completion

Expected behavior

No error when initiate many checkout processes at one time.

Screenshots

N/A

Code snippets

N/A

Additional context

N/A

rrums123 avatar Aug 05 '22 12:08 rrums123

Can I get you to add the version of Medusa you are using?

olivermrbl avatar Aug 05 '22 12:08 olivermrbl

I am using v1.3.5 @olivermrbl

rrums123 avatar Aug 05 '22 12:08 rrums123

It is probably related to the work I told you about here https://github.com/medusajs/medusa/pull/1773 https://github.com/medusajs/medusa/pull/1776 https://github.com/medusajs/medusa/pull/1780 https://github.com/medusajs/medusa/pull/1781 https://github.com/medusajs/medusa/pull/1789 https://github.com/medusajs/medusa/pull/1790

adrien2p avatar Aug 05 '22 13:08 adrien2p