socket.io-redis-adapter icon indicating copy to clipboard operation
socket.io-redis-adapter copied to clipboard

Problem with onMessage()

Open sudiptosarkar opened this issue 3 years ago • 0 comments

My App works flawlessly using the ol' [email protected]. But after upgrading to @socket.io/redis-adapter (I tried all versions from 7.0.0), the app gets this problem:

TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator))
    at new Set (<anonymous>)
    at RedisAdapter.onmessage (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@socket.io/redis-adapter/dist/index.js:132:22)
    at /Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@socket.io/redis-adapter/dist/index.js:80:22
    at Function._RedisCommandsQueue_emitPubSubMessage (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@redis/client/dist/lib/client/commands-queue.js:231:9)
    at RedisCommandsQueue._RedisCommandsQueue_handlePubSubReply (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@redis/client/dist/lib/client/commands-queue.js:286:100)
    at Object.onReply (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@redis/client/dist/lib/client/commands[2022-07-04T11:34:36.512] [ERROR] [192.168.1.243:6767] ActorSystem - Going down because of an Uncaught Exception in Actor System! TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator))
    at new Set (<anonymous>)
    at RedisAdapter.onmessage (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@socket.io/redis-adapter/dist/index.js:132:22)
    at /Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@socket.io/redis-adapter/dist/index.js:80:22
    at Function._RedisCommandsQueue_emitPubSubMessage (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@redis/client/dist/lib/client/commands-queue.js:231:9)
    at RedisCommandsQueue._RedisCommandsQueue_handlePubSubReply (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@redis/client/dist/lib/client/commands-queue.js:286:100)
    at Object.onReply (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@redis/client/dist/lib/client/commands-queue.js:53:125)
    at RESP2Decoder.write (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@redis/client/dist/lib/client/RESP2/decoder.js:119:26)
    at RedisCommandsQueue.onReplyChunk (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@redis/client/dist/lib/client/commands-queue.js:203:72)
    at RedisSocket.<anonymous> (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@redis/client/dist/lib/client/index.js:340:84)
    at RedisSocket.emit (node:events:527:28)
    at Socket.<anonymous> (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@redis/client/dist/lib/client/socket.js:163:42)
    at Socket.emit (node:events:527:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at TCP.onStreamRead (node:internal/stream_base_commons

For reference, I printed the opts right before the problem line # 131:

{ rooms: {}, except: {}, flags: {} }

sudiptosarkar avatar Jul 04 '22 06:07 sudiptosarkar