Title: Javascript error when loading cart
Last modified: January 11, 2022

---

# Javascript error when loading cart

 *  Resolved [alexisacseo](https://wordpress.org/support/users/alexisacseo/)
 * (@alexisacseo)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/javascript-error-when-loading-cart/)
 * Hi,
 * After migrating from the 3.6 (sync was suddlenty broken, error 500 and no product
   found) to the 4.0.17.
 * Sync is now functionnal, but the cart icon doesn’t appear with no errors.
    But
   when i try to add a product in cart, i get this message in console :
 *     ```
       Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'lineItems')
           at Z (shopwp-components_components_products_product_buy-button_index_jsx.2bf4d807.min.js:1)
           at shopwp-components_components_products_product_buy-button_index_jsx.2bf4d807.min.js:1
           at f (vendors-public.2bf4d807.min.js:2)
           at Generator._invoke (vendors-public.2bf4d807.min.js:2)
           at Generator.next (vendors-public.2bf4d807.min.js:2)
           at r (vendors-public.2bf4d807.min.js:2)
           at a (vendors-public.2bf4d807.min.js:2)
           at vendors-public.2bf4d807.min.js:2
           at new Promise (<anonymous>)
           at vendors-public.2bf4d807.min.js:2
       ```
   
 * `
 * For informations, i have disconnect shopify from wordpress and get a new connection,
   and the app shopwp has been installed on shopify.
    Do you have any idea about
   this error ?
 * Thanks in advance
    -  This topic was modified 4 years, 4 months ago by [alexisacseo](https://wordpress.org/support/users/alexisacseo/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [andrewmrobbins](https://wordpress.org/support/users/andrewmrobbins/)
 * (@andrewmrobbins)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/javascript-error-when-loading-cart/#post-15240361)
 * [@alexisacseo](https://wordpress.org/support/users/alexisacseo/)
 * Hey there! If you’ve reconnected after updating, the issue is probably caching
   related. Are you able to send me a link to the page?
 *  Thread Starter [alexisacseo](https://wordpress.org/support/users/alexisacseo/)
 * (@alexisacseo)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/javascript-error-when-loading-cart/#post-15240491)
 * Hi andrew,
 * thank for your feedback, but in my progress development for confidential reasons,
   and secure access i can’t send you a page.
 * I understand that can be difficult to debugging without that. if is that possible,
   can we talk about that in private messages ?
 * I have try to delete all sync data / clear cache / disconnect / reconnect / clear
   cache on pantheon environment, but the error persist.
 * My version of private app on shopify webhooks is on 2022-01
 *  Thread Starter [alexisacseo](https://wordpress.org/support/users/alexisacseo/)
 * (@alexisacseo)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/javascript-error-when-loading-cart/#post-15260889)
 * Problem is resolved after upgrading from 4.0.17 to 4.1.0
 *  Plugin Author [andrewmrobbins](https://wordpress.org/support/users/andrewmrobbins/)
 * (@andrewmrobbins)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/javascript-error-when-loading-cart/#post-15260976)
 * [@alexisacseo](https://wordpress.org/support/users/alexisacseo/) Awesome, glad
   to hear that worked. Let me know if you need anything else.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Javascript error when loading cart’ is closed to new replies.

 * ![](https://ps.w.org/wpshopify/assets/icon.svg?rev=2740857)
 * [ShopWP](https://wordpress.org/plugins/wpshopify/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpshopify/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpshopify/)
 * [Active Topics](https://wordpress.org/support/plugin/wpshopify/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpshopify/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpshopify/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [andrewmrobbins](https://wordpress.org/support/users/andrewmrobbins/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/javascript-error-when-loading-cart/#post-15260976)
 * Status: resolved