6

enter image description herecustomer-data.js:86 Uncaught Error: [object Object]

at Object. (customer-data.js:86)

at fire (jquery.js:3099)

at Object.fireWith [as rejectWith] (jquery.js:3211)

at done (jquery.js:9312)

at XMLHttpRequest.callback (jquery.js:9720)

1
  • 2
    I am getting the same issue. Looking for solution. Do you have any update regarding this?
    – Saphal Jha
    Oct 24 '17 at 11:07
10

Sometimes this is caused by something as disabling a (payment) module the wrong way and RLTcode's answer is very useful.

However, in my case the mini cart was not updated when a product was added. No errors in system.log, debug.log or anywhere else. But this error kept popping up.

In the end I added a console.log to the pub/static/version.../frontend/Magento/luma/en_US/Magento_Customer/js/customer-data.js to show the jqXHR error:

return $.getJSON(options.sectionLoadUrl, parameters).fail(function (jqXHR) {
            console.log(jqXHR); // around line 90...
            throw new Error(jqXHR);
        });

This revealed the error that I was looking for :

responseText: "Exception: Warning: Cannot modify header information - headers already sent by ..." caused by a module I had installed.

So if anyone ever runs into some weird behavior without any errors but this customer-data.js:90 Uncaught Error: [object Object] keeps popping up then add some console logging to the jqXHR error: it can help a lot!

3
  • This is good. The XHR request path is likely: /customer/section/load/ which can be checked in DevTools. Feb 27 '19 at 22:48
  • Hi @Isolde, I added this to the customer-data.js and refreshed cache in Magento but it doesn't appear to have updated the customer-data.js file. Can you advise? When it finally does work, where will I find the log? I am using Chrome. Mar 18 '19 at 16:18
  • Try cleaning out var/view_preprocessed/pub/static/frontend (if you have added the logging in an extension in stead of in the javascript in de cache) cache and/or do a new setup:static-content:deploy. Also note that your browser may be caching the javascript files! So clean browser cache if needed as well. In chrome -> developer tools you will find a tab named console, logs will be shown there.
    – Isolde
    Mar 19 '19 at 18:33
3

See my answer for a different question concerning the same issues:

https://magento.stackexchange.com/a/213550/14403

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.