decentraland / unity-renderer

Unity implementation of Decentraland Client
https://play.decentraland.org
Apache License 2.0
137 stars 93 forks source link

Sometimes we don't see other avatars that are connected in the same place than us #5496

Closed sandrade-dcl closed 1 year ago

sandrade-dcl commented 1 year ago

Every Tuesday, the platform team has the daily in a world using the web client. The five of them connect to https://play.decentraland.org/?realm=paralax.dcl.eth and they find pretty consistently that the last person to connect is not seen by all the others. Everyone can hear everyone, but the first four people cannot see the 5th one.

Notice this happens in a world so there are no islands and no archipelago, everyone is connected to livekit and that's it. They though this may be a problem with comms so they started debugging it, but they saw the message were sent and received.

For example, the 5th person has the address 0x636B2B2B2adD82CEEB9D6dd642638A16948544e6, and inspecting this.peerMap they saw they were getting both position and profile from him (see image attached). So clearly the problem is not comms.

image.png

It seems it can be reproduced pretty consistently.

Steps to reproduce

  1. Connect a session (avatar A) with a wallet in a browser to https://play.decentraland.org/?realm=paralax.dcl.eth.
  2. From another browser connect another session (avatar B) with another wallet to https://play.decentraland.org/?realm=paralax.dcl.eth.
  3. Repear the point 2 until notice that the avatar B doesn't see th avatar B (while the avatar A see perfectly the avatar B).

Another questions

Q: Do we know if this happens ONLY in worlds? A: We think it probably happens outside of worlds, worlds comms is a subset of realm comms so very unlikely to be a only worlds issue. That been said, I think it will be best to debug it on worlds since it's so simple (no possibility of users in different islands and such).

Q: Do we know how long this is happening? A: This is happening long time ago (https://decentralandteam.slack.com/archives/C01QVR7TJK1/p1686833570579979)

Discussion thread

https://decentralandteam.slack.com/archives/C01QVR7TJK1/p1689694375639869

sandrade-dcl commented 1 year ago

Debugging the issue we see that, when it happens, it's because we don't have a baseUrl defined in the peer information of the "invisible" avatar.

image.png

When the baseUrl (in peers.ts -> receivePeerUserData(...) in Kernel) comes as undefined, this conditional is skipped and it never notifies Unity to render the avatar:

image.png

sandrade-dcl commented 1 year ago

Handover of the task to the new support champion: @davidejensen I did put the things that I found about this issue as a comment above, let me know if you have any doubt about!

anicalbano commented 1 year ago

Linked to closed issue #5773