Open yuvalwarsh opened 3 weeks ago
downgrade node from 22.7.0. im use 20-alpine and proplem resolved
Im using version 6.7.7 and im getting the following error for sending messages in the lengtg of 40 chars and above (messages below are sent fine):
RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: "length" is outside of buffer bounds at proto.utf8Write (node:internal/buffer:1066:13) at Op.writeStringBuffer [as fn] (/workspace/node_modules/protobufjs/src/writer_buffer.js:61:13) at BufferWriter.finish (/workspace/node_modules/protobufjs/src/writer.js:453:14) at encodeWAMessage (/workspace/node_modules/@whiskeysockets/baileys/lib/Utils/generics.js:75:112) at createParticipantNodes (/workspace/node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js:248:51) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async Promise.all (index 0) at async /workspace/node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js:410:135 at async Object.transaction (/workspace/node_modules/@whiskeysockets/baileys/lib/Utils/auth-utils.js:136:26) at async relayMessage (/workspace/node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js:306:9)
I was having the same problem ,fixed now what I did was mentioned here
https://github.com/WhiskeySockets/Baileys/issues/995#issue-2481942187
downgrade node from 22.7.0. im use 20-alpine and proplem resolved
not resolved for me
Already done ✅
Im using version 6.7.7 and im getting the following error for sending messages in the lengtg of 40 chars and above (messages below are sent fine):
RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: "length" is outside of buffer bounds
at proto.utf8Write (node:internal/buffer:1066:13) at Op.writeStringBuffer [as fn] (/workspace/node_modules/protobufjs/src/writer_buffer.js:61:13) at BufferWriter.finish (/workspace/node_modules/protobufjs/src/writer.js:453:14) at encodeWAMessage (/workspace/node_modules/@whiskeysockets/baileys/lib/Utils/generics.js:75:112) at createParticipantNodes (/workspace/node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js:248:51) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async Promise.all (index 0) at async /workspace/node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js:410:135 at async Object.transaction (/workspace/node_modules/@whiskeysockets/baileys/lib/Utils/auth-utils.js:136:26) at async relayMessage (/workspace/node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js:306:9)
The solution ✅ package.json
engines "node": "20.0.0"
"dependencies": { "@whiskeysockets/baileys": "^6.6.0",
Im using version 6.7.7 and im getting the following error for sending messages in the lengtg of 40 chars and above (messages below are sent fine):
RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: "length" is outside of buffer bounds at proto.utf8Write (node:internal/buffer:1066:13) at Op.writeStringBuffer [as fn] (/workspace/node_modules/protobufjs/src/writer_buffer.js:61:13) at BufferWriter.finish (/workspace/node_modules/protobufjs/src/writer.js:453:14) at encodeWAMessage (/workspace/node_modules/@whiskeysockets/baileys/lib/Utils/generics.js:75:112) at createParticipantNodes (/workspace/node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js:248:51) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async Promise.all (index 0) at async /workspace/node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js:410:135 at async Object.transaction (/workspace/node_modules/@whiskeysockets/baileys/lib/Utils/auth-utils.js:136:26) at async relayMessage (/workspace/node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js:306:9)