question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do you get rid of "Error: dns service error: unknown"

See original GitHub issue

I had started working with HAP-NodeJS, and after finally getting node to run I was met with this ugly error:

/home/user/HAP-NodeJS/node_modules/mdns/lib/advertisement.js:56
  dns_sd.DNSServiceRegister(self.serviceRef, flags, ifaceIdx, name,
         ^

Error: dns service error: unknown
    at new Advertisement (/home/user/HAP-NodeJS/node_modules/mdns/lib/advertisement.js:56:10)
    at Object.create [as createAdvertisement] (/home/user/HAP-NodeJS/node_modules/mdns/lib/advertisement.js:64:10)
    at Advertiser.startAdvertising (/home/user/HAP-NodeJS/lib/Advertiser.js:43:30)
    at Accessory._onListening (/home/user/HAP-NodeJS/lib/Accessory.js:539:20)
    at emitOne (events.js:96:13)
    at HAPServer.emit (events.js:188:7)
    at HAPServer._onListening (/home/user/HAP-NodeJS/lib/HAPServer.js:190:8)
    at emitOne (events.js:96:13)
    at EventedHTTPServer.emit (events.js:188:7)
    at EventedHTTPServer.<anonymous> (/home/user/HAP-NodeJS/lib/util/eventedhttp.js:65:10)

The thing is, even after I reinstalled HAP-NodeJS and reinstalled all of its dependencies, it still gave me that error, so now what do I do?

I’m using the windows subsystem for linux (look it up) on windows 10 x64, but I don’t think it affects anything as it is apparent from other open issues that other people have had this problem as well (I’m just putting it on top).

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
neophobcommented, Mar 20, 2017

you need to install apple bonjour sdk to run this package on windows

0reactions
chabad360commented, Apr 7, 2017

and after I do that…

Read more comments on GitHub >

github_iconTop Results From Across the Web

dns_sd.DNSServiceRegister dns service error: unknown #613
If you installed homebridge with the README.md - Installation, and only run the command to install avahi. sudo apt-get install libavahi-compat- ...
Read more >
ERR_NAME_NOT_RESOLVED: 6 Proven Methods to Fix It
1. Flush DNS Cache on Your Device · 2. Check Google Chrome Browser Settings · 3. Reset Your Firewall and DNS Server Addresses...
Read more >
Unknown error while running node_mdns on node.js on ...
The app launches correctly, but when a device is discovered I get the following error. { [Error: dns service error: unknown] errorCode: -65537...
Read more >
How to Fix "Error 520: Web Server Is Returning an Unknown ...
This problem occurs when your site lacks an HTTP status code or response body. To resolve it, make sure your DNS settings are...
Read more >
an unknown error occurred while validating the server dns
Please make sure that there is no firewall / router that is blocking DNS traffic. The problem persists if you disable EDNS0? This...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found