mdns-js / node-mdns-js

Pure JavaScript/NodeJS mDNS discovery implementation.
Apache License 2.0
161 stars 60 forks source link

Issues with Throw errors #75

Open tagyoureit opened 6 years ago

tagyoureit commented 6 years ago

Hi, I've run into a couple of situations where your module Throws an error, but there is no way to catch it in my application. For example,

uncaught exception! Error: type voucher_com_udemy_tv-auth has more than 20 characters
    at checkFormat (/Users/machine_name/Documents/programming/nodejs-poolController/node_modules/mdns-js/lib/service_type.js:244:11)
    at fromString (/Users/machine_name/Documents/programming/nodejs-poolController/node_modules/mdns-js/lib/service_type.js:118:5)
    at new exports.ServiceType (/Users/machine_name/Documents/programming/nodejs-poolController/node_modules/mdns-js/lib/service_type.js:31:14)
    at /Users/machine_name/Documents/programming/nodejs-poolController/node_modules/mdns-js/lib/decoder.js:40:27
    at /Users/machine_name/Documents/programming/nodejs-poolController/node_modules/dns-js/lib/dnspacket.js:223:7
    at Array.forEach (native)
    at each (/Users/machine_name/Documents/programming/nodejs-poolController/node_modules/dns-js/lib/dnspacket.js:221:17)
    at module.exports.decodeSection (/Users/machine_name/Documents/programming/nodejs-poolController/node_modules/mdns-js/lib/decoder.js:26:10)
    at /Users/machine_name/Documents/programming/nodejs-poolController/node_modules/mdns-js/lib/decoder.js:111:5
    at Array.forEach (native)
    at Object.module.exports.decodePackets (/Users/machine_name/Documents/programming/nodejs-poolController/node_modules/mdns-js/lib/decoder.js:99:11)
    at Browser.onMessage (/Users/machine_name/Documents/programming/nodejs-poolController/node_modules/mdns-js/lib/browser.js:47:26)
    at emitThree (events.js:116:13)
    at emit (events.js:194:7)
    at Socket.<anonymous> (/Users/machine_name/Documents/programming/nodejs-poolController/node_modules/mdns-js/lib/networking.js:144:10)
    at emitTwo (events.js:106:13)

and

fluke777 commented 2 years ago

Any plan on working on this. If not do you know if there is some alternative? Thanks for a nice library. Best.

tagyoureit commented 2 years ago

FWIW, I'm using the following library in my app instead of this one: https://github.com/mafintosh/multicast-dns

kmpm commented 2 years ago

@fluke777 there is very low activity in this project since I don't really use node any more and there are very few contributions from others. I will get to it eventually but it's not on the top of my list.