decentraland / unity-renderer

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

Sign up with new user fails when sending message to unity #2152

Closed menduz closed 2 years ago

menduz commented 2 years ago

May I get some help understanding why this is failing?

Context of the problem: I'm removing many race conditions from kernel, and in the process discovered some from unity. In practice if I delay the message just one second, it works. I can imagine two possible scenarios: 1) from your end we get to a simple solution of the kind "you must send it AFTER the XYZ message" or 2) from your end, you emit a new message unity->kernel of kind "Renderer is initialized and ready" so I can start send all the messages

Error while sending Message to Unity. Object: Main. Method: LoadProfile. Payload:

{
  "description": "",
  "avatar": {
    "bodyShape": "urn:decentraland:off-chain:base-avatars:BaseMale",
    "skin": {
      "color": {
        "r": 0.800000011920929,
        "g": 0.6078431606292725,
        "b": 0.46666666865348816
      }
    },
    "hair": {
      "color": {
        "r": 0.9254902005195618,
        "g": 0.9098039269447327,
        "b": 0.886274516582489
      }
    },
    "eyes": {
      "color": {
        "r": 0.125490203499794,
        "g": 0.7019608020782471,
        "b": 0.9647058844566345
      }
    },
    "wearables": [
      "urn:decentraland:off-chain:base-avatars:sleeveless_punk_shirt",
      "urn:decentraland:off-chain:base-avatars:trash_jean",
      "urn:decentraland:off-chain:base-avatars:citycomfortableshoes",
      "urn:decentraland:off-chain:base-avatars:punk",
      "urn:decentraland:off-chain:base-avatars:horseshoe_beard",
      "urn:decentraland:off-chain:base-avatars:Thunder_earring"
    ],
    "version": 0,
    "snapshots": {
      "face": "https://peer-ec1.decentraland.org/content/contents/QmSfZ7mCyd5NUx7FnmRJ4FbyMkKvXXmDAe1YDT2KbenTnV",
      "body": "https://peer-ec1.decentraland.org/content/contents/Qmf3Md7ZYmLmkV8vVDcCGUd6FGjqtbJaFcdQtPjx3Q9Zzr",
      "face256": "https://peer-ec1.decentraland.org/content/contents/QmSfZ7mCyd5NUx7FnmRJ4FbyMkKvXXmDAe1YDT2KbenTnV"
    }
  },
  "hasClaimedName": false,
  "unclaimedName": "",
  "tutorialStep": 0,
  "version": 0,
  "userId": "0x0583d285d0ad264d467eebe6e28bab596650c50f",
  "ethAddress": "0x0583d285d0ad264d467eebe6e28bab596650c50f"
}
menduz commented 2 years ago

Another one

{
  "tutorialStep": 0,
  "userId": "0x80176cf67c931a4676735bf802419f77f13859d4",
  "email": "",
  "name": "Gurana#59d4",
  "hasClaimedName": false,
  "description": "",
  "ethAddress": "noeth",
  "avatar": {
    "bodyShape": "urn:decentraland:off-chain:base-avatars:BaseMale",
    "skin": {
      "color": {
        "r": 1,
        "g": 0.8941176533699036,
        "b": 0.7764706015586853,
        "a": 1
      }
    },
    "hair": {
      "color": {
        "r": 0.10980392247438431,
        "g": 0.10980392247438431,
        "b": 0.10980392247438431,
        "a": 1
      }
    },
    "eyes": {
      "color": {
        "r": 0.529411792755127,
        "g": 0.501960813999176,
        "b": 0.47058823704719543,
        "a": 1
      }
    },
    "wearables": [
      "urn:decentraland:off-chain:base-avatars:soccer_shirt",
      "urn:decentraland:off-chain:base-avatars:jean_shorts",
      "urn:decentraland:off-chain:base-avatars:m_feet_soccershoes",
      "urn:decentraland:off-chain:base-avatars:rasta",
      "urn:decentraland:off-chain:base-avatars:short_boxed_beard",
      "urn:decentraland:off-chain:base-avatars:golden_earring"
    ],
    "version": 0,
    "eyeColor": {
      "r": 0.529411792755127,
      "g": 0.501960813999176,
      "b": 0.47058823704719543,
      "a": 1
    },
    "hairColor": {
      "r": 0.10980392247438431,
      "g": 0.10980392247438431,
      "b": 0.10980392247438431,
      "a": 1
    },
    "skinColor": {
      "r": 1,
      "g": 0.8941176533699036,
      "b": 0.7764706015586853,
      "a": 1
    }
  },
  "interests": [],
  "version": -1,
  "snapshots": {
    "body": "https://peer.decentral.io/content/contents/QmVSmhF6RWJhdXYf7W23UmYLWqftczkj9BQzn4uzUpre2Z",
    "face256": "/images/image_not_found.png"
  },
  "hasConnectedWeb3": false,
  "parcelsWithAccess": []
}
menduz commented 2 years ago

Seems to be failing in method UpdateData Screen Shot 2022-04-19 at 16 26 20

menduz commented 2 years ago

Also with this one

{
  "created_at": 0,
  "updated_at": 0,
  "blocked": [],
  "inventory": [],
  "muted": [],
  "tutorialStep": 0,
  "tutorialFlagsMask": 0,
  "description": "",
  "avatar":
    {
      "wearables":
        [
          "urn:decentraland:off-chain:base-avatars:elegant_sweater",
          "urn:decentraland:off-chain:base-avatars:brown_pants_02",
          "urn:decentraland:off-chain:base-avatars:classic_shoes",
          "urn:decentraland:off-chain:base-avatars:moptop",
          "urn:decentraland:off-chain:base-avatars:lincoln_beard",
          "urn:decentraland:off-chain:base-avatars:matrix_sunglasses",
        ],
      "bodyShape": "urn:decentraland:off-chain:base-avatars:BaseMale",
      "eyeColor": { "r": 0.529411792755127, "g": 0.501960813999176, "b": 0.47058823704719543, "a": 1 },
      "hairColor": { "r": 0.9803921580314636, "g": 0.8235294222831726, "b": 0.5058823823928833, "a": 1 },
      "skinColor": { "r": 0.32156863808631897, "g": 0.1725490242242813, "b": 0.10980392247438431, "a": 1 },
    },
  "hasClaimedName": false,
  "version": -1,
  "userId": "0x80176cf67c931a4676735bf802419f77f13859d4",
  "ethAddress": "0x80176cf67c931a4676735bf802419f77f13859d4",
  "name": "NoName",
  "email": "",
  "hasConnectedWeb3": false,
  "snapshots":
    {
      "body": "https://peer.decentral.io/content/contents/QmRx45CT7FfQA6hrBfHqBxqZfbBZQW7RUPFcpEbS49JvHf",
      "face256": "https://peer.decentral.io/content/contents/QmcecVUdNrgDSb1KMYw1DQDT7XXmdZLccrHg3mp5EGPvYo",
    },
}
menduz commented 2 years ago

https://github.com/decentraland/kernel/pull/261/

menduz commented 2 years ago

screen_shot_2022-04-20_at_10 59 12 @pbosio found this, is there any clue on what race condition may produce it?

AjimenezDCL commented 2 years ago

We have been tackling this issues one by one. Related PRs:

2199

2216

2225