Scighost / Starward

Game Launcher for miHoYo - 米家游戏启动器
https://starward.scighost.com
MIT License
3.46k stars 165 forks source link

[Enhancement] Authkey Timeout #969

Open kokoropie opened 2 months ago

kokoropie commented 2 months ago

Checklist

Summary

sometimes (don't know why), I can't get the records even opened history before

Solution or Design

after researching some other tool, i have a solution without clear cache file (need to close game -> delete file -> open game again -> open history, nahhhh, too wasting time) instead of just find the last pattern URL, we need to find the last URL with response "retcode" == 0 and if all URL still "authkey timeout", that's time, we need to clear it

Eric-Joker commented 2 months ago

The Authkey contained in the opened link will expire after 24h.

kokoropie commented 2 months ago

but i just open it and (sometime) it still timeout i have checked the cache file, latest authkey is timeout, but an earlier one works

Eric-Joker commented 2 months ago

Maybe it's because the game knows in some other way that there are no new gacha records so it didn't create a new authkey?

kokoropie commented 2 months ago

that's not how the authkey works, i don't know why, but sometime, yeah, it's just it, cache file just has a new useless authkey

Lightczx commented 2 months ago

Maybe it's because the game knows in some other way that there are no new gacha records so it didn't create a new authkey?

It always creates a new authkey, the reason why

but i just open it and (sometime) it still timeout

is because the chromium cache entry doesn't always inserted sequencially, sometimes if a expired entry was found and large enough for the new one, the existed entry will be overwritten and no new entry will created.

And most of our tool only check the last occurrence, and not the latest entry, so such thing can happen from time to time.

kokoropie commented 2 months ago

on starrailstation, they try checking all authkey, then which works, they use it