Dismiss Notice
Wynncraft, the Minecraft MMORPG. Play it now on your Minecraft client at (IP): play.wynncraft.com. No mods required! Click here for more info...

Problem with statistics

Discussion in 'Questions' started by FreakTime, Dec 12, 2022.

Thread Status:
Not open for further replies.
  1. FreakTime

    FreakTime Well-Known Adventurer CHAMPION

    Messages:
    5
    Likes Received:
    2
    Trophy Points:
    45
    Minecraft:
    when I enter my nickname to check the statistics, 2 nicknames appear with my skin, but when I go to them, a completely different player is shown there?
     
    luckeyLuuk likes this.
  2. creature

    creature Uncorrupt, so possibly serving Dern VIP

    Messages:
    797
    Likes Received:
    1,448
    Trophy Points:
    148
    Minecraft:
    Now there's a weird database-related bug.
    upload_2022-12-14_10-6-7.png
    The two names that show up on the official stats page are likely from you and this other player that used to have the name you currently have. It is also their skin that shows up for both names.

    My guess is that Hiko_Lea logged onto wynncraft at the time they were named Freaktime but hasn't since they changed their name. Therefore the name is not updated in the wynncraft database.

    But once you click on one of the names, rather than going to the stats page for the name generated. Code-wise it likely checks for a stats page of a player with that name. Which normally is no difference at all because in theory there should never be two players in the database with the same name. However. In this case, because the other player logged into wynncraft before you did, their name appears in the database first and because once the code finds a name it takes you to the stats page related to that name without checking for further duplicates, their stats page gets shown for both links. Even though yours should show up for one of them.

    Assuming I am right, fixing this bug on wynncraft's end would likely quite a rework of the code to use UUIDS (A UUID is basically a name for each account that is different for each account and can not be changed.) instead of names. I doubt that is going to happen.
    I think that if Hiko_Lea went online in wynncraft, the database would get updated the player with the UUID of Hiko_Leo and their name as Freaktime would get overridden into Hiko_Lea. So than you would be the only person named Freaktime.
    If you changed your name again, you likely would be able to see your stats page.



    A very weird bug that came from someone logging into wynn with your name, changing their name, not logging back into wynn after they changed their name, and you using that name.
     
  3. FreakTime

    FreakTime Well-Known Adventurer CHAMPION

    Messages:
    5
    Likes Received:
    2
    Trophy Points:
    45
    Minecraft:
    does it make sense to try to contact the developers to erase the information about the old player ?
     
  4. P0ke

    P0ke Wynntils Dev CHAMPION

    Messages:
    495
    Likes Received:
    642
    Trophy Points:
    91
    Minecraft:
    wynncraft would not function as a minecraft server if it did not use uuids. the stats page searches by name only and that's what's causing this issue, but searching by uuid is very possible: https://www.wynndata.tk/stats/player/9e152fe3-ce34-45e4-9b0b-d2769c8c0546 (wynndata is extremely outdated, sadly, so it can't display class stats correctly)

    i could've sworn the official stats page had a way to search by uuid, but i either can't figure it out or i'm misremembering

    for the record, wynn could fix this relatively easily by using the API lookup they already have before loading a player's stats
     
    Last edited: Dec 15, 2022
    creature and lemonalade like this.
  5. creature

    creature Uncorrupt, so possibly serving Dern VIP

    Messages:
    797
    Likes Received:
    1,448
    Trophy Points:
    148
    Minecraft:
    I ment that when you click the link on the official stats search page, rather than that link having a UUID in the webpage request it goes to, it gives a playername to the page it goes to, and that page looks up the UUID of the playername to get further information. When looking up the UUID, it gives back the first UUID it finds. (or it translates the name to UUID in that page, that order does not matter)

    I think the specific problem is that
    GET /player/{username}/uuid
    returns the first UUID it finds for a username.

    I'm assuming everything done in the wynncraft server itself uses the UUID directly of course.

    If that was the issue, only one name would come up when searching on the website (right?). However, two different names come up. But both links head towards the same page for the same player. Which I think indicates that the problem lies with the information the link gives to the next webpage (giving only the name to the stats page) rather than the search page.
    The search page already recognises two different entries in the database but assuming GET /player/{username}/UUID does not work as intended for this case, I don't know if they can easily make it send the correct UUID to the stats page.
    ________________________________
    Definitely makes sense to do a bug report. Maybe ask if the official stats page has a way to lookup via UUID (like Poke said, yours is 9e152fe3-ce34-45e4-9b0b-d2769c8c0546)

    If you want to bother learning how to use the API you could do that yourself. Maybe someone already made something.

    Trying to delete the old players' stats opens a whole other can of worms, would cause a lot of problems if the player ever returns. I highly doubt that will happen.

    Another way to do fix this might be to get in contact with Hiko_Lea and ask them to log in to wynncraft for a bit so their database entry gets updated.
     
    Last edited: Dec 16, 2022
  6. P0ke

    P0ke Wynntils Dev CHAMPION

    Messages:
    495
    Likes Received:
    642
    Trophy Points:
    91
    Minecraft:
    this is not the case because the stat page does not even use this API route - you can see this for yourself with browser debug tools. it's using a legacy api lookup route, which returns a list of usernames/guild names and nothing else

    i'm actually not sure how the uuid endpoint handles usernames with multiple matches; it's case sensitive, so Freaktime vs FreakTime can't actually conflict anyway
    i must say i admire your confidence in speaking at length about things you don't understand
     
Thread Status:
Not open for further replies.