Serializer.decode() crashes when the Realtime server sends a JSON object over the WebSocket instead of the expected array format. This crashes the entire process with an unhandled TypeError.
error: Uncaught TypeError: jsonPayload is not iterable
const [join_ref, ref, topic, event, payload] = jsonPayload;
^
at Serializer.decode (realtime-js/dist/main/lib/serializer.js:104:60)
at RealtimeClient._onConnMessage (realtime-js/dist/main/RealtimeClient.js:455:14)
at WebSocket.conn.onmessage (realtime-js/dist/main/RealtimeClient.js:519:47)
Describe the bug
Serializer.decode() crashes when the Realtime server sends a JSON object over the WebSocket instead of the expected array format. This crashes the entire process with an unhandled TypeError.
Library affected
supabase-js
Reproduction
No response
Steps to reproduce
System Info
Used Package Manager
npm
Logs
Validations