socketio/socket.io · error · Error
Acknowledgements are not supported
Error message
Acknowledgements are not supported
What it means
Thrown by the redis-streams-emitter's serverSideEmit() when the last argument is a function (acknowledgement callback). The standalone redis-streams emitter publishes fire-and-forget messages to a Redis stream with no reply channel, so it cannot collect or return acknowledgements from other servers.
Source
Thrown at packages/socket.io-redis-streams-emitter/lib/index.ts:388
close,
},
});
}
/**
* Send a packet to the Socket.IO servers in the cluster
*
* @param ev - the event name
* @param args - any number of serializable arguments
*/
public serverSideEmit<Ev extends EventNames<ServerSideEvents>>(
ev: Ev,
...args: EventParams<ServerSideEvents, Ev>
): void {
const withAck = args.length && typeof args[args.length - 1] === "function";
if (withAck) {
throw new Error("Acknowledgements are not supported");
}
this.publish({
type: MessageType.SERVER_SIDE_EMIT,
data: {
packet: [ev, ...args],
},
});
}
}
function flattenPayload(message: ClusterMessage) {
const rawMessage = {
uid: message.uid,
nsp: message.nsp,
type: message.type.toString(),
data: undefined as string | undefined,
};View on GitHub (pinned to ae7fb46e08)
Solutions
- Drop the acknowledgement callback; use serverSideEmit for fire-and-forget only.
- If acks are required, attach the RedisStreams adapter to the main Socket.IO server and use io.serverSideEmit()/serverSideEmitWithAck() instead of the standalone emitter.
Example fix
// before
emitter.serverSideEmit('sync', (ack) => { /* never resolves */ });
// after
emitter.serverSideEmit('sync'); Defensive patterns
Strategy: validation
Validate before calling
function noAck(args){ return !(args.length && typeof args[args.length-1]==='function'); } Type guard
function isAckFree(args){ return args.length===0 || typeof args[args.length-1]!=='function'; } Prevention
- Never pass a callback to the redis-streams emitter's serverSideEmit.
- Use io.serverSideEmitWithAck with the RedisStreams adapter attached for ack-based flows.
- Treat standalone emitters as fire-and-forget.
When it happens
Trigger: Calling emitter.serverSideEmit('event', arg, (response) => {...}) on the redis-streams emitter — passing a function as the final argument.
Common situations: Confusing the standalone emitter's serverSideEmit (no ack) with the main Socket.IO server's serverSideEmit (supports ack via the cluster adapter); copy-pasting an ack-style call.
Related errors
- Acknowledgements are not supported
- "${String(ev)}" is a reserved event name
- "${String(ev)}" is a reserved event name
- "${String(ev)}" is a reserved event name
AI-assisted analysis of socketio/socket.io@ae7fb46e08 (2026-08-03).
Data as JSON: /data/errors/ebb3025089142e8f.json.
Report an issue: GitHub.