HypixelDev / PublicAPI

Official Java implementation of the Hypixel Public API.
https://api.hypixel.net
MIT License
535 stars 151 forks source link

Future date showing in guild member expHistory #145

Closed Kuba314 closed 3 years ago

Kuba314 commented 4 years ago

Screenshot from 2019-11-01 21-07-14_edit

Today is 1.11.2019 and I don't know how this happened. Is this a bug in the API or a wrong time and date of that user's client?

Edit: ALRIGHT... I swear I didn't edit this screenshot other that that red line. It somehow fixed itself? It happened to me like 3 times and now nothing? Edit 2: Ok, now I noticed that the length of the expHistory is 6, not seven as it is normal. Is this a timing bug in the API? Sending the response before it's complete? Edit 3: Found 2 players again. But this time the expHistory is 7 days again. Also they are different players Screenshot from 2019-11-01 21-40-56 Screenshot from 2019-11-01 21-41-50

Edit 4: The people with "expHistory" shorter than 7 changes. But not per every request. Screenshot from 2019-11-10 20-11-45 Screenshot from 2019-11-10 20-12-28

Kuba314 commented 4 years ago

I wrote a python script that shows when there are any errors of this type:

import json, requests

def get_errors(key, guild_name):
    txt = requests.get('https://api.hypixel.net/guild?key={}&name={}'.format(key, guild_name)).text
    d = json.loads(txt)
    if not d['success']:
        print(d['cause'])
    elif not d['guild']:
        print('guild does not exist')
    for member in d['guild']['members']:
        if len(member['expHistory']) < 7:
            print(member['uuid'], len(member['expHistory']), member['expHistory'])
Kuba314 commented 4 years ago

I also found out that sometimes the whole 'expHistory' dictionary is just straight up empty.

Kuba314 commented 4 years ago

Update: still a thing. 2020-04-31 is sometimes in the response expHistory

Kuba314 commented 4 years ago

Is there any reason this bug still exists? Can't you guys find it or is it like this for a reason? Or do you focus more on updating skyblock than on fixing api bugs?

pownsgg commented 4 years ago

@Kuba314 This issue indeed is still occuring, I created this thread on the Hypixel forums earlier: https://hypixel.net/threads/guild-api-gexp-for-certain-date-missing-for-players.2903158/

Sometimes data for a day is either missing or completely incorrect :/

ugcodrr commented 3 years ago

imagine hypixel fixed this

Kuba314 commented 3 years ago

Oh look, both errors in one member's gexpHistory image

Kuba314 commented 3 years ago

Guess what happened on 2020-09-01? That's right! It tried showing 2020-08-31, but failed and showed 2020-09-31 instead! image

TheNullicorn commented 3 years ago

Based on your screenshots alone, it looks like the issue with incorrect dates is only ever off by +1 month. Until this is fixed (if ever), you could just subtract one month whenever it's out of range, and default to 0 gexp for missing dates.

Plancke commented 3 years ago

Incorrect date issue should be fixed, missing values frequency should also have reduced significantly though we'd rather show the guild response with a missing value than fail completely. Just handle missing data as 0 and don't assume it always has 7 days in there.