frozenpandaman / splatnet2statink

Takes battle data from the SplatNet 2 app and uploads it to stat.ink
https://github.com/frozenpandaman/splatnet2statink/wiki
347 stars 61 forks source link

Unable to generate new cookie with 1.6.0 update #130

Closed zvandermeer closed 3 years ago

zvandermeer commented 3 years ago

Today I updated to 1.6.0, and it seems that I can't generate a new cookie. When I launch the software I get the following error:

splatnet2statink v1.6.0
Blank cookie.
Attempting to generate new cookie...
Error from the splatnet2statink API:
{
  "error": "Too many requests"
}
Error from Nintendo (in Account/Login step):
{
  "status": 0,
  "result": {
    "user": {
      "id": 5188712935981056,
      "name": "Vando",
      "imageUri": "https://cdn-image-e0d67c509fb203858ebcb2fe3f88c2aa.baas.nintendo.com/1/ec7c05931b1dc1f9",
      "supportId": "1529-1097-5686-1586-7056-3",
      "membership": {
        "active": true
      }
    },
    "webApiServerCredential": {
      "accessToken": "[removed]",
      "expiresIn": 7200
    },
    "firebaseCredential": {
      "accessToken": "",
      "expiresIn": 3600
    }
  },
  "correlationId": "b46493d4-8397006e"
}

Sometimes I will only see this error, which just seems like a shorter version of the previous error:

splatnet2statink v1.6.0
Blank cookie.
Attempting to generate new cookie...
Error from the splatnet2statink API:
{
  "error": "Too many requests"
}

I tried a clean install of the software, before this clean install it said "outdated cookie" instead of "blank cookie". Note that it also did have a very long string under "accessToken", but I didn't know if that was sensitive info or not so I just removed it. It doesn't seem vital to the error however. Nothing was in the "accessToken" field under "firebaseCrediential" though, so I didn't remove anything from there. After trying this several times, it no longer gives me an error but instead says:

splatnet2statink v1.6.0
Blank cookie.
Attempting to generate new cookie...
Too many errors received from the splatnet2statink API. Further requests have been blocked until the "api_errors" line is manually removed from config.txt. If this issue persists, please contact @frozenpandaman on Twitter/GitHub for assistance.

I am using Python 3.9.5 on Windows 10 build 19043.1288.

frozenpandaman commented 3 years ago

Hiya,

I think at the moment you tried the API was just getting hammered particularly hard – I checked the logs and it seems one person's autorun script went haywire for a few days after the update, and you might have been trying to generate a new token then.

There's no error message that splatnet2statink throws that tells you "outdated cookie" so I'm not sure what you mean by that.

Anyway, cookie generation is still working for me now – just delete delete the "api_errors" line from your config.txt (or just delete the whole file and start from scratch) and you should be good to go.

zvandermeer commented 3 years ago

Yup, its all working for me now. Thank you very much!

I'm not sure exactly at what point I was "outdated cookie", but I'll reply to this thread if I happen to see it again.