thibauts / node-castv2-client

A Chromecast client based on the new (CASTV2) protocol
MIT License
648 stars 95 forks source link

Trying to connect chromecast, gives Buffer.concat error #73

Open dolfje opened 7 years ago

dolfje commented 7 years ago

When I try to connect to a chromecast, I get an error about Buffer concat not being able to concat incoming messages. The code is very simple, I just connect to a chromecast by using a ip that has an chromecast. This is a reduced test which uses the mdns stack, but reduced to the following lines for this bug report:

var client = new castv2.Client()
client.connect("192.168.1.104");

The error and backtrace I get is the following:

buffer.js:326 Uncaught TypeError: "list" argument must be an Array of Buffers
    at Function.Buffer.concat (buffer.js:326)
    at PacketStreamWrapper.send (packet-stream-wrapper.js:41)
    at Client.send (client.js:128)
    at Channel.send (channel.js:34)
    at fn.Controller.send (controller.js:28)
    at fn.ConnectionController.connect (connection.js:28)
    at Client.eval (platform.js:59)
    at Object.onceWrapper (events.js:293)
    at emitNone (events.js:86)
    at Client.emit (events.js:188)

Do I do something wrong? Or is this a bug?

oncode commented 5 years ago

I have the same issue, have you resolved it somehow?