theturtle32 / WebSocket-Node

A WebSocket Implementation for Node.JS (Draft -08 through the final RFC 6455)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: Value supplied for "cookies" argument must be an array.

mougis opened this issue · comments

commented

Even I didn't set param cookies :

/lib/WebSocketRequest.js:310
            throw new Error('Value supplied for "cookies" argument must be an array.');
  wsRouter.mount(/^\/chat\/.+$/g, null, (req) => {
    const connection = req.accept(undefined, req.origin, undefined);
    connection.on('message', (data) => {
      console.info({ data });
    });
  });

  wsServer.on('request', (req) => {
    wsRouter.handleRequest(req);
  });

"websocket": "^1.0.32"
node -v : v12.19.0