-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Bug]: Add to Cart Workflow broken since last update #10644
Comments
@fxmb, thanks for the report. How are you consuming the workflow? Its input type changed in the latest release. You should pass the I'll add this to the release notes. |
Ha that fixed it! Thanks for pointing this out so quickly For everyone else:
becomes:
|
Hey,
Is it normal that we can have We had the same error as @fxmb about
Our way to fix it force the version in our
By putting this at the root of our yarn workspace :
😿 |
The exact same issue is happening for me. |
I'm seeing the same on a pretty fresh install on v2 running on Vercel, with a cloudflare tunnel to my backend. Oddly enough, I am completely unable to reproduce the behavior locally. I tried setting my API server to production mode, but that isn't doing it. The requests themselves do look different, the one from my local dev includes a CSRF token in the cookies, but the one from vercel does not. I've no idea what to do to resolve this, should I try upgrading? Would a stack trace of the issue be helpful? Is there a good way to debug this? It must have to do with how I'm communicating with my API server. When
When it's pointed to I get
|
@Thisisjuke, we intentionally keep all packages on the same version to avoid issues related to version mismatches. This is the recommended way to deal with this. @mohamadfala, can you create a new issue detailing your problem. Please include a minimal reproduction. @thoward27, this sounds like your remote server might have a version mismatch. Can I get you to ensure all packages have been upgraded to the same version and try again? If the issue persists, please create a new issue. I will close this for now, as OPs problem has been resolved. |
For anyone with the same issue, I can confirm that I can successfully add things to my cart after upgrading all of my packages to their latest semver-compliant versions in both my backend and store. I'm using the Next.js starter and did have to implement medusajs/nextjs-starter-medusa#391 after upgrading everything. |
Package.json file
The commit 8 hours ago broke the add to cart workflow I believe:
This query result from here: https://github.com/medusajs/medusa/blob/develop/packages/core/core-flows/src/cart/workflows/add-to-cart.ts#L47
returns the first cart that was created in the database.
I always get this error when trying to add to the cart using the addToCart Workflow:
Cart cart_01J801RD5JEWMPDS0V1AZZM0FP is already completed.
However, this cart (ending on FP) is not the one I am sending to the server, its an old cart from another customer...
This is the first cart ever created in our db, hence I assume some query is failing, sorted by date and returning the first [0] cart since its sorted by created_at.
Node.js version
20
Database and its version
16
Operating system name and version
..
Browser name
No response
What happended?
see above
Expected behavior
see above
Actual behavior
see above
Link to reproduction repo
no link
The text was updated successfully, but these errors were encountered: