google-home-push icon indicating copy to clipboard operation
google-home-push copied to clipboard

"Error: dns service error: unknown" in WSL2 running Ubuntu

Open andyearnshaw opened this issue 3 years ago • 1 comments

I get the following error when trying to run the example from the readme:

*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
*** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
/home/andy/projects/smarter-home/node_modules/mdns/lib/browser.js:88
  dns_sd.DNSServiceBrowse(self.serviceRef, flags, ifaceIdx, '' + requested_type,
         ^

Error: dns service error: unknown
    at new Browser (/home/andy/projects/smarter-home/node_modules/mdns/lib/browser.js:88:10)
    at Object.create [as createBrowser] (/home/andy/projects/smarter-home/node_modules/mdns/lib/browser.js:116:10)
    at Object.<anonymous> (/home/andy/projects/smarter-home/node_modules/google-home-push/index.js:6:22)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/home/andy/projects/smarter-home/test.js:1:20) {
  errorCode: -65537
}

I'm running in Ubuntu on WSL2 in Windows 10. I'm not sure if the warnings are related to the error as those warnings are common and usually ignored. It looks like this is also reported upstream at https://github.com/agnat/node_mdns/issues/141.

andyearnshaw avatar May 02 '21 15:05 andyearnshaw

same issue here. any solutions?

nicandris avatar Apr 03 '22 11:04 nicandris