Update from 5.6.5 to 5.7.0 ERROR

I tried to update Pimcore from 5.6.5 to 5.7.0 but i get the following ERROR when i run

COMPOSER_MEMORY_LIMIT=-1 composer update https://pimcore.com/docs/5.x/Development_Documentation/Installation_and_Upgrade/Updating_Pimcore/index.html

In User.php line 345:
  Call to a member function getPermission() on boolean

Any one any help please!?

Hmm, is it possible, that your user has roles assigned that don’t exist anymore?
Seems to be a problem here in this line:

Can you try to just save the user once more?


Thank you for your reply. :slight_smile:
You are right, I found users to have a role assigned to them that no longer exists!
I’ve saved all users and still same problem!?

I found which roleID was registered on an user, which no longer exists as a role and removed it from the user(s).

foreach ($userIds as $id) {
   $user = \Pimcore\Model\User::getById($id);
   $getRolesArr = $user->getRoles();
   $setRolesArr = array_diff($getRolesArr, ['106', '123']);

COMPOSER_MEMORY_LIMIT=-1 composer update

Now everything works as it should.
Thanks you!