Hey Claudio,
Have you maybe changed the name of a default "User" role? If you changed it then that's the reason why you get such error. Make sure that you also update it across the project to reflect the updated name (a good place to start is inside that "postRegister" method) or revert its name back to "User".
Regards,
Milos