Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid token #127

Open
rurikrok opened this issue Feb 22, 2024 · 13 comments
Open

Invalid token #127

rurikrok opened this issue Feb 22, 2024 · 13 comments

Comments

@rurikrok
Copy link

Traceback (most recent call last):
File "cli.py", line 88, in update
File "api_init_.py", line 176, in getSelf
File "api_init_.py", line 189, in getFriends
File "api_init_.py", line 354, in populateList
File "api_init_.py", line 351, in populateList
KeyError: 'result'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "api_init_.py", line 165, in updateLogin
KeyError: 'result'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "app.py", line 840, in
File "app.py", line 354, in selfService
File "app.py", line 489, in changeState
File "app.py", line 486, in changeState
File "cli.py", line 94, in update
File "api_init_.py", line 167, in updateLogin
Exception: Failure with authorization: 'result'
Login returns {'status': 9403, 'errorMessage': 'Invalid token.', 'correlationId': 'ee385f01-6e447934'}

Deleting private.txt and updating token doesn't help

@HotaruBlaze
Copy link
Contributor

HotaruBlaze commented Feb 22, 2024

  1. Delete private.txt & tempToken.txt from Documents/NSO-RPC (It's fine if one or both of those files are missing already)
  2. Grab the Pre-release build of NSO-RPC from my Merged PR (the required code isnt in a official release yet)
    https://github.com/HotaruBlaze/NSO-RPC/releases/tag/%23115PR-development

Edit: Their was some issues with the above build and generating/renewing tokens, below is a new simpler fix that should not have any of those issues, however is short term.
https://github.com/HotaruBlaze/NSO-RPC/releases/tag/n2.8.1

3. Open settings.txt and add the following , "overrideVersion": "2.8.1".

NOTE: For simplicify, you can replace the whole file with the following.
{"dark": true, "startInSystemTray": false, "startOnLaunch": false, "smallImagePFP": true, "friendcode": "", "overrideVersion": "2.8.1"}

  1. Now login as normal and it should work!

What happened?

Nintendo have updated the app version and the F token API we use is currently generating bad tokens with 2.9.0, however at this time accepting 2.8.1. After a couple of days if not less, this shouldn't be required again and if you have token issues, just either remove , "overrideVersion": "2.8.1" or just delete and recreate the settings.txt file. Download the latest official build of NSO-RPC

@rurikrok
Copy link
Author

Thank you!

@luni-moon
Copy link

HotaruBlaze/NSO-RPC@%23115PR-development (release)

This is causing an infinite login loop and silent crash of the application on Windows 10.

@HotaruBlaze
Copy link
Contributor

I'm aware theirs an issue where people need to de-delete their token files and login again, as it seems to be broken.

Silent crashing shouldn't be a thing unique to my build, unless the silent crashing is happening when trying to make the new token

@luni-moon
Copy link

luni-moon commented Feb 24, 2024

I'm aware theirs an issue where people need to de-delete their token files and login again, as it seems to be broken.

Silent crashing shouldn't be a thing unique to my build, unless the silent crashing is happening when trying to make the new token

It's not even creating the tokens after logging in again, that's the issue

EDIT

After 6 attempts, it finally registered the link as valid

@HotaruBlaze
Copy link
Contributor

HotaruBlaze commented Feb 24, 2024

So its most likely a race condition, maybe see if u can see a pattern in logs.txt

Edit

I'm gonna make a dumber fix for the time being

@luni-moon
Copy link

luni-moon commented Feb 24, 2024

So its most likely a race condition, maybe see if u can see a pattern in logs.txt

Yeah, it worked after a seemingly random attempt count using the "select this account" link every time. Seen here:
image

I can also paste logs if needed.

@HotaruBlaze
Copy link
Contributor

HotaruBlaze commented Feb 24, 2024

I've got a new build generating that will override the version directly and does not depend on the overrideVersion logic and shouldn't suffer from the above issues and updated the above post with the new details

Please try it a couple of times and tell me if u still get those kinds of loops.

Edit: Remember to delete the token files during testing

@luni-moon
Copy link

I've got a new build generating that will override the version directly and does not depend on the overrideVersion logic and shouldn't suffer from the above issues and updated the above post with the new details

Please try it a couple of times and tell me if u still get those kinds of loops.

Edit: Remember to delete the token files during testing

Will do!

@luni-moon
Copy link

luni-moon commented Feb 24, 2024

I've got a new build generating that will override the version directly and does not depend on the overrideVersion logic and shouldn't suffer from the above issues and updated the above post with the new details

Please try it a couple of times and tell me if u still get those kinds of loops.

Edit: Remember to delete the token files during testing

Tested a couple times, deleting the tempToken.txt and private.txt both times, and both worked off the bat.

@HotaruBlaze
Copy link
Contributor

HotaruBlaze commented Feb 24, 2024

Both builds didn't exhibit issues for me, but it was always suspected the logic could be faulty. Just assumed it would only misfire once as that's the only time I saw a token error.

I'll just assume the new build is good, no real reason for it not to be until 2.8.1 tokens aren't valid anymore

@luni-moon
Copy link

luni-moon commented Feb 26, 2024

Both builds didn't exhibit issues for me, but it was always suspected the logic could be faulty. Just assumed it would only misfire once as that's the only time I saw a token error.

I'll just assume the new build is good, no real reason for it not to be until 2.8.1 tokens aren't valid anymore

Have the 2.8.1 keys become invalidated? It is throwing this error again.

@HotaruBlaze
Copy link
Contributor

the API that NSO-RPC uses for f tokens got updated earlier today to support 2.9.0. I just tested the official build and it works again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants