Git Product home page Git Product logo

smb35's People

Contributors

ffsaga avatar kinnay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smb35's Issues

error code 2306-0103

Does not happen with 2 players
When 3 players,
At the beginning of the game,
Player A runs to commit suicide
show error

WARNING:nintendo.nex.matchmaking_eagle:MatchmakeRefereeServer.end_round_with_partial_report not implemented
WARNING:nintendo.nex.rmc:RMC failed: Core::NotImplemented (0x80010002)
ERROR:nintendo.nex.prudp:Packet timed out: <PRUDPPacket type=TYPE_DATA flags=NEED_ACK,RELIABLE,HAS_SIZE seq=36 frag=0>
INFO:nintendo.nex.rmc:Connection was closed
INFO:nintendo.nex.notification:NotificationClient.process_notification_event()
INFO:nintendo.nex.messaging:MessageDeliveryServer.deliver_message()
INFO:nintendo.nex.messaging:MessageDeliveryClient.deliver_message()
INFO:nintendo.nex.messaging:MessageDeliveryClient.deliver_message()

when B and C wait in place until the time is up:
show error:

ERROR:anynet.util:An exception occurred
Traceback (most recent call last):
  File "C:\Python38\lib\site-packages\anyio\streams\memory.py", line 79, in receive
    return self.receive_nowait()
  File "C:\Python38\lib\site-packages\anyio\streams\memory.py", line 74, in receive_nowait
    raise WouldBlock
anyio.WouldBlock

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python38\lib\site-packages\anynet\util.py", line 86, in catch
    yield
  File "F:\SMB35\source\eagle.py", line 293, in handle
    await client.process()
  File "F:\SMB35\source\eagle.py", line 84, in process
    data = await self.client.recv()
  File "C:\Python38\lib\site-packages\anynet\websocket.py", line 275, in recv
    return await self.binary_packets.get()
  File "C:\Python38\lib\site-packages\anynet\queue.py", line 18, in get
    return await self.stream.receive()
  File "C:\Python38\lib\site-packages\anyio\streams\stapled.py", line 61, in receive
    return await self.receive_stream.receive()
  File "C:\Python38\lib\site-packages\anyio\streams\memory.py", line 99, in receive
    raise EndOfStream
anyio.EndOfStream
INFO:nintendo.nex.matchmaking_eagle:MatchmakeRefereeServer.end_round()
INFO:nintendo.nex.matchmaking_eagle:MatchmakeRefereeServer.end_round()
INFO:nintendo.nex.matchmaking_eagle:MatchMakingServerExt.end_participation()
INFO:nintendo.nex.notification:NotificationClient.process_notification_event()
INFO:nintendo.nex.matchmaking_eagle:MatchMakingServerExt.end_participation()
INFO:anynet.websocket:WS server is closed
INFO:nintendo.nex.messaging:MessageDeliveryServer.deliver_message()
WARNING:nintendo.nex.rmc:RMC failed: RendezVous::SessionVoid (0x80030073)

Is it compatible with Switch Emulators?

Hey there,

Been trying to test it with both Ryujinx and Yuzu and i haven't been able to get it working but i am not sure i have set it up properly.

Could you confirm that it works with either ?

Not an issue with SMB35, but rather Splatoon 2's Global Testfire ~ See below

Hey! This isn't exactly an issue with Super Mario Bros. 35

I was trying to adapt this custom server to the Splatoon 2 Global Testfire, and I managed to get the console to connect to my PC which is hosting the server, but then I realized that it was just giving me error 2306-0102, (only when I had the server up of course). And yes, I have indeed changed the access key to match that of the testfire. Also, I've placed an image of the error screen at the bottom of this post.

From what I can tell, there are a few needed funcs that aren't yet implemented... Is there any chance you could perhaps implement a few of them? I tried making some adjustments but I had no luck. I'm thinking its just a few authentication funcs. Maybe matchmaking eventually, but I'm not worried about that yet haha.
I'm assuming that I should probably also mention that handle_validate_and_request_ticket_with_custom_data is where it's failing.

If you need more info, lemme know!

Global Testfire Patches

Here are the patches that I've made ~~ Feel free to test them if you'd like.

  • Patchtext file
@nsobid-0F129135D8A7621C9E4940B0C3808BF0
@flag offset_shift 0x0
#Splatoon 2 Global Testfire

