Federation invalid room [undefined]

Hi we’re trying to set up a federation between 2 rocket chat servers (different domains)
The records are ok, the test setup button does work without errors on both sides.
we can successfully search for a user through the “external users” search box, but if we click on the user we get an error Invalid Room [undefined] , in the log we see"API ➔ debug get federation.users.getByUsername threw an error: TypeError: Cannot read property ‘0’ of undefined"

  • Version of Rocket.Chat Server: 3.9.7
  • Operating System: Ubuntu 18.04.3
  • Deployment Method: snap
  • Number of Running Instances: 1
  • DB Replicaset Oplog:
  • NodeJS Version: v12.18.4
  • MongoDB Version: 3.6.14
  • Proxy:caddy

I’m seeing the same issue. I am able to find users on other servers. But when I try open a direct chat with them, I get the invalid room error. Looking in the logs I’m seeing the following:

I20211015-09:01:12.685(0) server.js:204 Federation ➔ client.error afterCreateDirectRoom => Could not create federated room: TypeError: Cannot read property ‘0’ of undefined at Object.normalizeUser (app/federation/server/normalizers/user.js:30:16) at app/federation/server/hooks/afterCreateDirectRoom.js:34:41 at Array.map () at app/federation/server/hooks/afterCreateDirectRoom.js:33:51 at /snap/rocketchat-server/1485/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
I20211015-09:07:18.721(0) server.js:204 Federation ➔ client.error afterCreateDirectRoom => Could not create federated room: TypeError: Cannot read property ‘0’ of undefined at Object.normalizeUser (app/federation/server/normalizers/user.js:30:16) at app/federation/server/hooks/afterCreateDirectRoom.js:34:41 at Array.map () at app/federation/server/hooks/afterCreateDirectRoom.js:33:51 at /snap/rocketchat-server/1485/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
I20211015-09:07:32.864(0) server.js:204 Federation ➔ client.error afterCreateDirectRoom => Could not create federated room: TypeError: Cannot read property ‘0’ of undefined at Object.normalizeUser (app/federation/server/normalizers/user.js:30:16) at app/federation/server/hooks/afterCreateDirectRoom.js:34:41 at Array.map () at app/federation/server/hooks/afterCreateDirectRoom.js:33:51 at /snap/rocketchat-server/1485/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40

Like I said, I can find other users, and in my federation dashboard it shows that I have federated servers.

One other thing I’ve noticed is that in the federation self check that you can get to via the info dashboard, shows green for federation being enabled, and for the DNS records being setup. BUT, when you scroll through the helper it shows green for everything except the SRV record port,443. The SRV record does have 443 setup, but it still shows as red, even though the whole thing is shown as green. I don’t know if this is a glitch that is leading to the above or not, but I thought it might be helpful for any dev working on this.

image

Any help would be appreciated.

Apparently there are two issues on github referring to this, with one even having a pending solution.

Could we direct some light to this issue?