Skip to content
This repository was archived by the owner on Feb 11, 2020. It is now read-only.
This repository was archived by the owner on Feb 11, 2020. It is now read-only.

Mosca crashes when publishing Message with retain-option from MQTT.js #412

@boristian

Description

@boristian

Hi,

since homebrew updated node to v5.6.0 this morning, mosca 1.0.2 crashes when publishing a message from a script using MQTT.js with {retain: true}.

The error is:

buffer.js:229
      throw new TypeError('list argument must be an Array of Buffers');
      ^

TypeError: list argument must be an Array of Buffers
    at Function.Buffer.concat (buffer.js:229:13)
    at BufferList.copy 

After getting this error when running my app, i've made a small test script:

const mqtt = require('mqtt')
const client = mqtt.connect()

client.on('connect', () => {
  client.subscribe('abc/+')
  client.publish('abc/a', `abc`, {retain: true})
})

client.on('message', (topic, payload) => {
  console.log(topic, payload)
})

This gives me the same error. I've cross-checked with mosquitto 1.4.7., which works. So i think it might be a mosca problem. Any suggestions?

Greetz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions