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

Add Pretendo Support #28

Closed
wants to merge 44 commits into from
Closed

Add Pretendo Support #28

wants to merge 44 commits into from

Conversation

Preloading
Copy link
Contributor

@Preloading Preloading commented Apr 28, 2024

This is a pretty massive PR, that should (mostly) add Pretendo support. This should resolve #10 and it should resolve #23. I am so so so glad that this mostly done.

Some other modifications:

  • Updated NintendoClients to latest, but SQLAlchemy & Flask-SQLAlchemy are still outdated.
  • I probably broke the client, I tried to make it work, but it seemed to inconvenient to set it up, and after someone said it was deprecated, I decided not to test. I believe that it will probably be deprecated, as the web app is much more convenient and easier to use Edit: Decided to test and fixed everything broken with it. Works with nintendo only though.
  • Delete friend from the tables if it no longer has any discord accounts linked to it. (only on deletion from consoles page)
  • A new page which allows you to choose between creating a pretendo account, or nintendo account

Migration Steps

Since this is a pretty massive update, it does require some database changes. I created a handy migration SQL file. MAKE SURE TO BACKUP THE DATABASE BEFORE RUNNING THE FILE!!!, you can't easily revert this, so make sure you have a backup in case if something goes wrong. This should prepare the database for pretendo, but to get it to actually run the pretendo backend, you must use your sacrificial 3ds again, and redump the NEX keys, this time in pretendo mode (you can get into pretendo mode by using Nimbus) You will also need to modify your private.py and public.py according to template.private.py & public.py. You will also need to modify whatever you use to start the backend, to start it twice at the same time with the arguments:

python backend.py -n nintendo
python backend.py -n pretendo
or
python backend.py --network nintendo
python backend.py --network pretendo
whichever is most convenient for you. This should be enough for you to have both Pretendo & Nintendo running! If it's not for some reason, please either comment on this post, or message me on discord (@Preloading)

Oh also, I recommend you do a test of it first, as I do not have the ablility to add activities.write to my thing, so I have no clue whether discord.py works.

Image Gallery
Because I'm proud of doing this
image
image
image

VERY BIG NOTE
This isn't quite functional yet, due to a presumed bug in Pretendo, where NintendoClients hangs the script. I've gotten it to mostly work, to the point of testing for a short period, but it will hang if left running.

Also Jon, in issue #10, it was not as simple as swapping out the url D: (also thank you for the effort you put in pretendo team. Not only did you deal with my stupid questions, and fixing some sorta date time bug which made the code not work, and eventually the bug which prevents this from being finished, thank you for creating and hosting pretendo!)

@Preloading
Copy link
Contributor Author

Please wait for pretendo to fix the bug that hangs it before merging

It seems to be functioning after adding a horrifying fix, to make NintendoClients send ACK after 3170 years. This isn't permanent, but it should be fine till Pretendo fixes the bug that breaks this the code without this hack. So I'm gonna say, unless I find any other app-breaking issues, it should be fine to merge! (finally!)

@Preloading
Copy link
Contributor Author

Preloading commented May 12, 2024

never... mind... it's hanging again

nooooooooooooooooo!

Edit 1: My hack is working again???? wha????

@ndan0
Copy link

ndan0 commented May 18, 2024

Hope this PR getting reviewed. Nintendo network is shut down.
Have you think about making a fork of this and create your own server?

@gllxflr
Copy link

gllxflr commented May 22, 2024

@MCMi460 please merge, most people won't be on Nintendo server because no online games work with it

@Preloading
Copy link
Contributor Author

It looks like the bug that has been breaking this has been fixed, but Pretendo seems to be having some server issues still that affect this a bit, but shouldn't impact usage of this that much

@DFBR1208
Copy link

Soooo, any idea of when will this be merged?

@spotlightishere
Copy link
Collaborator

spotlightishere commented Jun 12, 2024

Soooo, any idea of when will this be merged?

In general, it's not polite to ask for an exact date - open source maintainers have their lives to handle, on top of the work of maintaining and developing projects :)

However, within the NSO-RPC Discord server, @MCMi460 stated they would like to begin reviewing this within the coming weeks.

@DFBR1208
Copy link

Soooo, any idea of when will this be merged?

In general, it's not polite to ask for an exact date - open source maintainers have their lives to handle, on top of the work of maintaining and developing projects :)

However, within the NSO-RPC Discord server, @MCMi460 stated they would like to begin reviewing this within the coming weeks.

Sorry if it sounded rude, just wanted to know about any update on the project so far, thx for replying!!

Copy link
Collaborator

@spotlightishere spotlightishere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good to me!

@wish13yt
Copy link

One quick question (I am not sure how PRs work really). If this PR got approved, why is it still open?

@TwistedTempest
Copy link

One quick question (I am not sure how PRs work really). If this PR got approved, why is it still open?

Once a pull request is tested against the codebase it's supposed to merge with, it can be approved as functional, but still needs to actually be pushed into the codebase by a developer with that level of permissions (which are fairly few and far between in most projects)

@wish13yt
Copy link

Thanks! I'm not that experienced with how GitHub works.

@Preloading
Copy link
Contributor Author

One quick question (I am not sure how PRs work really). If this PR got approved, why is it still open?

It is also technically merged (see 8751376), but it was merged pretty poorly, missing some lines. So i really don't know why it's open

@HotaruBlaze
Copy link

HotaruBlaze commented Jul 14, 2024

It'll most likely get closed when Pretendo support is working and live.

@gllxflr
Copy link

gllxflr commented Jul 16, 2024

@Preloading does that mean it should work then?

@onyxcode
Copy link

really hyped for this!!

Copy link

@QuizzaciousMan QuizzaciousMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines +69 to +70
if network == 1: # If the app starts randomly hanging on Pretendo, try removing this, and the next line.
s["prudp.ping_timeout"] = 100000000000 # oh my god this is horrifying, but it makes it works, so who am i to care

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We made a lot of stability changes and bug fixes a while ago, after this PR was made. This hack can likely be removed, and if the issue still persists then you should open an issue about it on our end. This is obviously bad behavior on our end if it persists

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there! A bit ago, I tested, and the program does work without these lines. (yay, thank you!) However, the PR has technically been merged (see 8751376), so I can't modify the PR without causing problems (probably). Why this isn't closed, I do not know. I should probably close it. I'll make sure to try to get the owner of the repo to remove the workaround. Thanks tho!

@Preloading
Copy link
Contributor Author

Squashed and merged in commit 8751376

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

Successfully merging this pull request may close these issues.

[Request] Add Pretendo support Initial support for Third-Party Nintendo Network servers : Pretendo