What’s proven end-to-end
The reconnect wall
Picking a role fromaccountArr (after email verification) does a full reconnect, not a session continuation, decompiled precisely from UI/UISetting/UIRoleLogin/View/UIRoleLoginView.lua:OnClickLogin:
CrossServerLogin FSM state (Assembly-CSharp.decompiled.cs:108752-108812), which dials the role’s own ip:port directly, no second GSL HTTP call, and sends the same base SFS Login request. This was reimplemented exactly and tested with every plausible field combination:
Row 4 is the load-bearing result.
/Applications/Last War.app (the iOS build, installed locally via Mac Catalyst) had previously logged into the exact same real account, its sandboxed PlayerPrefs equivalent (~/Library/Containers/<uuid>/Data/Library/Preferences/com.lastwar.ios.plist) contained a real device ID, a real refresh token, and a cached ShuMei device-fingerprint token. Feeding all three through the Go client, plus a fresh, GSL-validated access token obtained by actually exchanging that refresh token, still got rejected identically to a fully synthetic identity.
Update, 2026-10-04: two live tests narrow this down further.
shumeiBoxIdisn’t required (confirmed live). The captured iOS session, with the sameatand the same identity, logged in fine withshumeiBoxIdsent empty. The ShuMei explanation in the warning above doesn’t hold for an established account.- A device of its own gets tokens, but not a session (confirmed live).
goclient’s email-verification flow bound a fresh, Go-generated device to the real account, and GSLopt=loginwith the resultingloginKeyissued that device its ownat/rtpair. A base-zoneLoginwith that token andgoclient’s Android identity (1.0.364/1892,un= gameUid,shumeiBoxIdempty) was then rejected withec=28,ep=[E005], reproducing row 2 above.
Login works once Android ta is filled (confirmed live). Every Android Login in the table above, and the 2026-10-04 own-device one, sent ta as {}; goclient filled it only for iOS. C485 found from real Android captures that an Android Login with {} gets E005 and one with #os, #bundle_id, and lw_platform filled in doesn’t (discussion #22). One build sent the 2026-10-04 own-device token twice, changing only ta: {} got ec=28, ep=[E005], and the filled blob logged in with 160 buildings in init. So rows 2 and 4 most likely failed on ta too. Row 4 also mixed an iOS-issued token with the Android identity, so it can’t be separated after the fact. The gate applies to established accounts: guests were always accepted with {}, as the Warning above says. Which of the blob’s keys the server reads isn’t isolated, since both tests swapped the whole blob. See Identity, login & session.Solved: a field-by-field identity mismatch, not anti-fraud
Confirmed. The guess above was exactly right, and it’s now proven rather than inferred. The proof came from a live packet capture, not more trial-and-error on field values:tcpdump against the locally installed /Applications/Last War.app (the real iOS / Mac Catalyst build), captured while manually logging into the exact same real account through the actual app UI. Because the SFS2X game socket is plain TCP with no TLS, this captured cleartext-after-XOR application data directly, no interception layer needed. The captured Login request was decoded field by field using the client’s own codec and byte-diffed against what the Go client itself was encoding for the same fields, see Capturing and decoding traffic for the exact, reproducible version of this pipeline.
First proof point, before touching the Go client’s login path at all: replaying the captured Login packet byte-for-byte, raw, over a fresh TCP connection succeeded cleanly. That settles something earlier hypotheses left open, reconnecting was never blocked by session locking, token single-use, or anti-fraud in the way row 4 above seemed to suggest. The same access token, reused verbatim, worked fine when replayed on this second, fresh connection, ruling out session locking and token single-use as blockers in this test. Whether it remains valid across a third or further reconnects wasn’t separately tested.
The field diff showed the actual gate: an access token is bound to the exact packageName/platform/appVersion/versionCode identity it was issued under, and the Go client had been hardcoding an Android identity unconditionally, even when replaying a token issued to a real iOS session. Fixing identity.go’s BuildLoginParams to match the token’s real issuing identity got a live reconnect working through the Go client’s own from-scratch SFS2X implementation, not the raw-replay hack. The fix: an IOSMode boolean that switches packageName to com.lastwar.ios, packageSign to SHA1(packageName) (confirmed this formula generalizes correctly to iOS too, it matches the captured value exactly), platform to "0", pf to AppStore, appVersion to 1.0.344, versionCode to 786; adds the previously entirely-missing dataConfigMd5 and the iOS-only idfa/idfv/phone_native_screen fields; drops the Android-only AndroidID/IMEI/google_available fields and makes country/suggestCountry/timeoffset/gcmRegisterId/referrer genuinely conditional on an empty uid instead of unconditional; and, critically, at the time, populated ta with the real captured analytics blob instead of an empty placeholder object. crossserver.go and main.go picked up -cs-ios and -cs-at flags to drive this path. Because the fix changed the platform fields and ta together, it didn’t show which of them the server reads. The 2026-10-13 own-device test (see the update above) showed that, for an established account, a filled ta is required on its own.
Live result: Login OK, followed immediately by a correctly Zstd-decoded init push containing the account’s full real state, 162 real buildings on this account.
A real server merge exposed three real redirect-following bugs
Root cause: the account’s zone had been migrated server-side (a routine live-game server merge,APS783 → APS8092, entirely different host and port) mid-session. The old connection was still accepted at the login step, but the account genuinely no longer lived there, so nothing past that point could ever succeed. The server actually says this happens, directly in the Login response’s serverInfo field, the client just wasn’t reading it.
Three separate, real bugs, not one:
DoCrossServerLoginhad zeroserverInfohandling at all. The other login path (Login/waitForInitPush) had a redirect check; the session-config-driven cross-server path, the one actually used day to day, didn’t check for it at all.- The check that did exist was structurally unreachable. It lived inside a
for attempt := 1; attempt <= maxLoginAttempts; attempt++loop capped at 1 (deliberately, retrying on a timeout had been live-tested as actively harmful, see above). Go’scontinuein a C-styleforloop still runs the post-statement before re-checking the condition, so hitting the redirect branch just silently exited the loop instead of retrying. It had never been exercised against a real redirect before this. - Once both were fixed and actually reachable, the check itself was looking in the wrong place.
serverInfoisn’t a top-level field of theLoginresponse, it’s nested one level down, underp:{p: {eu_state, serverInfo: {ip, port, zone, ...}}, rs, zn, un, pi, rl, id}. Confirmed by testing against the real redirect payload: readingenv.Content.Get("serverInfo")directly, as both the original code and the decompiledLoginMessage.CSHandleResponsecall site alone would suggest, found nothing.
serverInfo.port decodes as a UTF string, not a numeric SFS type, GetInt("port") silently returned 0, resolving the redirect address to host:0 and failing to connect. Every other numeric-looking field in the same object (id, for instance) is a real number; this one specifically isn’t.
The fix: both login paths now follow the redirect (close the stale connection, redial the new address, resend Login with the new zone) up to a small bounded hop count; findServerInfo checks the nested location (falling back to top-level, in case a different response shape ever puts it there); getIntFlexible reads port as a number or falls back to parsing its string form. crossserver.go’s DoCrossServerLogin also now persists the resolved address back into the session config file after a redirect, so the next run connects directly instead of re-following the same redirect every single time.
Confirmed live, full loop: reconnecting with the stale APS783 config correctly received and followed the redirect to APS8092’s real host and port, logged in cleanly, loaded all 163 buildings, and, on the very next run, connected straight to the new address with no redirect needed at all, because the config had been rewritten in place.
This isn’t a one-time fixed state; the account has genuinely moved zones more than once since. A later capture showed the base
Login targeting APS783 again with no redirect needed, meaning the account either moved back or the merge target changed a second time. The fix here isn’t “resolved to APS8092”, it’s “follows whatever serverInfo says, every time,” which is the only version of this that stays correct across further merges without more manual intervention.The 2026-10-02 token rotation (E011)
What’s known from the failing runs and a fresh capture:
- Nothing on the researcher’s side triggered it. Playing on a phone doesn’t rotate the scheduled client’s token, and the researcher didn’t refresh it any other way. The invalidation happened server-side, around the 1.0.364 rollout window (the Android build was posted 2026-09-23). Nothing ties the two together beyond timing.
- Both credentials had changed. A fresh capture of the real Mac Catalyst app showed a new
atand a newshumeiBoxId, with the samedeviceId. That app’s binary was still 1.0.344 (build 786), hot-updated toresVersion2159.1505_821F_39516.23570. - Recapturing fixed it. Writing the new values into the session config with
pcap -session-out(see Recovering from a rotated token) restored the scheduled runs, and a full-collectrun then succeeded. - It has happened before. The first rotation, on 2026-08-16, failed identically for 16 consecutive runs over about 42 hours, and
shumeiBoxIdhad changed then too.
goclient now reports an E011 rejection as session.ErrTokenRejected, which wraps ErrAuthRejected, so the exit code stays 2. The log line names the recapture procedure.
What static analysis of 1.0.364 adds (static-analysis-only, see Identity, login & session):
- The client labels
E011ERROR_LOGIN_ACCESS_TOKEN. It clears only the access token, keeps the refresh token, reloads, and runs a GSL (Gate Server List)opt=refreshcall that issues a newat.goclientkeeps no refresh token, so its only recovery is a fresh capture. - Two mechanisms fit the observation, and static analysis can’t tell them apart: (a) the real app’s own 30-day proactive refresh superseding a copied token, or (b) server-side expiry or invalidation. The researcher didn’t run anything that would refresh the token this time, which fits (b) better, but this stays open.
at.time is an issue time, not an expiry (confirmed live). A GSL opt=login response on 2026-10-04 carried at.time and rt.time equal to the moment of issue, in unix seconds. So the client’s 30-day rule counts from issue. That still doesn’t show whether the server expires tokens on its own, so which mechanism caused the 2026-10-02 rotation stays open. The capture itself couldn’t show at.time, because the GSL call runs over HTTPS on port 443, which the capture filter excluded.
The complete Login params field list (Identity, login & session was a partial reconstruction)
LoginMessage.CSSetData (Assembly-CSharp.decompiled.cs:122440-122598), read in full, in call order:
un and p["gameUid"] are proven the literal same string object in every call site, no divergence possible. rt/loginKey/attime/rttime are read only at the GSL HTTP layer to pick opt=; none are ever placed in the SFS Login request. pw is always "" at this layer regardless of new/returning.
1.0.364 re-read (static-analysis-only). LoginMessage.CSSetData in 1.0.364 sends the same fields in the same order. Every derivation (cmdBaseTime, SecurityCode, OneCode/CoreV, psh, packageSign, airKey) is unchanged, and the APK signing certificate is byte-identical to 1.0.351’s. Two values are worth knowing:
dataConfigMd5isn’t computed by the client. The C# reads it from a cache of a value the server sent in an earlierinit, and omits the key when the cache is empty. In the 2026-10-04 capture, the Login’sdataConfigMd5equaledinit.add.afrom the same session. Whether the server expects it to persist across sessions is open.resVersionis built from check-version data, see Startup, version-check & hot-update.
The 2026-10-04 capture: real client versus goclient
A cold-start capture of the real iOS / Mac Catalyst app (1.0.344, hot-updated) was decoded and diffed against what goclient sends. The real Login and goclient’s BuildLoginParams in iOS mode carry the identical 51-key set with identical SFS2X types; only key order and values differ. SFSObject is a map, so key order is harmless. Everything in the left column was observed in the capture of the real client; “tolerated live” means goclient logs in and works with its own behavior.
Other facts from the same capture, all observed live:
- The server sent only a bare
init, about 287 KB with 247 top-level keys. Noinit.before,init.after, orpush.init.buildarrived. push.shumei.id {shumeiId}arrives about 0.5 s afterLogin. The real client reports that value asta.lw_shumei_idin its nextLogin, and since the 1.0.370 follow-upgoclientkeeps it in the session config and does the same on iOS; it isn’t theshumeiBoxIdsent in the same request.init.usercarries the account’s email address.goclientnow masksemailandshumeiIdin every redacted dump, alongsidemailandshumeiBoxId.init.mixedInfo.todayLoginTimescounts logins per server day, including everygoclientrun.- Over 328 s, the server answered all 83 heartbeats. There was no kick, no redirect, and no token-expiry hint anywhere in
init.
init sequence is tolerated only for what goclient sends, and goclient never sends a march. Four people whose clients add marches report the same failure (October 2026, not tested here). Every world.march.formation.new (gather, attack, rally join) comes back with errorCode E000000 and errorMsg "token error". Login, reads, city actions, and go.to.world keep working. Two of them say marches go through once the session has answered login.ext. Despite the message, this isn’t a rejected access token: that fails at Login with ec=28, ep=[E011], before any read.
dataConfigMd5, init.add, login.ext, and the probe template are app-integrity and anti-fraud surfaces. They’re recorded here as protocol facts only; reproducing them is out of scope for this project. psh and shumeiBoxId are in scope. goclient sends the real client’s psh for its platform, see Identity, login & session. It also reproduces the ShuMei device-profile registration that mints shumeiBoxId, see ShuMei device fingerprint.
ec/ep vs errorMessage: two distinct error channels
ec/ep are SFS2X’s own built-in protocol error fields, not app-level ones; the game’s BaseUtils transport reads them and formats them through the stock SFS2X error table (BaseUtils.decompiled.cs:31893-31958). ec=28 is SFS2X’s generic custom-error passthrough (SFSErrorCodes.errorsByCode[28] = "{0}"), it fires when the server’s Zone Login Event Handler throws a rejection carrying an arbitrary string, which shows up as ep[0]. Observed live: "E002", "E005", "E011". A ban, "4;<banTime>;<banType>;<reason>;<roleName>", was reported by C485 in discussion #53 (October 2026, not seen here); see Reading a ban. E011 maps client-side to ClearAccessToken() (despite firing even when p.at is omitted entirely, so the name isn’t a literal description of the server check). The 1.0.364 C# names it ERROR_LOGIN_ACCESS_TOKEN (static-analysis-only).
E005 was previously read as a generic, uncategorized bucket. The 1.0.364 C# maps it to its own ERROR_MAINTENANCE code and shows a maintenance dialog (static-analysis-only). Live, though, the server returned E005 for a token presented under the wrong platform identity (rows 2 and 4 of the reconnect-wall table above), not during maintenance. Read “maintenance” as the client’s UI bucket for the code, not as the server’s reason. See Identity, login & session for the full code table.
The real post-login bootstrap: bare init, not push.init.build
push.init.build exists and is wired but never fired once across roughly a dozen live sessions. The actual all-in-one bootstrap is the bare init push (InitMessage.HandleMessage), which fans one payload out to essentially every data manager in one shot:
Resolved: a silent Zstd decompression bug, not rate-limiting. The
init push was never actually missing, it was arriving and being silently discarded. packet.go’s ReadPacket already correctly detected the server’s Zstandard-compressed frames (header bits 0x20 compressed + 0x10, the useLZ4 flag repurposed as “useZstd”), but simply returned an error instead of decompressing, decompression was never implemented. Every read loop waiting on the post-login init push treated that error exactly like a closed connection: no crash, nothing that read as a decode error, just silence indistinguishable from “the push never came.” That’s the entire mystery this investigation originally chased, the Handshake experiments, the active-pull login.init attempt, the longer timeouts, the 3-attempt reconnect loop, none of it could have worked, because none of it touched the real bug. Confirmed via live capture: the server’s init bootstrap push is roughly 313KB of Zstd-compressed data on the wire. The fix was a real decoder (github.com/klauspost/compress/zstd, a shared lazily-initialized zstd.Decoder, DecodeAll) dropped into the compressed branch of ReadPacket. Getting that 313KB payload to then parse correctly surfaced two further bugs in sfsobject.go’s array-tag decoding, see the root-cause section below. Once both were fixed, init arrived cleanly on the very first login in every post-fix login tested; neither the reconnect loop nor the active-pull fallback ever actually had to fire. Of the two mechanisms built to chase this symptom, only the three-attempt reconnect-on-timeout loop has since been removed (maxLoginAttempts reduced back to 1, live testing showed any reconnect attempt reliably breaks a working session with ec=28/E011 or E005, it doesn’t recover a missing init; see login.go’s comment above maxLoginAttempts for the full history). The halfway active-pull login.init send inside waitForInitPush is a separate mechanism and was not reverted, it remains live, unconditional code: partway through the init-wait window, if the push hasn’t arrived yet, it still sends login.init as a real, currently-registered active-pull command, kept in place as a genuine fallback for a server that stays silent for a reason other than this bug.Building type IDs: corrected, authoritative mapping
The authoritative source isGlobal_EnumType.lua’s BuildingTypes table (lua_raw/2815_Global_EnumType.luac, decompiled on demand), every building’s internal dev codename and numeric ID, no positional inference needed. Cross-referenced against the shipped English locale strings (assets/locale/23405/en.bin, gzip-compressed, decompresses to ~37,400 flat length-prefixed key/value string pairs) for the canonical player-facing display name, since the internal codename and shown name frequently differ:
| Display name | Internal enum name | Building ID | Collect command | Collects |
|---|---|---|---|---|
| Farmland | LW_BUILD_FARMLAND | 10201000 | building.production.collect {uuid} | Food |
| Iron Mine | LW_BUILD_QUARRY | 10202000 | Iron | |
| Gold Mine | LW_BUILD_GOLD_MILL | 10207000 | Gold | |
| Smelter | LW_BUILD_SMELTERY | 10209000 | Refined metal | |
| Material Workshop | LW_BUILD_MATERIALS_WORKERSHOP | 10211000 | Refined material | |
| Training Base | LW_BUILD_TRAINING_CENTER | 10210000 | Training points (item 8001) | |
| Oil Well | LW_BUILD_PETROLEUM | 10221000 | Petroleum | |
| Drone Parts Workshop | LW_BUILD_TACTICAL_COMPONENT | 10233000 | Drone Parts (item 7038) | |
| Component Factory | LW_BUILD_SQUAD_EQUIP_FACTORY | 10214000 | Item 630011 | |
| Spore Factory I | LW_BUILD_SEASON6_QUARTZ_FACTORY1 | 842000 | Obsidian | |
| Spore Factory II | LW_BUILD_SEASON6_QUARTZ_FACTORY2 | 843000 | Obsidian | |
| Spore Factory III | LW_BUILD_SEASON6_QUARTZ_FACTORY3 | 844000 | Obsidian | |
| Spore Factory IV | LW_BUILD_SEASON6_QUARTZ_FACTORY4 | 845000 | Obsidian | |
| Tactical Institute | LW_BUILD_DOMINATOR_TRAIN | 10235000 | Items for Overlord training; 321 successful live collections | |
| Crystal Factory | LW_BUILD_CRYSTAL_STONE | 10310000 | building.production.collect {uuid}. Static-analysis-only: Crystal Factory is new in 1.0.364 and sits in the Lua’s ProductLineBuilds; the Season 6 week-card building is the current season week card’s farm building, which the real client collects alongside that set. goclient collects both, but neither has collected live yet. | Unconfirmed |
| Spore Factory (Weekly Pass) | LW_BUILD_SEASON6_WEEK_CARD | 846000 | ||
| Tactical Center | LW_BUILD_TACTICAL_CENTER | 10143000 | None. Not production lines. building.production.collect never returned E000001 “Building type error” for them, but across 342 consecutive scheduled runs every attempt got errorCode=602026 and never status=1 (confirmed live). All 6 sit at lv=1 with no prodST/prodT/prodStatus/prodET fields at all. The 1.0.364 Lua settles why: none of them is in ProductLineBuilds, so the real client never sends a collect for them. goclient no longer does either. | Nothing |
| Armament Institute | LW_T11_Research | 10227000 | ||
| Trade Fleet -1 (Truck Station I) | LW_BUILD_TRUCK_STATION_1 | 10138000 | ||
| Trade Fleet -2 (Truck Station II) | LW_BUILD_TRUCK_STATION_2 | 10139000 | ||
| Trade Fleet -3 (Truck Station III) | LW_BUILD_TRUCK_STATION_3 | 10140000 | ||
| Trade Fleet -Ω (Truck Station IV) | LW_BUILD_TRUCK_STATION_4 | 10141000 |
“Armed Truck” is not in this table. It was originally guessed to be
Scene/LWHummerScene, then guessed again to be Truck Station above (a real but wrong lead, the name matched suggestively, but zero collections ever succeeded on it). Neither was right: “Armed Truck” is its own building, 10115000 LW_BUILD_BATTLE_HANGUP_REWARD, whose reward is claimed account-wide, and LWHummerScene is only its 3D visualization (see below). See Armed Truck: a building whose reward is claimed account-wide below for what it actually is, confirmed via a live packet capture of the real game client.building.camp.collect, reasoned as troop training rather than a ProductLineManager type. Live testing disproves this directly, building.camp.collect against a real Training Base uuid returns errorCode=E000001, "Building type error". Reading the actual handler, 2944_Net_Msgs_BuildingCampCollectMessage.lua, shows building.camp.collect only covers three building types: Military Camp (LW_BUILD_MILITARY_CAMP, 10103000), Smith Shop (LW_BUILD_SMITH_SHOP, 10101000), and Tactical Chip Factory (LW_BUILDING_TACTICAL_CHIP_FACTORY, 10232000), not Training Base. The Tactical Chip Factory pairing is disputed in the 1.0.364 Lua, which also has the factory UI sending chip.collect {}, see City & building. LW_BUILD_TRAINING_CENTER is in fact listed inside 2067_DataCenter_ProductLine_ProductLineManager.lua, the same module that owns building.production.collect, and sending that command against a real Training Base uuid was confirmed live to work immediately, granting item id 8001. Training Base belongs with the other production-line buildings after all, the table above is corrected accordingly.
“Spore Factory” was also previously documented as non-permanent, uncollectible seasonal content, also corrected. The four Season 6 tiers (LW_BUILD_SEASON6_QUARTZ_FACTORY1-4, internal codenames left over from an earlier season’s reskinned content) are real, currently-active, collectible buildings on a real account, confirmed live via building.production.collect against each of their four real uuids.
Four more building types beyond the original six were confirmed live in a follow-up pass: Oil Well, Drone Parts Workshop, Tactical Center, and Armament Institute. All four accept building.production.collect (in the one wrong-type case actually tested, Training Base sent to building.camp.collect, see above, the server returned errorCode=E000001, not 602026; that single precedent is what’s relied on below to read a 602026 response from Tactical Center or Armament Institute as confirming the pairing is correct even though their timers hadn’t completed, a wrong-type request was never directly tried against building.production.collect itself). At the time, the requested names “Tactical Institute” and “Component Factory” had no exact 1:1 locale match found by static analysis, so Armament Institute and Drone Parts Workshop were used as closest-guess stand-ins. That guess was wrong, see the correction below. Both Tactical Center and Armament Institute responded live with errorCode=602026 (“in production, please be patient”) rather than completing a collection, which was read at the time as confirming the command pairing. That reading turned out to be wrong; see the resolution below.
A further four Truck Station tiers were added in a later pass, on the same “command pairing looks real” basis as Tactical Center/Armament Institute, also still unconfirmed. These were found while chasing “Armed Truck” specifically: SHAKE_COLLECT_TRUCK_RES (a setting key dedicated to trucks, parallel to the general SHAKE_COLLECT_RES) and BuildBubbleType.TruckReady/TruckReward/TruckTravelling (modeling a dispatch-travel-collect lifecycle) both looked like promising matches for “Armed Truck.” All four LW_BUILD_TRUCK_STATION_1-4 exist on the real account and accept building.production.collect without an E000001 type-mismatch, but, like Tactical Center and Armament Institute, every attempt across multiple full -collect runs got 602026, never a real collection. This lead turned out to be a dead end for “Armed Truck” specifically (see below). The buildings stayed wired in only because the command pairing looked valid, until the resolution below. The two leads pointed at different things. SHAKE_COLLECT_TRUCK_RES is the Armed Truck’s own shake-to-collect setting (en shake_collec_armed_title) and sends lw.pve.idle.reward. The TruckReady/TruckReward/TruckTravelling bubbles belong to the four Truck Station buildings, the berths of the railway trade trucks (“Trade Fleet -1” to “-Ω”), whose cargo is claimed with train.batch.reward (static-analysis-only).
The “Tactical Institute”/“Component Factory” naming guess above was wrong, corrected via a live packet capture of the real game client tapping both buildings directly. The uuids the real client sent to
building.production.collect resolved to bId=10214000 (LW_BUILD_SQUAD_EQUIP_FACTORY) and bId=10235000 (LW_BUILD_DOMINATOR_TRAIN), neither matches Drone Parts Workshop or Armament Institute. Both are locale-confirmed: 10214000’s building.lua row names it via loc-key 2000574 = “Component Factory”; 10235000’s name loc-key resolves directly to “Tactical Institute” (its description: “Produces items for Overlord training levels”, the same “Overlord” idle-reward track from lw.pve.idle.reward). Finding the second one took extra digging: a naive lookup of the key building_name_10235000 in the flat length-prefixed locale key/value store initially returned nothing at all. The key and its value were actually still there, just merged into an adjacent malformed entry by a parser desync a few bytes earlier in the stream (a length byte that happened to also be valid ASCII, throwing off alignment until the parser resynced), re-scanning for the substring rather than an exact key match recovered it.Component Factory (10214000) is now genuinely confirmed, a real status=1 collection (item 630011) on first live test. Tactical Institute (10235000) got errorCode=602026 on its first test, but unlike Tactical Center/Armament Institute/Truck Station, its raw building_new data carries real prodST/prodStatus=1/prodET timestamps, a genuinely active production cycle, not a dormant one. It has since collected successfully 321 times. Drone Parts Workshop stays in the client as a confirmed production line; Armament Institute turned out not to be one at all.Resolved (2026-10-04): the six “pairing looks real” buildings are not production lines. Live evidence and the 1.0.364 Lua agree:
- Confirmed live: across 342 consecutive scheduled runs, Tactical Center, Armament Institute, and Truck Station I-IV returned
errorCode=602026on every attempt and neverstatus=1. Over the same runs, Tactical Institute collected successfully 321 times. - Static-analysis-only: the real client sends
building.production.collectonly for buildings inGlobal/EnumType.lua’sProductLineBuilds, plus the current season week card’s farm building. None of the six is in either set. The real client also skips any building withoutprodST(ProductLineManager:GetNextCollectTimereturns-1) and shows tip 602026 locally instead of sending anything.
goclient no longer sends a collect for these six, and it now skips any building without prodST. See City & building for the full set.-collect runs against the real account (before the Truck Station tiers existed in the client) produced 38 and 39 successful collections (out of 41 attempts each) across what were then the 12 confirmed building types, the original six, Oil Well, Drone Parts Workshop, and the four Spore Factory tiers all completed real collections with resource deltas visible in the live push.resource.info / push.resource.item.update server pushes (food, iron, gold, refined metal, refined material, training points, petroleum, Drone Parts, and obsidian all observed increasing). The remaining attempts in both runs got errorCode=602026, "In production please be patient": for buildings whose production timer hadn’t finished yet, and for every attempt on Tactical Center and Armament Institute, which turned out not to be production lines at all (see above). Component Factory’s later confirmation brought the total to 13, and Tactical Institute’s later collections bring it to 14 confirmed building types.
Armed Truck: a building whose reward is claimed account-wide
Resolved. “Armed Truck” is a city building,
10115000 LW_BUILD_BATTLE_HANGUP_REWARD (locale 135202), the one that shows the idle-reward bubble. It isn’t a production line, and its reward isn’t collected per building. It’s also not LW_BUILD_TRUCK_STATION_1-4 above, which hold the railway trade trucks. Scene/LWHummerScene turned out to be the same feature, not a separate minigame: it’s the “Jeep Adventure” 3D scene behind this reward panel. It reads stage_idle_reward and lastIdleRewardTimeStamp, fills the truck’s cargo bed as the pool accrues, and its reward button sends lw.pve.idle.reward {action: 0} to open the claim popup. Nothing played in the scene changes the reward (1.0.364 Lua, static-analysis-only). An earlier version of this page called it an unrelated driving/combat minigame with no network commands; that was wrong. Confirmed via a live packet capture of the actual game client: “Armed Truck” is one of two independent tracks (the other is “Overlord”) in a dedicated “Truck Rewards” idle/AFK reward panel, collected through a single account-level command with no building uuid involved at all: lw.pve.idle.reward, with an action field, 0 peeks at the accumulated pool without claiming it, 1 claims it.action=0, then action=1, then action=0 again, peek, claim, refresh. Replaying the same three-call sequence through this Go client got the identical shape of result:
action=1 response is the load-bearing evidence, not just an echo of the peek: it includes real post-collection account total values for each resource, and the immediate follow-up action=0 peek showed the pool reset to genuinely empty, proving the claim actually drained a real accumulated reward, not that the command merely succeeded superficially. dominatorReward (the “Overlord” track) was empty in this particular capture, so its claim payload shape wasn’t directly observed, but the same action=1 call is expected to cover both tracks together since they share one panel and one command.
Wired into the Go client as CollectIdleReward (buildings.go), called automatically at the start of every -collect run, independent of the building-uuid loop since this command needs no uuid at all.
Visitors: delivered free in init, greeted with visitor.operate
Confirmed live. City visitors, the
?-bubble NPCs that occasionally appear near the base, need no separate discovery request at all. They’re delivered as a sibling field of building_new in the same bare init bootstrap push (see The real post-login bootstrap above): visitor={addNum, maxNum, list=[{uid, eventId, startTime, type, extendInfo, visitorId}, ...]}. maxNum was observed live as 5. Greeting one is visitor.operate {uid, operate: 1}, confirmed via a live packet capture of the real game client tapping two visitors in its city, one visitor.operate call per tap.init payload, this was the most-recently-arrived of the three (eventId=2005, the newest startTime), the real client had greeted the other two (eventId=2002 and eventId=2001, both older) and left this one alone. Read together: visitors apparently go through an arrival delay/animation window after showing up before they’re actually greetable, and visitor_err_coming is the server’s real, typed way of saying “not yet.” This confirms the full path end to end, parsing visitors out of init, building the request, round-tripping it, decoding a real typed response. The real client’s own capture did successfully greet those other two visitors (visitor.operate {uid, operate: 1}, one call per tap), but the response to those two specific calls fell outside the successfully-decoded portion of that capture (a stream-reassembly artifact past a certain point, the same class of issue seen with the Truck Rewards capture above), not because no visitor was greetable. So a successful greet’s reward payload has still not been directly observed, but the gap is a capture-decoding artifact, not a missing greetable visitor.
Wired into the Go client as GreetVisitors (visitors.go), called automatically on every -collect run alongside CollectIdleReward, for the same reason: no building uuid involved.
Alliance automation: help-all and gift claiming, both true bulk commands
Confirmed live, both via real packet captures of the actual game client. Unlike mail (below), neither of these needs per-item uids at all, both are genuine “do everything of this kind” bulk commands, closer in shape to the Armed Truck idle reward than to mail claiming.
al.help.all) bulk-completes every pending alliance-member help request (construction/research speedups other members asked for) in one call. Reading the request-construction Lua directly (extracted/lua_decompiled/4368_Net_Msgs_Alliance_AlHelpAllMessage.lua) shows the wire request carries exactly one field, cmdBaseTime, everything else the UI passes in (helpBtnPos, toPos, isOnlyDisperse, isOnlyShowDiff) is purely local animation state, never sent. The real client sent an absolute Unix-epoch-milliseconds value; replaying the same shape through this Go client with a live time.Now().UnixMilli() got a real response echoing the account’s own allianceId back with no error. The Lua handler shows this call is unconditional and safe even with nothing pending, it’s a no-op success, not an error, in that case.
Claiming alliance gifts (alliance.reward.allreceive) is the “Claim All” button on the Alliance Gifts panel, and needs only a type field. The panel has two independently-claimed tabs; reading the handler’s own tip-string branch (extracted/lua_decompiled/4428_Net_Msgs_Alliance_AllianceReceiveAllGiftMessage.lua) pins the mapping exactly: type == 1 shows locale key alliance_system025 (“Premium Alliance Gifts”), everything else shows alliance_system024 (“Regular Alliance Gifts”), so type=1 is Premium, type=2 is Regular. Only Regular was actually packet-captured live (the tips banner afterward read “2 Regular Alliance Gifts were claimed,” confirming type=2); type=1 for Premium is included on the strength of that same code branch, not independently packet-captured. Replaying both through this Go client got real, well-formed responses for each: {type=1, receiveResult=0} and {type=2, receiveResult=0}, receiveResult=0 means nothing was pending at test time (the account had just been cleared manually moments before), not an error.
Wired into the Go client as HelpAllianceMembers and ClaimAllianceGifts (alliance.go), both called automatically on every -collect run.
Alliance tech donation: bulk tree discovery, then one targeted donate
Confirmed live, end to end, through this Go client. Unlike help-all and gift claiming above, this isn’t a single blanket “do everything” call, donating requires first discovering which one tech (out of dozens) is currently marked “Recommended” by the alliance, then targeting that specific
scienceId. Both steps are confirmed with real evidence, not just static analysis.science.data.refresh, no parameters at all, which returns the account’s entire alliance tech tree in one response: every scienceId with its currentPro/needPro donation progress and a state field. A live call returned ~45 entries; exactly one had state=1, every other had state=0. That one entry’s progress, currentPro=4951850/needPro=8000000, matched the “4.9M/8.0M” bar shown under the thumbs-up-badged “Senior Scientist” tech in the real game UI at essentially the same moment, confirming state=1 is the recommended-tech flag. (al.science.recommend {scienceId, state} is the real client’s own way of setting this, an alliance-officer action, matching the “Cancel Recommend” button seen in the UI, but nothing here ever calls it; this only reads the current value.)
Donation is al.science.donate {scienceId, option: 1}, confirmed via a real packet capture of the actual game client tapping the free (coin-cost) donate button. option’s exact range of valid values wasn’t determined (only 1 was ever observed, for a successful donation), so 1 is reused as-is rather than guessed at.
“Holding the donate button longer adds a multiplier in the UI” turned out to be pure client-side behavior, not a server feature. Reading both donate messages’ request-construction Lua directly (extracted/lua_decompiled/4380_Net_Msgs_Alliance_AlScienceDonateMessage.lua and ..._AlScienceGoldDonateMessage.lua), neither has a count/times/multiplier field on the wire. Holding the button just fires the same single-donation request repeatedly while held; the “multiplier” is a running visual counter on the client, not a batched call. That distinction matters because the free donate path is real-rate-limited server-side: al.science.refreshNum (also confirmed live) returned maxNum=30, the size of a pool of regenerating donation charges, not donations per day: useNum is the number left, and one charge refills every refreshTimeBlock (1200000 ms, 20 minutes). A real errorCode=120471 response was first read as a per-donation cooldown, but the Lua (1.0.364 and 1.0.370) shows it means the charges are used up (see the note below), which also explains why two live -collect runs roughly 3 minutes apart both donated successfully. The gem-cost “Unlimited Attempts” path (al.science.donate.gold {scienceId}, no option field) has no such cooldown, useGoldNum/maxGoldNum both came back as 999999999, but spends real premium currency per use, so it’s deliberately not wired into automatic collection.
Since the 1.0.370 fixes the donation reads the charges first, as the client does: science.data.refresh, then al.science.refreshNum {scienceId}, and a donation only while useNum is above 0. It logs useNum, donateAvailable and maxdonate.count before the first donation. 120471 (charges used up) ends the run’s donations at Info and 120836 (seen live in the run right after the 02:00 UTC day reset; in no 1.0.370 source) with a Warn; neither is a run error (static-analysis-only).
Live-tested through this Go client end to end: science.data.refresh correctly found scienceId=10011900 as the recommended tech, and al.science.donate against it returned a real, well-formed response, errorCode=120471, "Donate science CD time is not finish", the expected cooldown error, since the real account had just donated minutes earlier in the same capture. That confirms the full discovery-then-donate path end to end, even though this particular attempt was correctly blocked by a real, working rate limit rather than a client bug.
1.0.364 Lua:
120471 is a donation-charge limit, not a per-donation cooldown (static-analysis-only). The locale text for 120471 is “Donation Count has reached its limit, please wait.” The free donate path holds regenerating charges: useNum of maxNum, refilled every refreshTimeBlock ms, with the next refill at timePoint. The real client reads useNum from al.science.refreshNum {scienceId}, sent right after science.data.refresh with the first scienceId, or from the al.science.donate response. It shows 120471 itself when useNum <= 0, without sending a donation. That fits the two runs 3 minutes apart that both donated: each spent a charge. The live errorMsg string (“Donate science CD time is not finish”) differs from the locale text; both are facts about the same code.DonateRecommendedAllianceTech (alliance.go), called automatically on every -collect run, one free donation attempt toward whatever the alliance currently has recommended, treating 120471 as a benign “no charge left” answer.
Mail: claimable, but scoped per category with string-GUID uids
Confirmed live, via a real packet capture of the actual game client tapping “Claim All” across several mailbox category tabs (Alliance, Event, Season). Two things this contradicted from a naive read of the command catalog: mail uids are string GUIDs (e.g.
1f9f236259ff4ae285bf5b20bdac2586), unlike every other uuid this project deals with (buildings, visitors, all int64s); and claiming is scoped per category (type), not global, the real client sent one mail.reward.batch call per tab, each with only that tab’s mail uids and that tab’s type (observed live: 3, 4, and 9 for three different tabs; the 1.0.364 Lua later identified these as mail group ids, see the note below).chat.get.system.mails, paginated via the response’s more/lastUid/lastMailTime fields, following the real client’s own request shape (extracted/lua_decompiled/5018_Net_Msgs_Mail_MailGetMutiMessage.lua: clientseq, time, count, firstCmd, isAll). One real gap: the captured request already had a non-empty clientseq/time matching a specific already-known mail uid, because the real client was mid-session with a warm local mail cache built from a long history of push.mail notifications, the true cold-start values were never directly observed. This Go client used to send time: 0, clientseq: "" on its first call (still with firstCmd: "YES", exactly as captured), on the theory that’s the correct “give me everything” cold-start shape. It now sends the client’s own cold start, clientseq: "0", time: 0 (MailDataManager.lua:97-98, 151-160); that value is static-only so far, so check the page count on the first live run. The empty-clientseq shape held up well in testing: a fresh call returned 326 real mailbox entries across multiple paginated pages, not just a handful, but whether that’s genuinely the account’s full history or just a large recent window hasn’t been independently verified against the real client.
Each mail object reports uid, type, and rewardStatus; rewardStatus == 0 is read as “has an unclaimed reward,” matched by direct observation (the one fresh mail seen in a push.chat.get.system.mails push had rewardStatus=0 and real embedded reward data, and had not yet been claimed by the user’s actions in that capture).
Claiming a reward sends mail.reward.batch {uids, type} once per mailbox group, with the group id as type, as the client does.
goclient now sends the client’s type. The real client’s MailRewardBatchMessage sends type as a UtfString holding an internal mail group id, not the mail’s own raw type: 2 report, 3 alliance, 4 activity, 5 system, 6 daily, 7 charge, 8 favor (also any mail with saveFlag==1), 9 season. Mail whose raw type has no group id, or is in the hide group 1, never gets claimed in bulk. The 3, 4, and 9 in the original capture are exactly the alliance, activity, and season group ids. goclient used to send type as an Int holding the raw mail type; confirmed live, the server accepted that, returning {success=true}, and each unclaimed mail disappeared from the inbox after one run. It now sends the group id as the client does, which is static-analysis-only until the next live run.ClaimAllMail (mail.go), called automatically on every -collect run. Live-tested end to end after the fix: a full mailbox of 350 real entries, correctly paginated across 4 pages, all successfully marked read in one run. The reward claim has since run against real unclaimed rewards too: mail.reward.batch returns {success=true}, and each unclaimed mail is gone after one run.
Alliance Duel and duel spend commands
Confirmed live on 2026-10-06 (a Tuesday, Base Expansion), through
goclient’s -run path against the real account. Field names and shapes only; values that identify the account are left out. The protocol background is on Alliance Duel.Duel detection: activityid, not id
The first live run of the duel scheduler reported “no duel day running” on a duel day. Two things were wrong, and both were only visible live:
- The detail read asked for the wrong id. The duel’s
initentry is{id: 55000, activityid: "70000", name, startTime, endTime, readyTime, matchGroupId, uuid}. The client sendsactivityidwhen an entry has one (ActivityInfoData.lua:126-128, 160-161).hero.event.info.get {activityId: "55000"}got a bare{success=true}and nothing else, even with the session held open for another 10 seconds.{activityId: "70000"}got the full reply:{activityId, type: 15, ranking, isFix, eventList}. - The day window is
st/et. The liveeventListentry has nobegintime/endtime, the fields the client’sActivityEventInfo:ParseDatareads first.
110001), the eight scoring ids, all nine chest thresholds, and a day end of 02:00 UTC. -run radar-claims was then refused with “today’s duel theme (Base Expansion) doesn’t score it”. The arms-race duel-chest claim had used the same read, so it had never seen duel data either.
build.ccd.m.new, items only
- Diamonds:
remainGoldequaled the balance frominituser.gold. - Items:
itemCostArrlists each item spent:costNumis how many were used,counthow many remain. - Timer:
buildInfo.uTcame back earlier by the item time. - Duel score: read again on a fresh login, it rose by 150 per item-minute. That’s the score row’s 50 multiplied by the account’s duel effects, matching the client’s
units × points × (1 + Σ effects).
queue.ccd.m.new and building.camp.accel are static-analysis-only so far.
Radar: Help Teammates, executed and left unclaimed
- Each event’s
typematched thedetect_eventtable’s type for itseventId, for every listed task. - After
help.end, three Help Teammates tasks were listed in state1(finished), each withcostnow1. - Stamina fell by 10 per task, read from
initplayerInfo.staminaon the next login. - No
receive.detect.event.rewardwas sent. detectInfo.eventNumis the stock andnextRefreshTimethe next refresh, in ms. The next refresh time moved by about 50 minutes between two reads 8 minutes apart, with the help tasks run in between, so it isn’t a fixed wall-clock schedule.
Other reply shapes seen
lottery.hero.cardwithuseFree: 1replied{id, isTen, totalLottery, lotteryHero: [{id, num, type}], dailyFree, dailyFreeLimit, dailyFreeNextFreshTime, pityType, pityCurProtectNum, pityProProtectNum, pityMaxProtectNum, pityProType, pityProNum, wishPityCurNum, …}and no itemisedreward.worker.lottery.info {officerId}returnsnextFreeTimein ms.al.science.donatereplies{scienceId, useNum, maxNum, refreshTimeBlock, donateAvailable, dp, point, para1, para2, gold, allianceId, maxdonate: {count}, options: {…}}. It carries the diamond balance asgold.al.science.refreshNumreplies{scienceId, useNum, maxNum, useGoldNum, maxGoldNum, goldNum, timePoint, refreshTimeBlock}.hero.dispatch.listreplies{todayAssistNum, todayStealNum, ls: [{uuid, heroList, completionTime, actEndTime, ownerId, allianceId, conditionIndex, followCount, stealInfoList, …}]}, with nogoldfield. A diamond check after a dispatch can’t read the balance from it.
Recruit ticket goods
Static-analysis-only, from thegoods table and DataConfig:
Init
items entries carry the goods id as itemId or goodsId and the count as count, num, or itemLeftCnt (ItemInfo.lua:40-64).
Firework chests and world tiles over SFS2X
Firework chests normally reach the client as alliance-chat posts 693 and 695 on the separate chat WebSocket. The opt-infireworks-chat reads those posts (read-only) and sends the card’s find.fireworks.gift.world.point {uuid: Long, ownerUid: Utf}, which replies {currServerId, pointId} (0: gone, firework_tips_1018); it then reads that one block and claims as fireworks does (static-analysis-only). On 2026-10-06 the real account confirmed a game-socket path that needs no chat:
get.fireworks.info.listwith no params replieserrorCode=firework_tips_1013(“Target player is in a different Warzone”). It looks up one player’s firework shows; it isn’t a chest list.al.rank {allianceId: Utf}lists the alliance’s members. Eachlist[]entry carriesuid,pointId,serverId,curServerId,online,offLineTime,mainCityLvandrank, among others.get.al.points {serverId}replied normally whenserverIdwas sent as an SFS2X Long, although the client declares it Int. The server coerced the type here; don’t assume it does everywhere.world.get.blockis sent with the client’s typing (WorldGetBlockMessage): Int scalarsbigMap,x,y,serverId,worldId,type,viewLvl,timeStamp,blockSize,leftBottom,rightTop; an IntArrayindexof block ids,(y/10)*100 + x/10on the 1000×1000 map; andclearUuidSeton the first request only. One request covered every member HQ (70 points). Each point’s protobufWorldPointInfodecoded, with the HQ’sBuildInfocarrying the owner uid. The server answers tile reads from a session that never entered the world scene.- Confirmed live: none yet. The chest list itself is
BuildInfofield 54 (fireWorksGiftList {uuid, configId, sendTime, num, max, index}, tag bytesB2 03). No chest was live during the test, so field 54 is static-analysis-only so far. - Static-analysis-only: the claim is
get.fireworks.gift {uuid: Long, ownerUid: Utf, type: Int}, wheretypeis 1 for firework configs 671001-671005 and 0 otherwise. A type-0 chest must come from a current alliance member; a type-1 chest needs the building to belong to your alliance (FireworkWorldBuildBubble.lua:281-296, 1.0.370). - Since the 1.0.370 fixes the block reads follow the client’s viewport (
UpdateLWAoi_Normal,Assembly-CSharp.decompiled.cs:179758-179842): wanted blocks are grouped into 8-connected clusters and read in rectangles of at most 160 blocks, each request’sindexbeing the rectangle’s blocks not read yet,leftBottom/rightTopits corners andx/yits centre, 500 ms apart.fireworks,fireworks-scan,alliance-treasures(-plan)and the new opt-in base-bubble, city and S0-boss claims share one such scan per run, three blocks around each member HQ:al.rankandclearUuidSetgo out once.fireworksalone therefore reads three blocks around each HQ, not one (static-analysis-only). The error codes arefirework_tips_1009(daily cap),1014(expired),1015(full),1016(already claimed) and1017(too fast).
Allies’ dug radar treasures
The alliance channel’s “‘s treasure at (x, y) has been dug up!” (post 600) also reaches the client only over the chat WebSocket, but the treasure itself is an ordinary world point. Since 1.0.370 the opt-inalliance-treasures-chat reads that card with the read-only chat reader: the tap’s detect.event.get.treasure.claim.info {uuid: Long, source: Int 1, targetServer: Int} replies pointId, num, array[] (claimers), and the one block holding pointId is read (static-analysis-only). Everything here is static-analysis-only:
- The point is a
WorldPointInfoofpointType21 carryingTreasurePointInfo(field 11):uuid,ownerUid,eventId(a string),completionTime,allianceId,rewardUserList(the claimers),complete,expireTime,type(1 radar, 3 activity radar, 11 off-season) andmultiple. - The server places a radar task near its owner’s HQ, at a distance nothing in the client states.
alliance-treasures-planreads every block within 3 blocks of each member HQ’s block (at least 30 tiles each way) and logs each treasure’s distance from its owner’s HQ. - The claim is
detect.event.claim.treasure {uuid: Long, targetServer: Int}, the point’s own uuid and serverId. It is free and needs no march. A treasure takesdetect_event.para2’s cap ×multipleclaimers: 20 for radar treasures 25001-25198, 10 for 1025001-1025168. 801348(“Already taken. One reward per player.”) andactivity_wajueji_27000_tips13(expired) are taken as benign. The daily cap’s code is unknown, so any other error stops the run.
Dig mini-games: what the live account showed
All of these are confirmed live, read-only, on 2026-10-06:get.detect.infoand init carry no radar-ruin or city-ruin dig board when none is active.hero.dispatch.treasure.v2.get.info {}repliesrewardList[{isReward, rewardInfo[], target, quality}]and a score.alliance.boss.act.info {serverId}repliesdigGameInfo {uid, mapConfigId, rewardState, endTime, uuid}alongside the drill data.rewardState=2means that vault is finished.
detect.event.dig.game.receive.hammer {eventUuid}, building.dig.game.receive.hammer {buildingUuid}) is offered while the board’s rewardState is 4 (NotBegin). The dispatch dig’s isHammerGetMax is the daily cap on hammers received from allies, not this gate (DigTreasureManager.lua:244-249).
Root cause: packet-decode bugs, not protocol or anti-fraud gates
Both of the “blocked” results elsewhere in this section trace back to the same live packet capture, even though they turned out to be mechanically distinct bugs. The capture:tcpdump against the locally installed /Applications/Last War.app (the real iOS / Mac Catalyst build) while manually logging into the same real account through the actual app UI. Since the SFS2X game socket is plain TCP with no TLS, this recorded cleartext-after-XOR application data directly, no TLS interception needed. The same packet.go/sfsobject.go the Go client already used decoded the capture directly, see Capturing and decoding traffic for the full reproducible pipeline.
Decoding that one real session did two things at once: it surfaced the real Login request’s exact field values, byte-diffed against the Go client’s own encoding (which is what led directly to the identity-mismatch fixes above), and it handed the decoder a real ~313KB Zstd-compressed init payload to chew on, which is what exposed both the missing Zstd path in packet.go and two SFSObject array-decode bugs in sfsobject.go. None of the small packets decoded earlier in this research happened to exercise those code paths, so both bugs sat latent until something this size and this well-populated came through.
packet.go’s ReadPacket had always correctly detected the compressed frames (header bits 0x20 + 0x10, the useLZ4 flag repurposed as “useZstd”) but simply errored instead of decompressing, never implemented. Every read loop waiting on init silently treated that error as connection-closed. The fix: a real Zstd decoder (github.com/klauspost/compress/zstd, a shared lazily-initialized zstd.Decoder, DecodeAll).
Getting that decompressed payload to parse correctly then surfaced two bugs in sfsobject.go’s array-tag decode switch. (a) LONG_ARRAY (tag 13), FLOAT_ARRAY (tag 14), DOUBLE_ARRAY (tag 15), BOOL_ARRAY (tag 9), and SHORT_ARRAY (tag 11) weren’t implemented at all, only BYTE_ARRAY/INT_ARRAY/UTF_STRING_ARRAY existed, because those were the only array types any previously-decoded (small) packet ever happened to contain. Fixed by implementing all five against the decompiled Unity SDK’s BinDecode_BOOL_ARRAY/SHORT_ARRAY/LONG_ARRAY/FLOAT_ARRAY/DOUBLE_ARRAY functions, each a 2-byte (i16) count plus N big-endian elements, via a shared GetTypedArraySize helper. (b) BYTE_ARRAY (tag 10) specifically had a real length-prefix bug: it read the same 2-byte count as every other array type, but the real Unity SDK’s BinDecode_BYTE_ARRAY doesn’t go through GetTypedArraySize at all, it calls a bare 4-byte (i32) ReadInt instead. That’s a genuine SFS2X wire-format asymmetry, not an implementation guess, confirmed by reading the decompiled function directly. It silently corrupted decoding partway through any packet containing a real byte-array value, which, like the missing array types, never happened to matter until this payload.
Net effect. Once both fixes landed,
init arrived cleanly on the first login attempt in every post-fix login tested, no reconnect loop, no extended timeout, and no active-pull fallback ever needed to actually fire. Of the two mechanisms built earlier in this investigation to chase the missing-init symptom, only the three-attempt reconnect-on-timeout loop was solving the wrong problem, and only that loop has been removed (max login attempts reduced back to 1), especially since repeated reconnect attempts against a stale or identity-mismatched token were themselves tripping E005/E011, meaning even “reconnect gets blocked after one attempt” was downstream of the same identity-mismatch root cause above, not a separate rate-limit or session-lock mechanism. The halfway active-pull login.init send inside waitForInitPush is a separate, still-live mechanism, a real, currently-registered active-pull command sent partway through the wait window as a fallback in case the push itself never arrives (report 15’s init_push_missing_after_login finding #2), and was deliberately kept in place, unconditionally, not reverted: it’s still the correct behavior for a genuinely silent server, even though this particular investigation’s root cause turned out to be the Zstd bug above rather than a missing push. No rate-limiting, no session-lock, no already-connected gate was ever found to exist anywhere in this path.ta question is no longer open. Reconnect is confirmed working against the shipped code: an unattended cron running this from-scratch Go client reconnected into the established account and collected real resources over multiple days (August 2026), re-verified after a live zone-server migration, all with identity.go’s BuildLoginParams (IOSMode branch) sending ta’s LwDeviceID/LwShumeiID/LwAirKey sub-fields as the empty placeholders a security audit put in (history: since the 1.0.370 follow-up the iOS ta fills the three ids, or replays a captured ta) (they had leaked the same live DeviceID/ShumeiBoxId/AirKey secrets in cleartext inside an opaque JSON string that StringRedacted()’s key-based masking couldn’t see into). So the server does not require ta’s real device sub-fields for reconnect. What genuinely remains: (1) the ta blob’s exact minimal required content still isn’t isolated, the client sends a ta object with those three sub-fields blank but others populated, and which of the rest actually matter (a zone/deviceId echo, a game-session id, …) vs. which are ignored was never pinned down; a fresh capture still needs its own fresh ta regardless, since it carries session-specific fields. (2) This was first proven via the captured-access-token path. -cs-ios on a guest or email login now sends the iOS identity from the first GSL call (check-version, platform=iOS, the Login, and account.login.new). A third party reports an iOS own-device bind through it working, along with the bound device’s Login and one refresh (discussion #56); it hasn’t been reproduced here. The Android-issued-token mirror case has: on 2026-10-04 a Go-generated device bound by email verification got its own token pair from GSL, and on 2026-10-13 that pair logged in once Android ta was filled (see the updates under the reconnect wall above). (3) The captured game-server address drifts on every zone/server migration (the port moved 17783 → 10783 in August 2026, silently breaking the cron with a login that connects but never gets a response, until the address was recaptured). The session config’s ip now holds the zone’s whole |-delimited gateway list, which -session-out fills from every gateway that answered the real client’s probe, so one dead gateway no longer breaks a run. ip and port are now optional: when they are missing, or when every gateway refuses the connection or the Login goes unanswered, goclient looks the role’s server up with GSL getserverlist (no opt field, platform=iOS for an iOS session), retries there, and saves the new address. Confirmed live on 2026-10-10: the lookup returned the role’s server with no tokens, and both a config with no address and one with the pre-August port 17783 logged in through it. GSL rejected opt=fix for the same session with code 212. See Looking up the game server. (4) The access token itself can be invalidated server-side, as on 2026-08-16 and 2026-10-02. A captured session config has no refresh token, so each time the fix is a fresh capture; see “The 2026-10-02 token rotation” above. A config -own-device-session writes has one and refreshes its own access token (see Refreshing the access token).