socketio/socket.io · error · Error
Acknowledgements are not supported
Error message
Acknowledgements are not supported
What it means
Thrown by the postgres-emitter's serverSideEmit() when the last argument is a function (an acknowledgement callback). The postgres emitter (and the multi-server emit pattern generally) is fire-and-forget across the cluster via pg_notify, which has no request/response channel to deliver acknowledgements, so ack callbacks are unsupported.
Source
Thrown at packages/socket.io-postgres-emitter/lib/index.ts:526
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: EventType.SERVER_SIDE_EMIT,
data: {
packet: [ev, ...args],
},
});
}
}
View on GitHub (pinned to ae7fb46e08)
Solutions
- Remove the acknowledgement callback from the serverSideEmit call; use it purely for fire-and-forget messaging.
- If you need responses from other servers, use the main Socket.IO server's serverSideEmit/serverSideEmitWithAck with the Postgres adapter attached to the server (not the standalone emitter).
Example fix
// before
emitter.serverSideEmit('ping', (res) => { /* unsupported */ });
// after
emitter.serverSideEmit('ping'); // fire-and-forget 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 postgres emitter's serverSideEmit.
- Use the main server's serverSideEmitWithAck (with the Postgres adapter) when acks are needed.
- Remember: standalone emitters are fire-and-forget only.
When it happens
Trigger: Calling emitter.serverSideEmit('event', arg1, (response) => {...}) — i.e. passing a function as the final argument.
Common situations: Treating serverSideEmit like socket.emit (which supports acks) or like the main server's serverSideEmit (which DOES support acks via the cluster adapter); copy-pasting an ack-style call into the postgres emitter.
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/a8d0dd6eeba15a45.json.
Report an issue: GitHub.