bug fixing

You cannot do that!!!
You cannot simply get rid of `err`, otherwise `groups` will just contain the `err`. And `groups` in the first instance in the line should be `this.groups`.
On the other hand, `this.groups[i].roles` should be `groups[i].roles`.