cameri / nostream

A Nostr Relay written in TypeScript
MIT License
729 stars 188 forks source link

[BUG] relay does not return events #224

Open Giszmo opened 1 year ago

Giszmo commented 1 year ago

Describe the bug

The relay accepts websocket connections and queries but does not return data

following information):**

Logs

nostream          | uncaught error: [ErrorReply: LOADING Redis is loading the dataset in memory]
nostream          | uncaught error: RangeError: Invalid WebSocket frame: RSV1 must be clear
nostream          |     at Receiver.getInfo (/app/node_modules/ws/lib/receiver.js:199:14)
nostream          |     at Receiver.startLoop (/app/node_modules/ws/lib/receiver.js:146:22)
nostream          |     at Receiver._write (/app/node_modules/ws/lib/receiver.js:84:10)
nostream          |     at writeOrBuffer (node:internal/streams/writable:392:12)
nostream          |     at _write (node:internal/streams/writable:333:10)
nostream          |     at Writable.write (node:internal/streams/writable:337:10)
nostream          |     at Socket.socketOnData (/app/node_modules/ws/lib/websocket.js:1274:35)
nostream          |     at Socket.emit (node:events:513:28)
nostream          |     at addChunk (node:internal/streams/readable:324:12)
nostream          |     at readableAddChunk (node:internal/streams/readable:297:9) {
nostream          |   code: 'WS_ERR_UNEXPECTED_RSV_1',
nostream          |   [Symbol(status-code)]: 1002
nostream          | }
nostream          | uncaught error: RangeError: Max payload size exceeded
nostream          |     at Receiver.haveLength (/app/node_modules/ws/lib/receiver.js:387:16)
nostream          |     at Receiver.getPayloadLength64 (/app/node_modules/ws/lib/receiver.js:373:17)
nostream          |     at Receiver.startLoop (/app/node_modules/ws/lib/receiver.js:152:22)
nostream          |     at Receiver._write (/app/node_modules/ws/lib/receiver.js:84:10)
nostream          |     at writeOrBuffer (node:internal/streams/writable:392:12)
nostream          |     at _write (node:internal/streams/writable:333:10)
nostream          |     at Writable.write (node:internal/streams/writable:337:10)
nostream          |     at Socket.socketOnData (/app/node_modules/ws/lib/websocket.js:1274:35)
nostream          |     at Socket.emit (node:events:513:28)
nostream          |     at addChunk (node:internal/streams/readable:324:12) {
nostream          |   code: 'WS_ERR_UNSUPPORTED_MESSAGE_LENGTH',
nostream          |   [Symbol(status-code)]: 1009
nostream          | }

Additional context The log above is right after a new start of the relay. All workers give the first line's error and then "Invalid WebSocket frame" and "RangeError" alternate.

Giszmo commented 1 year ago

Well, my relay is dead and I don't know how to revive it. :(

pete-nice commented 1 year ago

I'm getting the same error. :(

pete-nice commented 1 year ago
 | uncaught error: RangeError: Invalid WebSocket frame: RSV1 must be clear

nostream | at Receiver.getInfo (/app/node_modules/ws/lib/receiver.js:199:14) nostream | at Receiver.startLoop (/app/node_modules/ws/lib/receiver.js:146:22) nostream | at Receiver._write (/app/node_modules/ws/lib/receiver.js:84:10) nostream | at writeOrBuffer (node:internal/streams/writable:392:12) nostream | at _write (node:internal/streams/writable:333:10) nostream | at Writable.write (node:internal/streams/writable:337:10) nostream | at Socket.socketOnData (/app/node_modules/ws/lib/websocket.js:1274:35) nostream | at Socket.emit (node:events:513:28) nostream | at addChunk (node:internal/streams/readable:324:12) nostream | at readableAddChunk (node:internal/streams/readable:297:9) { nostream | code: 'WS_ERR_UNEXPECTED_RSV_1', nostream | [Symbol(status-code)]: 1002 nostream | }