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

Account creation sometimes fails, usually on mobile #41

Open
shutterbug2000 opened this issue Sep 20, 2022 · 17 comments
Open

Account creation sometimes fails, usually on mobile #41

shutterbug2000 opened this issue Sep 20, 2022 · 17 comments

Comments

@shutterbug2000
Copy link

No description provided.

@gitlimes
Copy link
Member

The exact error appears to be Username contains invalid characters

@Gandalf1783
Copy link

My account creation on Nintendo 3DS XL fails too.
Error-Code is 022-2402.
I got the message in the privacy policy about the christmas-beta and my nintendo used the pretendo servers. (Confirmed via looking up DNS-Lookups & TCP/TLS connections of 3DS through Wireshark)

Is this the same error?
If not, I would open a new issue.

@jonbarrow
Copy link
Member

That error is thrown when trying to register on the website using a username with invalid characters. The following regex is used to check the username: /^[\w\-\.]*$/gm

This does sometimes fail with valid usernames however and only at random times. I have no idea why this is at the moment. I have seen a username fail once and then work again after trying again

@Gandalf1783
Copy link

Could this be due to different Unicode Versions or ASCII being used as the charset?

@jonbarrow
Copy link
Member

The only thing I was able to figure out is it seems to happen most often when using the tab key to navigate the menu

@Thesola10
Copy link

incidentally, I'm getting 022-2571 on a regular 3DS when trying to log into my PNID created through the website. Any idea why that could be?

@Williammal21
Copy link

It's the same thing happens to my 3DS.

@BlackSealSix
Copy link

Same problem here.

@Squaduck
Copy link

Squaduck commented Apr 9, 2024

Same problem here on 3ds. Are you still using that regex btw? it can match a zero-length string when you use a '*', so you should use a '+' instead.

@Gandalf1783
Copy link

I haven't tried it since, but I could in the coming days, If i remember it...

@Beethoven-n
Copy link

this is such a weird issue.
you get an error code 022-2402 until you set your system's locale to spanish and then it just works

@Gandalf1783
Copy link

Gandalf1783 commented Apr 12, 2024

Can you try to MITM your 3ds and try to decrypt the request?
I have the feeling that there is some issue in regards to the string format, maybe some other locale setting results in special characters?
Maybe some Unicode-related bug?

EDIT:
I had a account server setup previously, could we get one of those up and running and check the output and add some debugging messages, including the name?
Otherwise I think we'll have to do some regex debugging.

@Squaduck
Copy link

Squaduck commented Apr 12, 2024

I'll try to get some packet captures later. The pretendo packet capture tool thing should work, right? Worst case, I can set up some jank, but I think it'd be encrypted. I'll also see if I could set up a server to get some logs.

I have no clue how this project works, but I don't think the regex would be an issue. There's already a minimum amount of characters, so the regex shouldn't need to work about that. Though it shouldn't hurt to try changing it.

UPDATE: Got packet capture working via hotspot. Now I'm going to try to make a local server.

@Gandalf1783
Copy link

I think it should work with the pretendo method.

I specifically said thats its a good idea to debug the regex since some seem to be able to create an account without issues.

This would imply that if the regex is working, some of the hundred DS Systems firmware would work correctly (aka. actually register), and a handful of the DS Systems would misbehave and get this error back.

On the other hand, it seems to be too rare of an issue that it actually is the regex.

@Squaduck
Copy link

I think it should work with the pretendo method.

I tried HokakuCTR and it just crashed.

I've got a local server set up and (hopefully) working, but I've got no idea how to make my 3DS connect to it. Any advice would be greatly appreciated since it sounds like you've done this before

I had a account server setup previously

@Gandalf1783
Copy link

Ideally you have a domain or domain server setup yourself.

Pihole or some local router overrides should do the trick.

For a local all services on one machine, you need a reverse proxy. I used Apache2. Generate SSLKeys, and setup the different subdomains of the servers (I am unsure which are needed, I think nasc.nintendowifi.com and others) to the respective applications. As in nasc. would e.g. be redirected to port 8726 or whatever the pretendo application is using.

As soon as you have this, all requests directed towards a certain domain on port 80 or 443 should be redirected to the proper service/server with the correct port.

If you have a custom domain and/or cannot override the nintendo.com domains, you need your local dns server to respond to (e.g.) nasc.owndomain.com and you then need to compile a custom version of the 3ds patch application, where you insert your own custom domains instead of the ones provided by pretendo.

I am away for the next 3-4 days, if you need further help feel free to comment.
Last time I had a local pretendo setup was over 1,5 years ago. It might be that many aspects have changed, but I can definitely take a look at running these myself and help you with debugging :)

@KEEGUNATOR2
Copy link

For anyone stumbling across this recently looking for help with the 022-2402 error code when creating an account, setting your systems language to Spanish works for a lot of people, including myself. I tried twice to create an account on my 3DS XL, both times giving me error code 022-2402, but when I switched my console language to spanish and input the exact same info, it worked flawlessly. (Your able to change it back to english right after account creation, don't worry)

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

10 participants