Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type Error Cannot read properties of undefined (reading '0'), when trying to set the fullfilment as send. #9114

Closed
djboboch opened this issue Sep 12, 2024 · 6 comments

Comments

@djboboch
Copy link

Bug report

When trying to set the fulfillment as send, type error is thrown in the admin-ui.

TypeError
Cannot read properties of undefined (reading '0')
Call Stack
 undefined
  node_modules_moment_locale_sync_recursive_-cache_admin_src_pages_a_tsx.chunk.js:871:2784
 j
  node_modules_moment_locale_sync_recursive
-_cache_admin_src_pages_a_tsx.chunk.js:871:2751
 le
  main.bundle.js:458:55325
 cz
  main.bundle.js:458:93877
 c7
  main.bundle.js:458:111992
 HTMLUnknownElement.g
  main.bundle.js:446:48300
 Object.r3
  main.bundle.js:446:48625
 nt
  main.bundle.js:446:49578
 eh
  main.bundle.js:458:170988

Describe the bug

While trying to set the fulfillment as send on clients order the admin ui throws a type error.

System information

Medusa version (including plugins):
"@medusajs/admin": "^7.1.16",
"@medusajs/admin-ui": "2.1.16",
"@medusajs/cache-inmemory": "1.8.11",
"@medusajs/cache-redis": "^1.9.2",
"@medusajs/event-bus-local": "1.9.9",
"@medusajs/event-bus-redis": "^1.8.14",
"@medusajs/file-local": "1.0.4",
"@medusajs/medusa": "1.20.9",
Node.js version: v18.20.4
Database:

Steps to reproduce the behavior

  1. Create a new product and go through the checkout and payment flow
  2. Go to the admin-ui
  3. Go to the order you just created
  4. Capture the payment
  5. Create fullfilment for the order
  6. Set the order as send

Expected behavior

The fullfillment would be set as "send"

Screenshots

image

@Amaanghazi22
Copy link

I can fix this bug.

@djboboch
Copy link
Author

@Amaanghazi22 do you know where the error is ?

@devcshort
Copy link

I'm getting this same error, but I have not found a solution to it yet.

@martinlarka
Copy link

Related issue #8477

@olivermrbl
Copy link
Contributor

This should be solved in the latest release of the dashboard. Can you install @medusajs/[email protected] and try again please?

@djboboch
Copy link
Author

djboboch commented Oct 3, 2024

Hey I have upgraded the packages as follows:

"@medusajs/admin": "^7.1.17",
"@medusajs/admin-ui": "2.1.18",

After the upgrade and rebuilt of the UI the issue is fixed and I am able to create the fullfillment and set the package as send :)

Thank you for this fix !!! Kudos

P.S. Question ??? Should the status of the order changed from status:"pending" after the fullfilment is created ? Because right now after I created the fullfilment and set the package as send the status is still set at pending, while others have changed:
{
status:"pending"
fulfillment_status:"shipped"
payment_status:"captured"
...
}

Just asking if this is intended behavior or not ?

@djboboch djboboch closed this as completed Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants