quer / the-steam-awards

Steam multi account module/event (get updates when event for steam)
95 stars 13 forks source link

(node:4444) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'sort' of undefined #27

Closed aVitaliy closed 2 years ago

aVitaliy commented 2 years ago

I'm having a problem with steamAwardNominateGame_v2.js

image

quer commented 2 years ago

the happen on json.response.games.sort(function(a, b){return b.playtime_forever - a.playtime_forever});

that can only fail, if the accound do not have any games. Or if the account is not public. so the global apikey, do not have access to the games that on that account.

if you have the api key, foreach account you can add it to the config, and add so it use the fetch for each account, and not the top apikey. read more here https://github.com/quer/the-steam-awards/discussions/17#discussioncomment-305665

aVitaliy commented 2 years ago

I set all flags to public and then everything worked perfectly.