Hello,
we use Rocketchat snap version 3.12.1 and switched recently from LDAP-Login to only SAML-Azure-AD-Login.
Sometimes (not always) the user login does not work with the message “invalid user”. Often a single reload solves this problem but sometimes this workaround still does not work.
In the View Logs panel we get this message:
I20210312-12:44:05.790(1) Exception while invoking method getUserRoles Error: Invalid user [error-invalid-user] at MethodInvocation.getUserRoles (app/lib/server/methods/getUserRoles.js:9:10) at MethodInvocation.methodsMap. (app/lib/server/lib/debug.js:76:34) at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1771:12) at packages/ddp-server/livedata_server.js:1689:15 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12) at packages/ddp-server/livedata_server.js:1687:36 at new Promise () at Server.applyAsync (packages/ddp-server/livedata_server.js:1686:12) at Server.apply (packages/ddp-server/livedata_server.js:1625:26) at Server.call (packages/ddp-server/livedata_server.js:1607:17) at Object.post (app/api/server/v1/misc.js:263:26) at app/api/server/api.js:394:82 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12) at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39) at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32) at packages/nimble_restivus/lib/route.coffee:59:33 at packages/simple_json-routes.js:98:9 => awaited here: at Promise.await (/snap/rocketchat-server/1457/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12) at Server.apply (packages/ddp-server/livedata_server.js:1638:22) at Server.call (packages/ddp-server/livedata_server.js:1607:17) at Object.post (app/api/server/v1/misc.js:263:26) at app/api/server/api.js:394:82 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12) at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39) at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32) at packages/nimble_restivus/lib/route.coffee:59:33 at packages/simple_json-routes.js:98:9
I20210312-12:44:05.864(1) Exception while invoking method listCustomUserStatus Error: Invalid user [error-invalid-user] at MethodInvocation.listCustomUserStatus (app/user-status/server/methods/listCustomUserStatus.js:9:10) at MethodInvocation.methodsMap. (app/lib/server/lib/debug.js:76:34) at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1771:12) at packages/ddp-server/livedata_server.js:1689:15 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12) at packages/ddp-server/livedata_server.js:1687:36 at new Promise () at Server.applyAsync (packages/ddp-server/livedata_server.js:1686:12) at Server.apply (packages/ddp-server/livedata_server.js:1625:26) at Server.call (packages/ddp-server/livedata_server.js:1607:17) at Object.post (app/api/server/v1/misc.js:263:26) at app/api/server/api.js:394:82 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12) at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39) at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32) at packages/nimble_restivus/lib/route.coffee:59:33 at packages/simple_json-routes.js:98:9 => awaited here: at Promise.await (/snap/rocketchat-server/1457/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12) at Server.apply (packages/ddp-server/livedata_server.js:1638:22) at Server.call (packages/ddp-server/livedata_server.js:1607:17) at Object.post (app/api/server/v1/misc.js:263:26) at app/api/server/api.js:394:82 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12) at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39) at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32) at packages/nimble_restivus/lib/route.coffee:59:33 at packages/simple_json-routes.js:98:9
In the syslog we see this output:
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: Exception while invoking method getUserRoles Error: Invalid user [error-invalid-user]
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at MethodInvocation.getUserRoles (app/lib/server/methods/getUserRoles.js:9:10)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at MethodInvocation.methodsMap. (app/lib/server/lib/debug.js:76:34)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1771:12)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at packages/ddp-server/livedata_server.js:1689:15
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at packages/ddp-server/livedata_server.js:1687:36
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at new Promise ()
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Server.applyAsync (packages/ddp-server/livedata_server.js:1686:12)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Server.apply (packages/ddp-server/livedata_server.js:1625:26)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Server.call (packages/ddp-server/livedata_server.js:1607:17)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Object.post (app/api/server/v1/misc.js:263:26)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at app/api/server/api.js:394:82
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at packages/nimble_restivus/lib/route.coffee:59:33
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at packages/simple_json-routes.js:98:9
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: => awaited here:
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Promise.await (/snap/rocketchat-server/1457/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Server.apply (packages/ddp-server/livedata_server.js:1638:22)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Server.call (packages/ddp-server/livedata_server.js:1607:17)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Object.post (app/api/server/v1/misc.js:263:26)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at app/api/server/api.js:394:82
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at packages/nimble_restivus/lib/route.coffee:59:33
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at packages/simple_json-routes.js:98:9
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: Exception while invoking method listCustomUserStatus Error: Invalid user [error-invalid-user]
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at MethodInvocation.listCustomUserStatus (app/user-status/server/methods/listCustomUserStatus.js:9:10)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at MethodInvocation.methodsMap. (app/lib/server/lib/debug.js:76:34)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1771:12)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at packages/ddp-server/livedata_server.js:1689:15
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at packages/ddp-server/livedata_server.js:1687:36
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at new Promise ()
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Server.applyAsync (packages/ddp-server/livedata_server.js:1686:12)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Server.apply (packages/ddp-server/livedata_server.js:1625:26)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Server.call (packages/ddp-server/livedata_server.js:1607:17)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Object.post (app/api/server/v1/misc.js:263:26)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at app/api/server/api.js:394:82
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at packages/nimble_restivus/lib/route.coffee:59:33
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at packages/simple_json-routes.js:98:9
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: => awaited here:
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Promise.await (/snap/rocketchat-server/1457/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Server.apply (packages/ddp-server/livedata_server.js:1638:22)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Server.call (packages/ddp-server/livedata_server.js:1607:17)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Object.post (app/api/server/v1/misc.js:263:26)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at app/api/server/api.js:394:82
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32)
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at packages/nimble_restivus/lib/route.coffee:59:33
Mar 12 12:44:05 rocketchat01 rocketchat-server.rocketchat-server[337279]: at packages/simple_json-routes.js:98:9
The problem is independent of the browser (tested on firefox, chrome, native RC-Client) and we cannot see any failure on our firewall or webloadbalancer at all.
Do you have any clues or can you help us?