medusajs / medusa

Building blocks for digital commerce
https://medusajs.com
MIT License
24.32k stars 2.38k forks source link

MedusaJS Error: 'InternalServerError: stream is not readable' When Deleting Test Product #5870

Open dutchakdev opened 8 months ago

dutchakdev commented 8 months ago

Bug report

Describe the bug

When attempting to delete a test product in MedusaJS, an InternalServerError occurs, indicating a problem with stream readability. This issue arises in the context of handling a request in the Medusa environment, specifically related to stream handling in the raw-body module, as part of the request processing pipeline.

System information

Steps to reproduce the behavior

  1. Create a new product in MedusaJS with specific attributes (as detailed in the provided product object information).
  2. Attempt to delete the created test product.
  3. Wait (so long)
  4. Encounter the InternalServerError: stream is not readable error during the deletion process.
  5. The error stack trace is provided for reference.

Expected behavior

The expected behavior is the successful deletion of the test product without encountering any internal server errors. The process should complete smoothly, reflecting changes in the database and user interface accordingly.

Code snippets

Additional context

This issue seems to be related to the handling of streams within the MedusaJS framework, possibly linked to the way the body-parser library processes incoming requests. Further investigation into the handling of stream data in this specific context is needed.

bqst commented 8 months ago

+1

alessioacella commented 7 months ago

+1

alessioacella commented 5 months ago

Same here on medusa 1.20.3

WoodlegDev commented 3 months ago

this error still exists

codeustad commented 2 months ago

Same here with medusa 1.20.2 !

Edit: Product can be easily delete over the admin API call: DELETE /admin/products/{id}

chesterperry commented 1 month ago

I had the same issue in the admin panel with products without variants. I deleted those products using an API call.

However, in my case, products with variants could be deleted through the admin panel without any issues.