zayKenyon / VALORANT-rank-yoinker

A Python app which retrieves the VALORANT rank and players' equipped skins during a match

Home Page:https://zayKenyon.github.io/VALORANT-rank-yoinker/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crashes sometimes when returning to lobby

Simpag opened this issue · comments

Crashes sometimes when entering the main menu after a game. Seems to be a simple issue, here's part of the log:

[2023.06.23-22.03.31] new game state: MENUS
[2023.06.23-22.03.31] getting new MENUS scoreboard
[2023.06.23-22.03.31] retrieved party members: [{'Subject': 'db33a9ad-e136-54a0-85ff-1e8c5e1c1d82', 'PlayerIdentity': {'AccountLevel': 249}}]
[2023.06.23-22.03.31] Traceback (most recent call last):
File "main.py", line 561, in
File "D:\a\VALORANT-rank-yoinker\VALORANT-rank-yoinker\src\names.py", line 25, in get_names_from_puuids
File "D:\a\VALORANT-rank-yoinker\VALORANT-rank-yoinker\src\names.py", line 17, in get_multiple_names_from_puuid
File "D:\a\VALORANT-rank-yoinker\VALORANT-rank-yoinker\src\names.py", line 17, in
TypeError: string indices must be integers

Here's the response that causes the crash:

player puuids: ['db33a9ad-e136-54a0-85ff-1e8c5e1c1d82']
Response: {'httpStatus': 400, 'errorCode': 'BAD_CLAIMS', 'message': 'Failure validating/decoding RSO Access Token'}

I found that refreshing the token in requestsV.py in the get_headers method seems to fix the issue, don't know if it's a good solution or just a bandaid. I submitted a pull request for the changes. #150