Note: This is not a duplicate of any similar error
I have found a strange bug in Magento 2. It shows the following error in the browser's console for only restricted admin user (the user which has not full rights of the admin panel).
Uncaught TypeError: Cannot read property 'items' of null at UiClass.onRequestComplete (data-storage.js:270) at fire (jquery.js:3232) at Object.fireWith [as resolveWith] (jquery.js:3362) at done (jquery.js:9840) at XMLHttpRequest.callback (jquery.js:10311)
To replicate the issue, follow the process below:
- Login to the backend with a user with full backend permission.
- Create a new user role from System >> User Roles with Custom Resource Access. For example, select only the Dashboard from the resources list. (You can choose any other)
- After creating the role, create a new admin user with the role which you created in the previous step.
- Login to the backend with new user's login credentials in another browser or after logging out the current user.
- Open the browser's console and check the error mentioned above.
Note: I have noticed the same error from Magento versions 2.2.4 to 2.2.7.