danielwerg / r6api.js

🍫 Node.js wrapper around Rainbow Six Siege APIs
https://npm.im/r6api.js
MIT License
110 stars 19 forks source link

Error: 401 Stripped in prod for any console stats #99

Open itzaidan opened 1 year ago

itzaidan commented 1 year ago

All of a sudden within the last couple weeks sometime, any time I try to get any stats for a console player it just errors out saying

Error: 401 Stripped in prod
    at handleResponse (C:\DiscordBots\tombbot-esm-rewrite\node_modules\r6api.js\dist\fetch.js:38:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.execute (file:///C:/DiscordBots/tombbot-esm-rewrite/commands/stat-track/r6stats.js:34:24)
    at async Object.execute (file:///C:/DiscordBots/tombbot-esm-rewrite/events/interactionCreate.js:27:5)

R6API.findByUsername() works fine and gets the user but anything other than that like R6API.getStats() and everything else errors out, I've tried using the Player.id and Player.userId but both throw the same error.

R6API.getUserSeasonalv2() works for console users but all stats show as 0 for platformCrossplay: 'console', boardSlug: 'ranked' as well.

Might have something to do with cross-play, progression between PlayStation and Xbox now?

danielwerg commented 1 year ago

Try to set ubiAppId to e3d5ea9e-50bd-43b7-88bf-39794f4e3d40 with setUbiAppId before initializing R6API.

danielwerg commented 1 year ago

As for this:

R6API.getUserSeasonalv2() works for console users but all stats show as 0 for platformCrossplay: 'console', boardSlug: 'ranked' as well.

I'm not sure exactly, I haven't done any testing for consoles. Will get back to you if I figure out anything.

itzaidan commented 1 year ago

Try to set ubiAppId to e3d5ea9e-50bd-43b7-88bf-39794f4e3d40 with setUbiAppId before initializing R6API.

Got ya I'll test it out in just a bit and let you know!

itzaidan commented 1 year ago

Try to set ubiAppId to e3d5ea9e-50bd-43b7-88bf-39794f4e3d40 with setUbiAppId before initializing R6API.

Hmm still seem have the same issue, I even tried the old ubiAppId 3587dcbb-7f81-457c-9781-0e3f29f6f56a but still having the same error.