← World map and portals · all tasks

The player who wasn't there — a phone in the background keeps walking against a socket that died in silence

done priority 1 estimate M

world-map-and-portals/016 · created 2026-08-18 · updated 2026-08-18

What prompted it

Kris played v10 on the phone as the APK and in the phone’s browser, one after the other, on 2026-08-17. Both worked — but the other character never moved in either, and the browser’s character never appeared in the APK at all. Two screenshots: in the browser, “kris phone web” standing next to “kris 2” by the river; in the APK, “kris 2” alone, standing in the river where Kris had just walked it.

What it was

Not a sync bug — one Village process served both, all along, and it broadcasts every body to every peer at 10 Hz. It was a socket that died in silence. When the APK went to the background, Android dropped its TCP connection under the WebSocket and no close frame ever came; WebSocketPeer went on reporting STATE_OPEN, and the client had no other way of knowing. So the APK kept predicting moves nobody heard (kris 2 walks into the river on the phone; the server’s kris 2 stays by the bank — exactly what the browser showed) and never received another area_update (kris phone web never appears). The browser was telling the truth the whole time.

What changed

Verified

What only Kris can check

The exact reproduction — APK, then browser, then back — on the phone. Expected now: within about six seconds of coming back to the APK, it re-joins on its own (the character snaps to where the server had it — the bank, not the river), and the other player appears.

View source in repository · also available as raw markdown.