[bun] Warning: ws.WebSocket 'upgrade' event is not implemented in bun
[bun] Warning: ws.WebSocket 'unexpected-response' event is not implemented in bun{"level":30,"time":"2023-09-13T16:06:13.177Z","pid":439,"hostname":"DESKTOP-JEUKCK6","class":"baileys","browser":["Baileys","Chrome","4.0.0"],"helloMsg":{"clientHello":{"ephemeral":"HbtkwwQTDiZ5r/X0F2DacmaZ/9Z0Myc+xR26a3x4YA=="}},"msg":"connected to WA"}
{"level":30,"time":"2023-09-13T16:06:13.445Z","pid":439,"hostname":"DESKTOP-JEUKCK6","class":"baileys","trace":"Error: Connection Terminated\n at <anonymous> (/mnt/d/Projects/WHAW-BEB/node_modules/@hapi/boom/lib/index.js:80:8)\n at <anonymous> (/mnt/d/Projects/WHAW-BEB/node_modules/@whiskeysockets/baileys/src/Socket/socket.ts:564:25)\n at emit (native)\n at emit (native)\n at <anonymous> (native)","msg":"connection errored"}
{"level":50,"time":"2023-09-13T16:06:13.446Z","pid":439,"hostname":"DESKTOP-JEUKCK6","class":"baileys","err":{"type":"Error","message":"WebSocket Error (undefined)","stack":"Error: WebSocket Error (undefined)\n at <anonymous> (/mnt/d/Projects/WHAW-BEB/node_modules/@hapi/boom/lib/index.js:80:8)\n at <anonymous> (/mnt/d/Projects/WHAW-BEB/node_modules/@whiskeysockets/baileys/src/Socket/socket.ts:737:2)\n at emit (native)\n at emit (native)\n at <anonymous> (native)","data":1006,"isBoom":true,"isServer":true,"output":{"statusCode":500,"payload":{"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred"},"headers":{}}},"msg":"error in validating connection"}
We need to test our WebSocket client using the Autobahn test suite to fix these bugs, including this one. For updates, please upvote and subscribe to this issue: https://github.com/oven-sh/bun/issues/6686
im trying to build a whatsapp bot using https://github.com/WhiskeySockets/Baileys but kept getting WS errors.
my config for the socket creation
Originally reported on Discord:
Baileys.js ws returns
Connection Terminated``