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
|
works: the reply is the public-plane DSUR envelope, the handler prints Response: Success(UJoinGame(...)), the client travels and joins (Welcomed; host Join succeeded) |
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).
On the wire the reply is the usual datastore envelope whose returnVal is
Result.Success(OpenServerResponse.OSServer({host, port, party, playerSession, gameSession})); a bare
Result.Success(OpenServerResponse) fails the datastore gate before the callback
(Protocol). OSDisabled and OSNoFreeServers are
success-carried variants, not errors, so a wrong constructor changes navigation without failing;
the mock serves them behind GUL_OPEN_SERVER.
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. The role is read from
the PGS user record the user watcher long-polls (GET {pgs}users/<id>/updates/<stamp} →
{"users":[{…,"roles":["broadcaster"]}]}, SLGameInstance.userWatcher(+0x30).model(+0x8)); serving
that key skips the widget and lands on the map picker. With GUL_USER_WATCH_STAMP=echo no update is
delivered, so the role never lands.
Confirming a map still does not host. ChooseMapMenu.onStartGame → asyncStartGame
(0x1405CBB30) ends in one of two client travels: the solo branch calls
connectToServer(map,"solo"), and the party branch calls getServerIp and then
connectToServer("<ip>:<port>","party") — a client connect to someone else's host. switchServerMap
and serverTravel have no call site on that chain, and ?listen appears nowhere in the executable.
Hosting is therefore a boot URL (GameDefaultMap plus LocalMapOptions=?game=Tag?listen?IsHost=true);
the Haxe connectToServer builder cannot emit ?listen, and switchServerMap appends only
?game=/?variant=.
The party branch of the map picker asks the backend where a host is. Like every public-plane op the
reply is a branch-A DataStoreUpdateResponse whose returnVal is the ServerIpResponse; a bare
Result.Success(ServerIpResponse) fails the datastore gate before the op callback (see
Protocol). The constructors are declared SIServer (0, one
argument), SIHostConnected (1), SIHostNotConnected (2) and SINoFreeServers (3), the last three
with no arguments.
SIServer carries one anonymous object read by name: host, port, party, playerSession and
gameSession; the client sets the two session values on the local player and travels to
host:port. The three argument-less variants do not travel: the two host-connected shapes open the
broadcaster path and the no-server shape reports Result:ServerError.
The local mock answers SIHostNotConnected by default (the cast succeeds, nothing travels) and
SIServer when GUL_SERVER_IP is set.
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, observed working: the server wraps the action in the branch-A DataStoreUpdateResponse envelope,
the same shape every public Success reply uses — handshake_result_dsur(UrlAction.UJoinGame({...})). The
log then shows Response: Success(UJoinGame({ gameSession => , host => 127.0.0.1, playerSession => client-1, port => 7777, party => })) and Browse: 127.0.0.1//Game/Maps/Entry?IsHost=false…, with no
fatal. 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 empty gameSession in that line is the
proof. Observed end to end against a listen host: the client logs Welcomed by server (Level: /Game/Maps/GameCon/GameCon_PersistentLevel) and the host logs Join succeeded: Player17 after the
Login request carrying the URL's options. The browse line it produces is
127.0.0.1//Game/Maps/Entry?IsHost=false…; the server parses the URL into an FURL and forwards only
the ?options to PreLogin/Login — FURL.Map is never read. The Join case sends the client
ClientTravel(server LastURL or current package, TRAVEL_Relative, seamless), so the host's GameCon is
what the client loads. The client's Entry token only costs a brief client-side preload.
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). Each value below is the returnVal of a branch-A
DataStoreUpdateResponse — the private client inherits the same datastore gate, so a bare
Result.Success fails before the callback. 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).