Jake
Jake
DIAdiscord.js - Imagine an app
Created by Jake on 8/26/2024 in #djs-questions
Invalid WebSocket frame: invalid UTF-8 sequence
Received this unhandled rejection today. I think it bad data from Discord, but I wasn't able to track what the data actually looked like. FWIW I also have zlib-sync enabled
Error: Invalid WebSocket frame: invalid UTF-8 sequence
at Receiver.dataMessage (/home/jam/discordbot/node_modules/ws/lib/receiver.js:583:28)
at Receiver.getData (/home/jam/discordbot/node_modules/ws/lib/receiver.js:496:10)
at Receiver.startLoop (/home/jam/discordbot/node_modules/ws/lib/receiver.js:167:16)
at Receiver._write (/home/jam/discordbot/node_modules/ws/lib/receiver.js:94:10)
at writeOrBuffer (node:internal/streams/writable:570:12)
at _write (node:internal/streams/writable:499:10)
at Writable.write (node:internal/streams/writable:508:10)
at Socket.socketOnData (/home/jam/discordbot/node_modules/ws/lib/websocket.js:1355:35)
at Socket.emit (node:events:520:28)
at addChunk (node:internal/streams/readable:559:12)
Error: Invalid WebSocket frame: invalid UTF-8 sequence
at Receiver.dataMessage (/home/jam/discordbot/node_modules/ws/lib/receiver.js:583:28)
at Receiver.getData (/home/jam/discordbot/node_modules/ws/lib/receiver.js:496:10)
at Receiver.startLoop (/home/jam/discordbot/node_modules/ws/lib/receiver.js:167:16)
at Receiver._write (/home/jam/discordbot/node_modules/ws/lib/receiver.js:94:10)
at writeOrBuffer (node:internal/streams/writable:570:12)
at _write (node:internal/streams/writable:499:10)
at Writable.write (node:internal/streams/writable:508:10)
at Socket.socketOnData (/home/jam/discordbot/node_modules/ws/lib/websocket.js:1355:35)
at Socket.emit (node:events:520:28)
at addChunk (node:internal/streams/readable:559:12)
Versions: node: v22.7 discord.js: 14.16.0-dev.1724544741-437437461 @discordjs/ws: 1.1.1
6 replies
DIAdiscord.js - Imagine an app
Created by Jake on 6/6/2024 in #djs-questions
thread.members._add is not a function
[UnhandledPromise] TypeError: thread.members._add is not a functionPromise {
<rejected> TypeError: thread.members._add is not a function
at /app/node_modules/discord.js/src/client/actions/ThreadMembersUpdate.js:17:95
at Array.reduce (<anonymous>)
at ThreadMembersUpdateAction.handle (/app/node_modules/discord.js/src/client/actions/ThreadMembersUpdate.js:16:27)
at module.exports [as THREAD_MEMBERS_UPDATE] (/app/node_modules/discord.js/src/client/websocket/handlers/THREAD_MEMBERS_UPDATE.js:4:38)
at WebSocketManager.handlePacket (/app/node_modules/discord.js/src/client/websocket/WebSocketManager.js:355:31)
at WebSocketManager.<anonymous> (/app/node_modules/discord.js/src/client/websocket/WebSocketManager.js:239:12)
at WebSocketManager.emit (/app/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:282:31)
at WebSocketShard.<anonymous> (/app/node_modules/@discordjs/ws/dist/index.js:1190:51)
at WebSocketShard.emit (/app/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:282:31)
at WebSocketShard.onMessage (/app/node_modules/@discordjs/ws/dist/index.js:1005:14) {
[stack]: [Getter/Setter: 'TypeError: thread.members._add is not a function\n' +
' at /app/node_modules/discord.js/src/client/actions/ThreadMembersUpdate.js:17:95\n' +
' at Array.reduce (<anonymous>)\n' +
' at ThreadMembersUpdateAction.'... 838 more characters],
[message]: 'thread.members._add is not a function'
}
}
[UnhandledPromise] TypeError: thread.members._add is not a functionPromise {
<rejected> TypeError: thread.members._add is not a function
at /app/node_modules/discord.js/src/client/actions/ThreadMembersUpdate.js:17:95
at Array.reduce (<anonymous>)
at ThreadMembersUpdateAction.handle (/app/node_modules/discord.js/src/client/actions/ThreadMembersUpdate.js:16:27)
at module.exports [as THREAD_MEMBERS_UPDATE] (/app/node_modules/discord.js/src/client/websocket/handlers/THREAD_MEMBERS_UPDATE.js:4:38)
at WebSocketManager.handlePacket (/app/node_modules/discord.js/src/client/websocket/WebSocketManager.js:355:31)
at WebSocketManager.<anonymous> (/app/node_modules/discord.js/src/client/websocket/WebSocketManager.js:239:12)
at WebSocketManager.emit (/app/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:282:31)
at WebSocketShard.<anonymous> (/app/node_modules/@discordjs/ws/dist/index.js:1190:51)
at WebSocketShard.emit (/app/node_modules/@vladfrangu/async_event_emitter/dist/index.cjs:282:31)
at WebSocketShard.onMessage (/app/node_modules/@discordjs/ws/dist/index.js:1005:14) {
[stack]: [Getter/Setter: 'TypeError: thread.members._add is not a function\n' +
' at /app/node_modules/discord.js/src/client/actions/ThreadMembersUpdate.js:17:95\n' +
' at Array.reduce (<anonymous>)\n' +
' at ThreadMembersUpdateAction.'... 838 more characters],
[message]: 'thread.members._add is not a function'
}
}
Currently on v14.15.3, nodejs v21.7.1 I don't actually do anything with threads or thread members so it seems specificaly related to the message handler from a thread, possibly mentioning the bot?
158 replies