//Set Custom Server URL
@enabled
024FC706 "192.168.4.156:20000"

//nn::nex::JobAcquireNsaIdToken::StepWaitingForGetGameAuthentication(void)+9C -> Replace GetResult call with MOV X0, XZR
@enabled
01132844 E0031FAA

//force branch at "CBZ W8, loc_7101132844"
@enabled
01132924 08000014
  • Skyline hook to disable SSL & log calls to QLOG (I now realize that there is a thing you can use to disable it system-wide, but I'm sharing this anyways)
typedef u32 CURLcode;
typedef void CURL;
enum CURLoption { };
CURLcode (*original_curl_easy_perform)(CURL *curl);
CURLcode curl_easy_perform_hook(CURL *curl)
{
    u64 curl_easy_setopt_addr;
    nn::ro::LookupSymbol(&curl_easy_setopt_addr, "curl_easy_setopt");
    
    skyline::TcpLogger::SendRaw("curl_easy_perform() was called!\n");
    // yes I'm aware this is disgusting.
    ((CURLcode (*)(CURL *curl, CURLoption curlopt, long val))curl_easy_setopt_addr)(curl, (CURLoption)64, 0L);
    return original_curl_easy_perform(curl);
}
Result (*original_nnNexQLOG_func)(int logLevel, const char* message, ...);
Result nnNexQLOG_hook(int logLevel, const char* message, ...)
{
    va_list argptr;
    va_start(argptr, message);
    char s[0x100];
    int maxlen = 255;
    Result result = vsnprintf(s, maxlen, message, argptr);
    va_end(argptr);

    skyline::TcpLogger::SendRawFormat("[Log Level %d]: %s\n", logLevel, s);
    return original_nnNexQLOG_func(logLevel, s);
}

int main() {
    u64 curl_easy_perform_addr;
    nn::ro::LookupSymbol(&curl_easy_perform_addr, "curl_easy_perform");
    A64HookFunction(
        reinterpret_cast<void*>(curl_easy_perform_addr),
        reinterpret_cast<void*>(curl_easy_perform_hook),
        (void**) &original_curl_easy_perform
    );

    u64 nnNexQLOG_addr;
    nn::ro::LookupSymbol(&nnNexQLOG_addr, "_ZN2nn3nex5_QLOGENS0_8EventLog8LogLevelEPKcz");
    A64HookFunction(
        reinterpret_cast<void*>(nnNexQLOG_addr),
        reinterpret_cast<void*>(nnNexQLOG_hook),
        (void**) &original_nnNexQLOG_func
    );
}

Error Screen

2021112416225400-1AB131B6E6571375B79964211BB3F5AE

Spectating doesn't work, all players except the last two get Error 2306-0103 upon death

So we've managed to get a few friends set up their Switch to connect to our own hosted private server, and we finally had around 3-5 players a lot of the time.

We were wondering why almost everyone except the final two players would always immediately get an Error 2306-0103 upon death.

So it seems spectating is broken, anyone who would end up in spectate mode instead gets that error.

One of them suggested it might be because of the game trying to submit coin rankings to the (non-existent) coin leaderboard. But I decided to check the logs and it was:
WARNING:nintendo.nex.matchmaking_eagle:MatchmakeRefereeServer.end_round_with_partial_report not implemented
Screen Shot 2021-05-30 at 3 59 05 PM

Is there a quick way we can fix it so spectating works (if the issue is the coin leaderboard thing as they guessed)?
We plan to implement coin leaderboards eventually (even via something simple like SQLite), but for now, we hope to get spectating working at least since that's most of the fun of the game.

Also, when someone gets the error, the server just keeps spamming stacktraces (ClosedResourceError) in the log until the game ends (not sure if this is helpful):

Screen Shot 2021-05-30 at 4 00 12 PM

Thanks for any help, and also thanks so much for writing the server code!
It's amazing!

Disconnected players stay in the game, become "immortal", and defeat all players

We noticed in several games, some people would be frozen in place, never time out, and beat us all after we reach fastest red timer and time out.

At first we thought it was a hacker, until one of us got a connection error and also had the same result.

Now we can reproduce it reliably:
Steps to reproduce:

  1. Have 2 or more players join a lobby, then wait until the game starts
  2. One player presses the home button, closes the game by pressing X.
  3. That player is now "immortal" in the game, will never run out of time, and cannot be beaten by the remaining players.

This is the error that appears once they close the game:
Screen Shot 2021-05-30 at 6 15 46 PM

And of course, this initiates the ClosedResourceError stacktrace spam until the end of the game
Screen Shot 2021-05-30 at 6 17 52 PM

Licensed as GPLv3, should be AGPLv3

In a scenario such as this where its server software under GPLv3 hosting a server does not qualify as "distributing" and therefore does not actually require source code to be made public.

It should instead be licensed under AGPLv3, which contains an affero clause, which also makes distribution of services over a network such as the internet qualify as "distributing".

In its current state it may as well be public domain with no protections on it due to its nature.

DNS-only route with no RCM hacks?

Is it possible that this open source server is made workable by only DNS modding? E.g. a DNS server that serves your server IP instead of the actual Arika/Nintendo one? I believe it will be possible and you should focus on this. I prefer to not mod my switch and it will be much more accessible for everyone if possible.

Error 2623-1011 on round start after matchmaking

When connecting to my server, matchmaking works (players that join and leave show up properly, late joining players get the correct gamestart countdown time).

However, once countdown finishes, and game is about to start with "Here we go..." message, game doesn't start and instead clients get an "Error 2623-1011".

No visible errors are seen in the server logs (with either logging.INFO or logging.DEBUG levels).

My setup

  • Brand new clean Ubuntu 20.04 VPS
    • nothing installed except python3 (Python 3.8.5 according to --version), pip-python3, git, and snap/certbot
    • Used git clone on https://github.com/kinnay/NintendoClients/
    • Ran "pip3 install ." in the cloned folder, successfully with seemingly no errors
    • Used git clone on https://github.com/kinnay/SMB35
    • Created "resources" folder inside the cloned folder, and copy-pasted all the generated *.pem files into it, which were generated as so:

image

  • Then, I simply ran "python3 main.py"

Below are the consoles I used to connect:

  • Console 1:

    • version 12.0.0|AMS M.19.3|E in settings
    • brand new clean Atmosphere install, added nothing except
      • exosphere.ini for emummc prodinfo blanking
      • my own IPS in atmosphere/exefs_patches/patch
      • 90DNS set up in the emuMMC
  • Console 2:

    • version 11.0.1|AMS M.19.3|E
    • brand new clean Atmosphere install, added nothing except
      • exosphere.ini for emummc prodinfo blanking
      • my own IPS in atmosphere/exefs_patches/patch
      • 90DNS set up in the emuMMC

Also, Hekate's "Fix Arch Bit" is used afterwards every time files are copied over.

The IPS patch file I am using was created like so:

image

After they connected, during matchmaking, they show up properly on the dashboard:

image

Below is the logging.INFO log, from startup all the way up to Error 2623-1011

image
image

Here is the logging.DEBUG log (note at the end I close the software on both Switches):


More Testing:

  • I replaced the patch file with the stock one that redirects to "smb35.ymar.dev:20000", and the game works properly after matchmaking.
    • Nothing else was replaced/changed except the patch file.
  • I replaced the patch file with one I created to connect to "bluephynix.de:20000", the person in the other issue. The game works properly after matchmaking.
  • Replaced it back with my own patch file and I get "Error 2623-1011" when the game is about to switch from matchmaking to relay server mode.
    • Matchmaking works perfectly (leaving, rejoining, etc. shows up properly, as well as the reduced countdown timer), can also play Practice mode.

It must be something with my setup, but my setup is pretty barebones as it is

  • nothing on the VPS but python3 and let's encrypt certificate from certbot (no webserver even)
  • ports are confirmed open (matchmaking works, dashboard works)
  • clean Atmosphere installs on Switches
  • replacing the patch file with other servers works (ymar and bluephynix patch files work)

I've tried it on other VPS boxes I had access to (even tried it on an OSX box with Python 3.7), as well as some other certs available to me, and I get the same error. But it instantly works once I point it to those two known working servers.
EDIT: Just tried to update my VPS to Python 3.9 and run it there, still got the same error code.

I hope you can help me figure this out.

IPS Patch

Hello, can you help me please to create an ips patch for my domain?

Participants Limit

Hello kinnay,
i have a question to participants, is it possible to limit the max participants from ( 35 ) to ( 5 )for example ?
It is a good feature for nearly server test

SXOS ??

Hi Kinnay

Is it possible to make it work on SXOS?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.