njh / node-owfs

A node.js client library for the owserver protocol in owfs
https://www.npmjs.com/package/owfs
MIT License
10 stars 4 forks source link

Occational bug reading payload. #1

Closed kmpm closed 11 years ago

kmpm commented 11 years ago

It might be from calling dirall, dir or read. I haven't found out which one yet. The error message is...

/node_modules/owfs/owfs.js:105 var result = messageToUse[0].payload.replace(new RegExp(" ", "g"), "") ^ TypeError: Cannot read property 'payload' of undefined at Client.read (/node_modules/owfs/owfs.js:1 at Socket. (/node_modules/owfs/ow at Socket.EventEmitter.emit (events.js:93:17) at TCP.onread (net.js:418:51)

benediktarnold commented 11 years ago

I had this problem once in a while, but it's hard to reproduce. Which owserver version do you use? I will try to harden the error handling and make the error output more debug friendly.

kmpm commented 11 years ago

it's version 2.8p15 installed on a Debian machine.

benediktarnold commented 11 years ago

I think that I found the error. Please try version 0.0.3