# Wrong rank for owner id

**URL:** <https://forum.heroiclabs.com/t/wrong-rank-for-owner-id/4898>\
**Category:** Runtime Framework\
**Tags:** server-framework, leaderboards\
**Created:** [January 20, 2024, 10:00am UTC](https://forum.heroiclabs.com/t/wrong-rank-for-owner-id/4898 "2024-01-20T10:00:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmadrezadl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/ahmadrezadl/32/1087_2.png) [@Ahmadrezadl](https://forum.heroiclabs.com/u/Ahmadrezadl)\
**Post date:** [January 20, 2024, 10:00am UTC](https://forum.heroiclabs.com/t/wrong-rank-for-owner-id/4898/1 "2024-01-20T10:00:33Z")

</div>

Hello everyone,

I have a leaderboard named “legendary3” in my Nakama setup. One of my players, with the ID “35530999-1b50-42d1-b478-ce78e5d362fa”, is encountering an inconsistency. This player is ranked 3rd when viewing the top 150, but when viewing their own record, they appear as number 12.

Here are the request and responses for more context:

**RPC: ListLeaderboardRecords**

_Request payload:_

```json
{
  "leaderboardId": "legendary3",
  "ownerIds": [
    "35530999-1b50-42d1-b478-ce78e5d362fa"
  ],
  "limit": 1
}

```

_Response body:_

```json
{
  "records": [
    {
      "leaderboardId": "legendary3",
      "ownerId": "b78031ee-e6e7-446f-8d27-34800c8b432e",
      "score": "2630",
      "numScore": 236,
      "metadata": "{}",
      "createTime": "2023-12-31T15:30:13Z",
      "updateTime": "2024-01-19T17:34:28Z",
      "rank": "1",
      "maxNumScore": 1000000
    }
  ],
  "ownerRecords": [
    {
      "leaderboardId": "legendary3",
      "ownerId": "35530999-1b50-42d1-b478-ce78e5d362fa",
      "score": "1173",
      "numScore": 119,
      "metadata": "{}",
      "createTime": "2023-12-31T15:52:21Z",
      "updateTime": "2024-01-19T15:45:24Z",
      "rank": "13", // Note the discrepancy here
      "maxNumScore": 1000000
    }
  ],
  "nextCursor": "_4B_AwEBG2xlYWRlcmJvYXJkUmVjb3JkTGlzdEN1cnNvcgH_gAABBwEGSXNOZXh0AQIAAQ1MZWFkZXJib2FyZElkAQwAAQpFeHBpcnlUaW1lAQQAAQVTY29yZQEEAAEIU3Vic2NvcmUBBAABB093bmVySWQBDAABBFJhbmsBBAAAAD3_gAEBAQpsZWdlbmRhcnkzAv4UjAIkYjc4MDMxZWUtZTZlNy00NDZmLThkMjctMzQ4MDBjOGI0MzJlAQIA",
  "rankCount": "11851"
}

```

It appears that while this player sees themselves as rank 3 in the overall leaderboard, their own record indicates they are rank 13. This discrepancy needs to be addressed.

Please feel free to share your insights or suggest any potential solutions.

---

<div class="post-metadata">

**Author:** ![Ahmadrezadl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/ahmadrezadl/32/1087_2.png) [@Ahmadrezadl](https://forum.heroiclabs.com/u/Ahmadrezadl)\
**Post date:** [January 20, 2024, 10:12am UTC](https://forum.heroiclabs.com/t/wrong-rank-for-owner-id/4898/2 "2024-01-20T10:12:15Z")

</div>

Also, this is legendary3 leaderboard list in nakama console:

 ![legendary3](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/2X/b/b776af6b99029e0e94a8019f2922ca3ef20a0040.png)

---

<div class="post-metadata">

**Author:** ![novabyte](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/novabyte/32/1324_2.png) [@novabyte](https://forum.heroiclabs.com/u/novabyte)\
**Post date:** [January 20, 2024, 1:20pm UTC](https://forum.heroiclabs.com/t/wrong-rank-for-owner-id/4898/3 "2024-01-20T13:20:03Z")

</div>

@Ahmadrezadl What version of Nakama server are you using?

---

<div class="post-metadata">

**Author:** ![Ahmadrezadl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/ahmadrezadl/32/1087_2.png) [@Ahmadrezadl](https://forum.heroiclabs.com/u/Ahmadrezadl)\
**Post date:** [January 20, 2024, 2:28pm UTC](https://forum.heroiclabs.com/t/wrong-rank-for-owner-id/4898/5 "2024-01-20T14:28:20Z")

</div>

Hello dear novabyte  
Sorry for not mentioning that  
I’m using nakama 3.19.0  
Should I upgrade to 3.20?

---

<div class="post-metadata">

**Author:** ![Ahmadrezadl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/ahmadrezadl/32/1087_2.png) [@Ahmadrezadl](https://forum.heroiclabs.com/u/Ahmadrezadl)\
**Post date:** [January 21, 2024, 9:14pm UTC](https://forum.heroiclabs.com/t/wrong-rank-for-owner-id/4898/6 "2024-01-21T21:14:46Z")

</div>

More users are encountering this issue. Almost everyone’s rank is being displayed incorrectly on the leaderboards.  
Should I use direct query to database for hot fix?
