frozenpandaman / s3s

Successor to splatnet2statink. Takes battle data from the SplatNet 3 app and uploads it to stat.ink!
https://github.com/frozenpandaman/s3s/wiki
GNU General Public License v3.0
394 stars 72 forks source link

f token generation error #181

Closed wonderbrian closed 3 months ago

wonderbrian commented 3 months ago

Don't see any errors with https://status.imink.app

This is a fresh install on a new device


$ python s3s.py -r
Generating new config file.
s3s v0.6.5
stat.ink API key: [redacted]
Default locale is en-US. Press Enter to accept, or enter your own (see readme for list).

Blank token(s).          
Please log in to your Nintendo Account to obtain your session_token.

Make sure you have read the "Token generation" section of the readme before proceeding. To manually input your tokens instead, enter "skip" at the prompt below.

Navigate to this URL in your browser:
[redacted]
Log in, right click the "Select this account" button, copy the link address, and paste it below:
[redacted]

Wrote session_token to config.txt.
Attempting to generate new gtoken and bulletToken...
Error during f generation:
{
  "reason": "Something went wrong.",
  "error": true
}```
Scro-mx commented 3 months ago

I have the same concern for my side

`s3s v0.6.5 Validating your tokens...

The stored tokens have expired. Attempting to generate new gtoken and bulletToken... Error during f generation: { "reason": "Something went wrong.", "error": true }`

And the problem is the same for my other members of the Team to whom I upload their game

tugofwardolphin52 commented 3 months ago

I'm also having this same issue for the last 9 hours. I've been checking the site's status and it hasn't indicated that anything was down.

Awia001 commented 3 months ago

For whatever reason, the api call in call_f_api is returning a 500 at the moment. The actual error you're seeing is a KeyError raised by the this section of code in iksm.py:490

api_response = requests.post(f_gen_url, data=json.dumps(api_body), headers=api_head)
resp = json.loads(api_response.text)

f = resp["f"]

The phone app is still working for me so it's possible Nintendo have altered the api flow?

frozenpandaman commented 3 months ago

This does seem to be an imink API issue. The status page shows 0% uptime even though the graph is green:

Switching to a different API by replacing the URL in config.txt with https://nxapi-znca-api.fancy.org.uk/api/znca/f seems to resolve the issue for now, so let's wait for Jone to get back to me/others about what may be up. But that workaround is how you can get the script working again for now (of course, acquiring & inputting tokens manually always works too).

frozenpandaman commented 3 months ago

It's been fixed (as of a few hours ago!)