medusajs / medusa

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

Cannot read properties of undefined (reading 'product'): medusa-fulfillment-shippo #7736

Closed vavilondev closed 16 hours ago

vavilondev commented 3 months ago

Bug report

Describe the bug

Cannot read properties of undefined (reading 'product') When I try to select shipping option from shippo ( imported in medusa backend) with flat_rate, everything works fine. But if it is calculated rate, then I have that error. I added some loggers to my backend and I see when I try to select calculated rate option it send items array without variant field, but with variant_id , but in case of flat_rate there is variant with full product description

variant is required here: https://github.com/macder/medusa-fulfillment-shippo/blob/main/src/utils/formatters.js#L14

A clear and concise description of what the bug is.

System information

Medusa version (including plugins):

    "@medusajs/admin": "7.1.11",
    "@medusajs/cache-redis": "^1.9.0",
    "@medusajs/event-bus-redis": "^1.8.12",
    "@medusajs/file-local": "^1.0.3",
    "@medusajs/medusa": "^1.20.3",
    "medusa-fulfillment-shippo": "^1.1.2",

Node.js version: 18.17.0 Database: Pg Operating system: MacOS Browser (if relevant):

FaizanKhan78 commented 3 months ago

can i take this issue

github-actions[bot] commented 4 days ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 3 days.

github-actions[bot] commented 16 hours ago

This issue was closed because it has been stalled for 3 days with no activity.