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:
1
2
3
4
5
6
7
|
return $.getJSON(options.sectionLoadUrl, parameters).fail(function (jqXHR) {
console.log(jqXHR);
throw new Error(jqXHR);
});
|
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.
]]>