mdns-js / node-mdns-js

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

Error: trailing tokens in service type string "_companion-link._tcp.1082314964.members.btmm.icloud.com" #78

Open WeeJeWel opened 6 years ago

WeeJeWel commented 6 years ago
/node_modules/mdns-js/lib/service_type.js:126 throw new Error('trailing tokens "' + serviceTokens.join('.') + '" in ' + ^ Error: trailing tokens "1082314964.members.btmm.icloud.com" in service type string "_companion-link._tcp.1082314964.members.btmm.icloud.com" at exports.ServiceType.fromString (/node_modules/mdns-js/lib/service_type.js:126:11) at new exports.ServiceType (/node_modules/mdns-js/lib/service_type.js:31:14) at /node_modules/mdns-js/lib/decoder.js:48:25 at /node_modules/dns-js/lib/dnspacket.js:223:7 at Array.forEach (<anonymous>) at module.exports.each (/node_modules/dns-js/lib/dnspacket.js:221:17) at module.exports.decodeSection (/node_modules/mdns-js/lib/decoder.js:26:10) at /node_modules/mdns-js/lib/decoder.js:111:5 at Array.forEach (<anonymous>) at Object.module.exports.decodePackets (/node_modules/mdns-js/lib/decoder.js:99:11)

No way to catch this error unfortunately!

kmpm commented 5 years ago

You don't have a dump of this packet hanging around?

WeeJeWel commented 5 years ago

No sorry. I'll re-open when I have more info.

haakonnessjoen commented 5 years ago

I have more info:

{ name: '_services._dns-sd._udp.local',
  type: 12,
  class: 1,
  ttl: 3600,
  isQD: false,
  typeName: [Getter],
  className: [Getter],
  flag: [Getter],
  data: '_ssh._tcp.274249244.members.btmm.icloud.com' }

node_modules/mdns-js/lib/service_type.js:126
    throw new Error('trailing tokens "' + serviceTokens.join('.') + '" in ' +
    ^

Error: trailing tokens "274249244.members.btmm.icloud.com" in service type string "_ssh._tcp.274249244.members.btmm.icloud.com"

The object above is a dump from object "rec" at decoder.js line 40. Please tell if there is more I can provide to help figure out the issue.

haakonnessjoen commented 5 years ago

@WeeJeWel please reopen the issue, seems like I am unable to do it.