Edit history

Rare timing condition: message disappears for everyone until reload when same author's next message gets a nonce equal to its ID has not been edited, so there are no earlier versions.

Current version | Original by Chiara
Show

Rare timing condition: message disappears for everyone until reload when same author's next message gets a nonce equal to its ID

Reproduction steps

Because the bug depends on the snowflakes being served by shard 0, it usually only occurs on self-hosted instances (I could not repro on fluxer.com). I have seen this happen in a real conversation exactly once. The most likely trigger was that time between messages exactly matched, down to the millisecond, the drift of the sending user's computer clock as compared to the server's clock. For example, if time between two messages from same sender is 1.022 sec and the sending user's clock is 1.022 sec behind the server's clock, this will happen. Because it requires such precise timing, reproducing it reliably requires manipulating the clock in JS. You need two sessions in the same channel, Sender and Receiver (either a second account or second session of sender account).
  1. Set up on a self-hosted instance with the single default shard of snowflake.
  1. In Sender session, send first message. Turn on Developer Mode and copy that message's id.
  1. In Sender's devtools, pin the clock to that message's millisecond for ten seconds:
const id = '<paste message id>'; const ms = Number((BigInt(id) >> 22n) + 1420070400000n); const realNow = Date.now; Date.now = () => ms; setTimeout(() => { Date.now = realNow; }, 10000); (The id encodes the server's clock at the moment it stored the first message. Pinning the Sender's clock to that time simulates a Sender clock that runs behind the server's by exactly the time between the two messages, which is how this actually occurs in real life.)
  1. Within those ten seconds, send a second message in Sender session.

Expected behaviour

The two messages both appear normally.

Actual behaviour

The first message disappears as soon as the second message is sent. It disappears in both Sender and Receiver session views at the same time. The second message appears in its place, with no (edited) mark. After reloading, both messages are shown.

Build information

Self-hosted instance, web client and desktop app built from fluxerapp/fluxer main at 8177dd7015 (2026-11-22, #4246). This is a fork but the relevant files are unchanged. Reproduced in Chromium (web) and the desktop app on Windows.

Platform

Windows, Web

Evidence

Code links: The client builds message nonces from the clock alone, with worker 0 and sequence 0: https://github.com/fluxerapp/fluxer/blob/25af6fb6f7613cbc251234a8ce1469b275bf2113/fluxer_app/src/features/messaging/hooks/useMessageSubmission.tsx#L127 https://github.com/fluxerapp/fluxer/blob/25af6fb6f7613cbc251234a8ce1469b275bf2113/packages/snowflake/src/Snowflake.ts#L160 ChannelMessages.applyIncomingMessage then replaces any stored message (even one already confirmed) from the same author whose id equals the incoming message's nonce: https://github.com/fluxerapp/fluxer/blob/25af6fb6f7613cbc251234a8ce1469b275bf2113/fluxer_app/src/features/messaging/state/ChannelMessages.ts#L734 With a single snowflakes shard, message ids have worker 0, so the nonces can collide. But fluxer.com's ids carry other shard numbers, so collisions are rare there.