Server implementation#1
Conversation
This adds virtually all files from the repository mentioned above. Since the previous content is more of a template/skeleton, I did not bother with properly merging things.
Do you happen to have dumps of this? This sounds like something Swapdoodle-specific. In my testing, the
An objects Compared to the objects upload status, which treats the object as if it doesn't even exist until the upload is "completed". This is distinctly different from visibility status That's why the checks are done this way. If an object is not visible or not "completed", then it's treated as not "enabled"
The callback system is being largely ignored right now (you can see that most methods have no callbacks). The callback you're linking to is only intended for // CompletePostObjectV1 is a custom handler for DataStore::CompletePostObjectV1
// defined by the game server
func (commonProtocol *CommonProtocol) CompletePostObjectV1(err error, packet nex.PacketInterface, callID uint32, param datastore_types.DataStoreCompletePostParamV1) (*nex.RMCMessage, *nex.Error) {
fmt.Println("Do something before method is handled")
// Call the common implementation internally
message, errCode := common_datastore.CompletePostObjectV1(err, packet, callID, param)
fmt.Println("Do something after method is handled")
return message, errCode
} |
|
Interesting... Thanks for the info, I haven't really dived into NEX much outside of Swapdoodle. Now I understand the upload process a bit more clearly. Here is a mitmproxy capture of my 3DS uploading a note that I have just taken. One thing to note right away is the FYI, Mitmproxy makes it a bit tedious to extract the raw NEX packet from the HTTP request. I use this bash script (courtesy of @CenTdemeern1) to extract the packet from a hex dump of the multipart data (which is easy to view in mitm): Though honestly, I'm still not convinced that checking for ObjectEnabled during CompletePostObject is correct - unless all files uploaded have the DATA_FLAG_NEED_REVIEW flag set? Or maybe I'm just overlooking something obvious |
|
Sorry, I sent that message at 2am and misunderstood something you had said
No, you're correct. My apologies. The object
Let me ping @DaniElectra on this one. The page he made was generated using the titles reported library versions iirc, so if it's reporting 3.10.1 then it was at least compiled with that version. But I've never seen a case where a title is using a different version than what it was compiled with. That's very odd. The That being said, since the issue seems to just be that
Thank you for that! I might add support for |
|
HPP connections are made by the BOSS sysmodule, which bundles NEX by itself, so the version between that the games have and the version used on the HPP connection will be different. As the console sends on the request, HPP on the 3DS uses NEX 2.4.1 The same also applies on the Wii U, where the NEX version that is bundled in BOSS is 3.5.2, while Smash 4 has NEX version 3.6, so the HPP requests that the game does through BOSS will use version 3.5.2 |
|
There's one more thing to Swapdoodle that I probably should have mentioned sooner. I apologise if it causes any trouble. In my testing, I've found that Swapdoodle refuses to upload notes if it can't download a file called The likely only possible way to get this file is by digging it out of the 3DS somehow (I'm not that experienced with the 3DS's internals to know if/how is that possible), since nearly all packet dumps will just have a 304 from the original BOSS server. |
|
Any updates? |
|
Use common notification implementation
Intended for the processing of Note IDs, which are hidden under a button in the app. They use the same format as Game Builder Garage (https://github.com/kinnay/NintendoClients/wiki/Data-Store-Codes#game-builder-garage). Many thanks to DaniElectra for figuring that out.
Add gRPC endpoint to retrieve Notes by Note IDs
This looks like a cheap phishing attempt, but the repo it belongs to has 1.5K stars. What the hell? ETA: https://forum.pretendo.network/t/github-is-this-a-phishing-attempt/26759 |
|
It's a legitimate bot we use. It was just seemingly broken for a while and no one noticed, it was only fixed yesterday The CLA is just an acknowledgment that you own the rights to propose the changes in the PR. We started using it after a few people tried to PR in information from Nintendo SDK leaks, as an effort to officially take a stance against that practice After the bot got fixed it sent out a ton of messages from the backlog, so it looks a little spammy |
Ah, understood. I signed it just now. |
|
seems like this pr is the last one left to be merged! PretendoNetwork/nex-protocols-common-go#53 |
woo! 🎉 really excited to see that 😊 I haven't checked on the progress in a while, I think I'll just pull the PR branch and test the app with it, to see if the problems I've encountered have been addressed |
Sorry for the delays. We had other things we were focusing on until that PR merged, and I plan to finish the DataStore rework soon too. I wanted to spend some time and actually finish the documentation for the protocol though, and get it posted on the new Nintendo wiki and I only just finished it today https://nintendo.wiki/wiki/Online/Nintendo_Network/NEX/Protocols/DataStoreProtocol |
I have confirmed this behavior, also. The errors I was seeing before were likely from the fact that I had tried to "complete" an object multiple times, which results in All objects, regardless of the completion flag, need to be "completed". I tested this earlier today on the official servers by uploading an object with no flags set, and I was unable to access it until calling I'll likely add a flag to the common protocols called something like "respect completion flag", which is disabled by default, so that all objects are required to be manually completed. Then if it is some weird version thing, and we end up seeing some clients trying to access objects without marking them as completed and without the completion flag set, we can selectively enable this for those games |
|
Hi there, do we need to take any action to support opaque tokens? |
|
Swapdoodle, since it uses HPP, won't see any tokens, so you don't need to do anything other than the other updates like the accounts.go one yeah |


Resolves this forum thread
Changes:
Adds an implementation for Swapdoodle. This uses Jon's unfinished DataStore rework (PretendoNetwork/nex-protocols-common-go#53).
The server currently doesn't work out of the box due to the incomplete state of the DataStore rework. There are some quirks I discovered that I wanted to discuss here, instead of polluting the DataStore PR with possibly Swapdoodle-specific info. This would be:
needUploadCompletionflag set to false, which in turn causes uploadCompleted to be set to true, and so CompletePostObjectV1 fails. Additionally, since ObjectEnabled also checks forstate == 0, the file is actually never accepted because it's always initialized to 0 but that's likely to be fixed anywayThis callback is actually never run, because CompletePostObjectV1 does not call it. This likely won't be needed in the future when notification support is added to the package, I'm currently creating notifications manually for the sake of maintaining functionalityNotifications are now supported, so this is no longer relevantWith the two quirks patched out locally via a Go workspace, I have confirmed the server to correctly relay notes.