Description
Hello, Rocket team!
We are migrating from Slack to Rocket Chat. We have deployed clean standalone Rocket Chat, then we have imported Slack users archive with Import → Import New File → Slack + Upload → select archive → Import → confirm importing all the users.
But now we are getting error “Cannot read property ‘0’ of undefined”, when saving changes in any user editing window.
Mentioned Slack archive, that we have imported: all user without confidentional.zip - Google Drive
Can you try to reproduce our issue with that archive?
Server Setup Information
- Version of Rocket.Chat Server: 4.5.0
- Operating System: CentOS Linux release 7.9.2009 (Core)
- Deployment Method: deployment method How to Install Rocket.Chat on CentOS 7 - Vultr.com (yum + src)
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version: v14.0.0
- MongoDB Version: 4.2.19 / wiredTiger (oplog Enabled)
- Proxy: nginx/1.20.1
- Firewalls involved: iptables, ACCEPT ALL
Any additional Information
The error accompanied by these logs:
{“level”:20,“time”:“2022-03-17T07:36:34.213Z”,“pid”:14031,“hostname”:“dub-srv-rc-test”,“name”:"",“name”:“Callbacks”,“msg”:“Executing callback with id check-max-user-seats for hook validateUserRoles”}
{“level”:35,“time”:“2022-03-17T07:36:34.219Z”,“pid”:14031,“hostname”:“dub-srv-rc-test”,“name”:"",“name”:“API”,“method”:“POST”,“url”:"/api/v1/users.update",“userId”:“uCjT9Zou3skJTx4bG”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0”,“length”:“288”,“host”:“10.10.4.125:3000”,“referer”:“http://10.10.4.125:3000/admin/users/edit/LKdL3P5NmvzXNt8jL",“remoteIP”:“192.168.10.116”,“err”:{“type”:“TypeError”,“message”:"Cannot read property ‘0’ of undefined”,“stack”:“TypeError: Cannot read property ‘0’ of undefined
at validateUserEditing (app/lib/server/functions/saveUser.js:210:3)
at saveUser (app/lib/server/functions/saveUser.js:344:2)
at DDPCommon.MethodInvocation. (app/api/server/v1/users.js:594:40)
at packages/dispatch_run-as-user.js:211:14
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)
at Object.Meteor.runAsUser (packages/dispatch_run-as-user.js:210:33)
at Object.post (app/api/server/v1/users.js:594:11)
at app/api/server/api.js:425:96
at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)
at Object._internalRouteActionHandler [as action] (app/api/server/api.js:425:39)
at Route._callEndpoint (packages/rocketchat_restivus/lib/route.coffee:150:32)
at packages/rocketchat_restivus/lib/route.coffee:59:33
at packages/simple_json-routes.js:100:9”},“status”:400,“responseTime”:15,“msg”:“Cannot read property ‘0’ of undefined”}