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)

Console Error

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)

Create role

  • 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.

  • hi @Mohit, did you get the solution for this issue? I am also facing the same – jafar pinjar May 6 '19 at 11:45
  • No @jafar-pinjar, not yet. – Mohit Kumar Arora May 7 '19 at 4:29
  • hi @Mohit, any temporary fix u did? or any suggestions to avoid this – jafar pinjar May 7 '19 at 6:12
  • have you installed any custom modules related to orders? – jafar pinjar May 7 '19 at 6:56
  • No, actually my question is not related to orders. I am having this error on every page in the backend for any restricted user. – Mohit Kumar Arora May 7 '19 at 6:59

after adding resource 'Basic Configuration Section' under 'Stores->Settings->Configuration', My local loaded fine.

enter image description here

| improve this answer | |
  • Thanks, @jonas-chen for sharing the solution. – Mohit Kumar Arora Aug 27 '19 at 4:42
  • Did you resolve the issue ? – Charvi Parikh Oct 21 at 5:42

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.