Hey everyone!
I’m having some trouble with the e-commerce part of Open edX. When I try to add a new course, I get this weird error message:
Exception: Failed to publish commerce data for course-v1:TEST to LMS.
I’m totally lost here. I’ve been searching for a solution but can’t find anything helpful. Has anyone run into this before? Any ideas what might be causing it or how to fix it?
I’d really appreciate any tips or advice. Thanks in advance for your help!
Hmm, that’s a tricky one! Have you double-checked your OAuth2 settings? Sometimes these commerce errors pop up when there’s an authentication issue between the LMS and E-Commerce service. Maybe try regenerating your OAuth2 client credentials and updating them in both systems?
Also, silly question, but is your E-Commerce service actually running? I once spent hours troubleshooting only to realize I forgot to start the service after a reboot! 
If none of that helps, it might be worth digging into the logs. Both the LMS and E-Commerce service should have detailed logs that might give more clues about what’s going wrong.
Let us know if you make any progress! This stuff can be so frustrating sometimes.
hey there! ive seen this issue before. it’s usualy related to LMS configuration or network problems. Have u checked ur LMS settings? make sure the commerce settings are correct and the LMS can reach the E-Commerce service. Also, try restarting both services. that sometimes fixes weird errors like this
This error often stems from a mismatch between your Open edX instance and the E-Commerce service. First, ensure both are running the same version. If they are, check the ECOMMERCE_PUBLIC_URL_ROOT in your lms.env.json file. It should point to your E-Commerce service’s URL. Also, verify that your E-Commerce service can communicate with your LMS. Sometimes, firewall settings or network issues can block this connection. If all else fails, try clearing your database cache. This has resolved similar issues for me in the past. Let me know if you need more specific guidance on any of these steps.