TypeError: Cannot read property toLowerCase of null

2
I have a strange issue on a test environment in the mendix cloud. When a user has a certain user role, the client won't startup at all. Instead I see a script Error: TypeError: Cannot read property 'toLowerCase' of null I've already pinpointed this to a call by mxui.js to mx.session.getUserRoles("Name") > (9) [null, "UserRole", .... So the user has the role but the role information is empty (the first one is null) If I fetch is with a separate XPATH retrieve from the client, all data is there //System.UserRole[System.UserRoles='[%CurrentUser%]'] Anybody encountered a similar issue yet? 
asked
2 answers
1

I have encountered this same bug when having a dropdown with user roles in a data grid search field. We were able to get away with just removing the search field as it seemed it wasn't actually needed. So we never investigated further.

answered
1

Hi Fabian,

I've encountered the same issue where on the user role has no attributes on the client. 

The project is in Mendix 7.1.1. and only have this issue on the acceptance environment. 

When checking another branche in Mendix 7.5.1 this issue doesn't appear on the test environment. 

But we couldn't upgrade the project on the acceptance environment so I tried some things and I figured out that emptying the User role description solved the issue. Or perhaps restarting the environment solved it. 

Do you still have this issue?

 

EDIT: I can reproduce this issue when I assign user roles to a user that is logged in.

answered