cancel
Showing results for 
Search instead for 
Did you mean: 

Uncaught TypeError: Cannot read property 'map' of undefined

Uncaught TypeError: Cannot read property 'map' of undefined

Running Magento ver. 2.3.5-p1, vanilla install running Luma theme. I'm populating the site with all of my SKUs, and occasionally, after I update a product with a new image (Save & Close), it will bring me back to the product listing page and I get the dreaded "spinning circle". Page hangs and will not fully load the product search results.  Inspector shows this:

 

Screen Shot 2020-06-09 at 3.42.39 PM.png

 

If I reload the page, everything seems fine, but I think this might be the cause of 504 errors I am getting every few days. The site will not load, and my web host has to kill off all sleeping DB queries that have stacked up. Any ideas as to what might be going on?

3 REPLIES 3

Re: Uncaught TypeError: Cannot read property 'map' of undefined

Sorry, image doesn't appear to be loading.  This is the text:

 

Uncaught TypeError: Cannot read property 'map' of undefined
at UiClass.updateActions (actions.js:105)
at setNested (objects.js:43)
at Object.nested (objects.js:117)
at UiClass.set (element.js:305)
at updateValue (links.js:80)
at events.js:87
at Array.forEach (<anonymous>)
at trigger (events.js:84)
at UiClass.trigger (events.js:162)
at UiClass.<anonymous> (element.js:424)

 

Also, the following shows in debug.log:

 

[2020-06-09 19:38:38] main.DEBUG: Request validation failed for action "Magento\Ui\Controller\Adminhtml\Index\Render\Interceptor" {"exception":"[object] (Magento\\Framework\\App\\Request\\InvalidRequestException(code: 0): Invalid request received at /home/caterpil/staging/vendor/magento/module-backend/App/Request/BackendValidator.php:176)"} []

Re: Uncaught TypeError: Cannot read property 'map' of undefined

I think your error is more backend related but maybe this is helping you to solve or understand the problem.


I had this error in magento frontend, related to lib/web/mage/requirejs/mixins.js file

mixins.js:192 Uncaught TypeError: Cannot read property 'map' of null
    at processNames (mixins.js:192)
    at Array.defContext.defQueue.shift (mixins.js:237)
    at Object.completeLoad (require.js:1529)
    at HTMLScriptElement.onScriptLoad (require.js:1671)

Could solve it like described below.
If you have js files they are loaded in frontend and use define like this:

define('jquery', function($){
 console.log('testing');
}(jQuery));

 change your files like this:

define([
    'jquery'
], function ($) {
 console.log('testing');
});

So the deps should be in an array. And bind at the end need to be removed.

All files that has the wrong structure need to be changed.

Re: Uncaught TypeError: Cannot read property 'map' of undefined

Thank you for the solution. It worked perfectly.