giorgi-o/SkinPeek

Fetching /nightmarket and /shop fails with `TypeError: Cannot read properties of null (reading 'split')`

tylernguyen opened this issue · 5 comments

Hi,

/nightmarket command is failing on the latest Docker image. /shop is also failing with the same error.

Extended logs below,

 TypeError: Cannot read properties of null (reading 'split')
    at decodeToken (file:///usr/app/misc/util.js:461:34)
    at processAuthResponse (file:///usr/app/valorant/auth.js:264:18)
    at redeemCookies (file:///usr/app/valorant/auth.js:359:24)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async queueCookiesLogin (file:///usr/app/valorant/authQueue.js:63:38)
    at async refreshToken (file:///usr/app/valorant/auth.js:373:20)
    at async authUser (file:///usr/app/valorant/auth.js:97:12)
    at async getShop (file:///usr/app/valorant/shop.js:21:25)
    at async getNightMarket (file:///usr/app/valorant/shop.js:103:18)
    at async fetchNightMarket (file:///usr/app/valorant/shopManager.js:41:18)

Hey Tyler,

Long shot but have you checked if the command was executed by someone who has their auth (found in \data\users\<discord user ID>.json) as null? I have noticed a similar issue while running my instance too, pretty sure once the user relogs, everything should be fine. Weird bug though.

Hello, I am facing this same issue. It tells me there is an issue trying to fetch skin data.

Hey Tyler,

Long shot but have you checked if the command was executed by someone who has their auth (found in \data\users\<discord user ID>.json) as null? I have noticed a similar issue while running my instance too, pretty sure once the user relogs, everything should be fine. Weird bug though.

I've checked this and its not the problem for me.

The error I receive (shown below) is what happens immediately when I type in "node skinpeek.js" into terminal.

The error:
There was an error while trying to fetch skin data!
TypeError: Cannot read properties of null (reading 'split')
at decodeToken (file:///C:/Users/user/Desktop/SkinPeek-master/misc/util.js:461:34)
at processAuthResponse (file:///C:/Users/user/Desktop/SkinPeek-master/valorant/auth.js:260:18)
at redeemCookies (file:///C:/Users/user/Desktop/SkinPeek-master/valorant/auth.js:353:24)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async queueCookiesLogin (file:///C:/Users/user/Desktop/SkinPeek-master/valorant/authQueue.js:63:38)
at async refreshToken (file:///C:/Users/user/Desktop/SkinPeek-master/valorant/auth.js:366:20)
at async authUser (file:///C:/Users/user/Desktop/SkinPeek-master/valorant/auth.js:97:12)
at async getPrices (file:///C:/Users/user/Desktop/SkinPeek-master/valorant/cache.js:157:25)
at async getPrices (file:///C:/Users/user/Desktop/SkinPeek-master/valorant/cache.js:148:29)
at async Promise.all (index 0)

iwa commented

hey! i had the same issue until this morning, i simply re-logged in and it worked again
note that i edited my riot password and then it broke, so that might be the reason! hope that helped

Not sure what the underlying issue is. But re-logging does seem to have fixed the bug.