Repository navigation
Matchmaking
Covers the three routes into a map, the getOpenServer and processUrl reply shapes, the connection
URL and the join-link fault.
| route | entry | server needed | state |
|---|---|---|---|
| practice / challenge / tutorial | WELCOME modal → local ClientTravel
|
none | works, one-shot (Offline) |
| quickmatch | PLAY → FIND MATCH → getOpenServer → connectToServer
|
a game server at the returned host:port
|
reply correct, no server exists |
| join link |
-RunURL=streamline://join/game/… → processUrl → UJoinGame → connectToServer
|
a game server at the returned host:port
|
reply correct, client crashes after delivery |
No reply returns a map name: the appserver's only address output is host:port; the map comes from the
game server.
Chain: HomeMenu.onPlay → hn_play → hn_join → onQuickmatch → startQuickMatch → sends
getOpenServer(version, region).
Reply type: Result.Success(OpenServerResponse.OSServer({host, port, party, playerSession, gameSession})). OSDisabled and OSNoFreeServers are success-carried variants, not errors, so a
wrong constructor changes navigation without failing.
On success the client enters JoiningGame, sets the party, and calls
connectToServer("<host>:<port>", "quickmatch"). With party="" no party watcher starts. The
appserver returns 127.0.0.1:7777.
There is no entry-path quickmatchDisabled gate: the handshake flags neither remove nor enable it.
HomePlayMenu has no hn_play widget: hn_play has 0 assets in 10,291 pak entries, and
every hn_* / gn_tutorial_* binding name is absent from all 7,250 assets. PLAY's fallback looks up
hn_play, fails, and never calls the solo helper; FIND MATCH and NEW MATCH exist on the PLAY page. On a
fresh profile the WELCOME modal is the working entry, and its buttons travel without closing it
(Offline). Synthetic input does not reach Slate
(RuledOut); the working entry is an in-process native
call (Joining).
The quick-match dialog is filled from the handshake's availableRegions array (SLGameInstance+0x60),
one combo row per entry. The row text is Locale.get(int), where the int comes from the client-side
RegionMapComponent.regions map keyed by the region string; the reply carries ids only, never labels.
Selecting a row stores the region id in SLUserSettings and startQuickMatch sends it as
getOpenServer(version, region). The mock's OSServer reply supplies host:port, and the client then
connects with connectToServer("host:port", "quickmatch").
So the mock controls which rows exist and what each one resolves to, but not their text: with the
shipped ids (eu-west-1, us-east-1, us-west-2) the labels stay the localized region names.
Arbitrary labels need a small patch to the label lookup (0x14062F0DB) and the two row-match sites
(0x14062EEE1, 0x14062EF00).
hn_host → onHost (0x140630E50) runs two local predicates — the role list containing
broadcaster, and SLGameInstance+0x138 identity — and then either creates the onboarding widget or
navigates to the map picker. No createParty, getRegions, hostHasJoined, getOpenServer,
ServerTravel or connectToServer call appears in it.
The Streamote sign-in page that appears on a profile without the role is a widget whose browser leg
never returns, so the modal waits indefinitely by design: no request, no error. Supplying
roles: ["broadcaster"] in the session data skips it and lands on the map picker.
Hosting itself is a boot URL (GameDefaultMap plus LocalMapOptions=?game=Tag?listen?IsHost=true);
the Haxe connectToServer builder cannot emit ?listen, and switchServerMap appends only
?game=/?variant=.
Request: two arguments — the client hns-ver string (from the hns-ver command-line token, the
same value buildConnectionURL emits as ?Version=) and the text after -RunURL=. Neither is read
back. The reply must be
Result.Success(UrlAction.UJoinGame({host, port, party, playerSession, gameSession}))
Literal wire form (R6 is the back-reference token for the earlier empty Y0: string):
nwY12:model.ResultY7:Success:1wY23:appserver.api.UrlActionY9:UJoinGame:0oY4:hostY9:127.0.0.1Y4:porti7777Y5:partyY0:Y13:playerSessionY8:client-1Y11:gameSessionR6g
-
portmust be a Haxe Int (i7777).FUN_14055b750unboxes ints/floats/bools and falls back to0. - The other four fields must be Strings. A missing field does not throw:
getFieldreturns null,Std.string(null)is"null",Dynamic→Int(null)is0, so a half-filled object travels tonull:0. - All five fields must be present even if unused; extra fields are ignored.
-
Result.Successmust wrap the enum; a bareUrlActionfails themodel.Resultcast. - The wrapped value must be an
hx::EnumBase. ADataStoreUpdateResponse— the generic fallback for an unknown op — makes the dynamic cast return null and the next instruction (MOVSXD RCX,[RAX+0x1c]at0x1406724c4) dereferences0x1c: access violation. An unimplementedprocessUrlcrashes the client rather than being ignored. - Both
wandjenum forms work;jenforces arity, so it must declare:1.haxe_ser.Unserializerdoes not implementw, so round-tripping this reply through it raisesunknown token 'w'.
FUN_140672250 switches on action+0x1c (jump table 0x140672e14):
| tag | ctor | behaviour |
|---|---|---|
| 0 | UJoinGame |
sets SLLocalPlayer (party, playerSession, gameSession, isHost=false), then connectToServer("<host>:<port>", kind, cb)
|
| 1 | UNoGame |
error banner, Result:ServerError
|
| 2 | UHostConnected |
PGS party-join UI, no travel |
| 3 | UAccessDenied |
error banner |
| 4 | UGameForbidden |
error banner |
| 5 | UExternalNotAllowed |
error banner |
| 6 | UProcessed |
info dialog |
The travel kind is "pvt_url" when the -RunURL= value matched ^streamline:/+join/+game/+, otherwise
"url".
buildConnectionURL (FUN_1407a95b0) appends, in order:
?IsHost=<bool> (forced false by UJoinGame)
?TrackingSessionID=<id>
?Source=<kind> (or ?variant=solo when kind=="solo")
?PlayerSessionID=<id> (omitted when empty)
?Version=<build> (omitted when empty)
?PartyID=<id> (omitted when empty)
?game= and ?variant= are emitted only by switchServerMap, the host/map travel path; a joining
client never produces them. No follow-up RPC follows; the next network activity is the UE game-port
connection. A failed connect logs Error connecting to server <host>:<port>
(LoginGameMode.hx line 0x312) with no retry.
The fault is in the reply envelope, not the handler. processUrl is a public-plane op: the consumer
chain (CookieClient.handleResponse -> DataStoreClient.handleResponse -> UE4Client.handleResponse
-> FUN_1411F7250 -> FUN_1411F7750) dynamic-casts every Success payload to
appserver::remoting.DataStoreUpdateResponse. A bare Result.Success(UrlAction) fails the cast, the
reload hands the consumer NULL, and it dereferences it at 0x1411F781E — before the closure's first
Response: trace. That is why Success(UNoGame) died identically and why every handler-side patch
(tag-0 skip, connectToServer, gotoState, loading screen) was behind the fault. The Error(...)
branch reaches the closure because it does not take that cast.
The empty banner is FWindowsErrorOutputDevice::HandleError printing GErrorHist, which still holds the
PreInit default Fatal error!: no fatal log or error-history writer ran.
Fix: the server must wrap the action in the branch-A DataStoreUpdateResponse envelope, the same shape
every public Success reply uses — handshake_result_dsur(UrlAction.UJoinGame({...})). The mock does this
now; the reply carries the DSUR and the pinned test reflects it. The R6-as-"port" string-table bug was
also fixed (the mock built the action before the Result prefix, so its table order diverged from the
wire).
The variant is gameMode+0x1c: 0=Hosted, 1=NoHost, 2=Solo. It decides both the boot gate
(ListenHost) and the pre-login rules
(Joining).
| variant | host boot | join | notes |
|---|---|---|---|
Hosted (0) |
requires the StartPlay patch |
accepted if a host player exists or the host-exists gate is patched | the variant a local listen host uses |
NoHost (1) |
StartPlay takes its second pass through the same dedicated gate |
rejects IsHost=true, rejects when no host player exists, rejects a started match |
the "no host" playlist; ?variant=nohost
|
Solo (2) |
compares against NM_Standalone, so a listen world still fails |
n/a | offline map paths travel standalone instead of hosting |
?variant= is a URL option read by StartPlay; ?game= selects the mode (Tag, …). The four MP
aliases in the config are ?game= values, not variant tags — the enum has only the three members
above.
Private-plane only: unreachable from a listen host (no private proxy, Architecture). The shapes served:
getCurrentIP → configured public IP
getServerOptions → {gameKind: KNoHost(2), partyID:"", hostToken:"", gsess:"", urlVisibility:"public"}
hostedServerHeartbeat → success
onEndMatch → success
hostHasJoined → success
serverEnvironment → "local" (default), GUL_SERVER_ENV overrides
They close the GameLift-disabled path but create no server: the build has no server mode (RuledOut).