giorgi-o / SkinPeek

Awesome Valorant Discord bot to see your daily shop, night market, battlepass progression, and much more
GNU General Public License v3.0
195 stars 86 forks source link

Cannot read properties of undefined (reading 'SingleItemOffers') #111

Closed xMasa-1022 closed 2 months ago

xMasa-1022 commented 2 months ago

image

prepsyched commented 2 months ago

Same issue here.

0|skinpeek  | Assertion failed: Valorant skins offers code is 404! {
0|skinpeek  |   statusCode: 404,
0|skinpeek  |   headers: {
0|skinpeek  |     date: 'Thu, 23 May 2024 06:10:54 GMT',
0|skinpeek  |     'content-type': 'application/json',
0|skinpeek  |     'content-length': '104',
0|skinpeek  |     connection: 'close',
0|skinpeek  |     vary: 'Origin',
0|skinpeek  |     'cf-cache-status': 'DYNAMIC',
0|skinpeek  |     server: 'cloudflare',
0|skinpeek  |     'cf-ray': '8882e2b4da2f4af3-HYD'
0|skinpeek  |   },
0|skinpeek  |   body: '{\n' +
0|skinpeek  |     '    "httpStatus":  404,\n' +
0|skinpeek  |     '    "errorCode":  "RESOURCE_NOT_FOUND",\n' +
0|skinpeek  |     '    "message":  "resource not found"\n' +
0|skinpeek  |     '}'
0|skinpeek  | }
0|skinpeek  |  Error adding shop stats!
0|skinpeek  |  TypeError: Cannot read properties of undefined (reading 'SingleItemOffers')
0|skinpeek  |     at getShop (file:///home/ubuntu/SkinPeek/valorant/shop.js:56:52)
0|skinpeek  |     at processTicksAndRejections (node:internal/process/task_queues:96:5)
0|skinpeek  |     at async getOffers (file:///home/ubuntu/SkinPeek/valorant/shop.js:79:18)
0|skinpeek  |     at async fetchShop (file:///home/ubuntu/SkinPeek/valorant/shopManager.js:15:16)
0|skinpeek  |     at async Client.<anonymous> (file:///home/ubuntu/SkinPeek/discord/bot.js:671:37)
0|skinpeek  |  {
0|skinpeek  |   httpStatus: 404,
0|skinpeek  |   errorCode: 'RESOURCE_NOT_FOUND',
0|skinpeek  |   message: 'resource not found'
0|skinpeek  | }
0|skinpeek  |  TypeError: Cannot read properties of undefined (reading 'SingleItemOffers')
0|skinpeek  |     at addShopCache (file:///home/ubuntu/SkinPeek/valorant/shop.js:239:47)
0|skinpeek  |     at getShop (file:///home/ubuntu/SkinPeek/valorant/shop.js:64:5)
0|skinpeek  |     at processTicksAndRejections (node:internal/process/task_queues:96:5)
0|skinpeek  |     at async getOffers (file:///home/ubuntu/SkinPeek/valorant/shop.js:79:18)
0|skinpeek  |     at async fetchShop (file:///home/ubuntu/SkinPeek/valorant/shopManager.js:15:16)
0|skinpeek  |     at async Client.<anonymous> (file:///home/ubuntu/SkinPeek/discord/bot.js:671:37)
giorgi-o commented 2 months ago

Does #112 fix it?

prepsyched commented 2 months ago

@giorgi-o Yes. That fixes this.