+92-301-1000201 [email protected]
13 views

Ever faced an error that says “customer-data.js:86 Uncaught Error: [object Object]” in Magento 2?

The error text is not as descriptive for the developers to understand the issue and hence leave them hanging and wondering what to do.

The certified developers at Cozmot have found out the solution mentioned below, for this JS error that is displayed in the console.

When a customer logs in in Magento 2 stores, the customer information is fetched to display on the frontend at My Account, My Wishlist, Checkout page, and other pages.

“Customer-data.js:86 Uncaught Error:[object-object]” error occurs when there is a failure of fetching information. The majority of the time, this error is caused by JavaScript.

Many times, it is being observed, the error occurs due to disabling a module in the wrong way, for example, payment module.

When this error occurs, the customer details are not displayed in the frontend, or the mini cart is not updated correctly.

To avoid such disruptions, check the below solution for customer-data.js:86 Uncaught Error: [object Object] in Magento 2.

Solution for customer-data.js:86 Uncaught Error: [object Object] in Magento 2:

You just need to add a console.log to the given path.

pub/static/version…/frontend/[theme package/language_code/Magento_Customer/js/customer-data.js to show the jqXHR error:

Add this code:

That’s it.

If you have a question regarding this error and its solution, feel free to ask in the Comment section below.

I would be happy to help you.

Do share the solution with Magento 2 developers via social media.

Thank you.

Share This

Share this post with your friends!