{"id":1277,"date":"2020-10-04T15:30:41","date_gmt":"2020-10-04T15:30:41","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2020\/10\/04\/customer-data-js-86-uncaught-error-object-in-magento-2\/"},"modified":"2025-05-21T17:48:49","modified_gmt":"2025-05-21T12:18:49","slug":"customer-data-js-86-uncaught-error-object-in-magento-2","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/customer-data-js-86-uncaught-error-object-in-magento-2\/","title":{"rendered":"Debug: customer-data.js:86 Uncaught Error: [object Object] in Magento 2"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Ever faced an error that says \u201ccustomer-data.js:86 Uncaught Error: [object Object]\u201d in Magento 2?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The error text is not as descriptive for the developers to understand the issue and hence leaves them hanging and wondering what to do.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/reasons-to-hire-certified-magento-developers\/\" target=\"_blank\" rel=\"noreferrer noopener\">certified Magento developers at Meetanshi<\/a>&nbsp;have found the solution mentioned below, for this JS error that is displayed in the console.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u201cCustomer-data.js:86 Uncaught Error:[object-object]\u201d error occurs when there is a failure of fetching information. The majority of the time, this error is caused by JavaScript.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Many times, it is being observed, the error occurs due to disabling a module in the wrong way, for example, a payment module.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When this error occurs, the customer details are not displayed in the frontend, or the mini cart is not updated correctly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To avoid such disruptions, check the below debugging steps for&nbsp;<em><strong>customer-data.js:86 Uncaught Error: [object Object] in Magento 2<\/strong><\/em>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Debugging Steps for customer-data.js:86 Uncaught Error: [object Object] in Magento 2:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You just need to add a console.log to the given path.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>pub\/static\/version\u2026\/frontend\/[theme package\/language_code\/Magento_Customer\/js\/customer-data.js to show the jqXHR error:<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Add this code:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">return $.getJSON(options.sectionLoadUrl, parameters).fail(function (jqXHR) {\n\nconsole.log(jqXHR);\n\nthrow new Error(jqXHR);\n\n});<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">With these steps, you will find the error and its place where you need to make changes. Follow the output of console log and solve the error \u201ccustomer-data.js:86 Uncaught Error: [object Object]\u201d in Magento 2.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do share the debugging steps with Magento 2 developers via social media.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ever faced an error that says \u201ccustomer-data.js:86 Uncaught Error: [object Object]\u201d in Magento 2? The error text is not as descriptive for the developers to&#8230;<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-1277","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1277","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=1277"}],"version-history":[{"count":2,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1277\/revisions"}],"predecessor-version":[{"id":13963,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1277\/revisions\/13963"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=1277"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=1277"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=1277"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}