Open cjohnweb opened 2 years ago
Following the advice from https://github.com/homebridge/homebridge/issues/613:
sudo apt-get install avahi-daemon avahi-discover libnss-mdns libavahi-compat-libdnssd-dev
I rebooted the system, just to make sure everything is going, and no change:
debian@bgw00000000:~/prototypeF$ npm start
> prototypef@1.0.0 start
> export $(cat .env | xargs) && nodemon main.js
[nodemon] 1.19.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching dir(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node main.js`
*** 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>
-- mDNS: mDNS Advertising as MintonTech
/home/debian/prototypeF/node_modules/mdns/lib/advertisement.js:56
dns_sd.DNSServiceRegister(self.serviceRef, flags, ifaceIdx, name,
^
Error: dns service error: unknown
at new Advertisement (/home/debian/prototypeF/node_modules/mdns/lib/advertisement.js:56:10)
at Object.create [as createAdvertisement] (/home/debian/prototypeF/node_modules/mdns/lib/advertisement.js:64:10)
at MulticastDNSService.createmDNSAdvertisement (/home/debian/prototypeF/service-mdns.js:31:25)
at new MulticastDNSService (/home/debian/prototypeF/service-mdns.js:24:10)
at Object.<anonymous> (/home/debian/prototypeF/main.js:67:12)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47 {
errorCode: -65537
}
[nodemon] app crashed - waiting for file changes before starting...
Found this: https://www.truenas.com/community/threads/try-to-run-airsonos-issue-with-registering-on-the-network.36428/
There user @tslw says there are incorrect setting in /usr/local/etc/avahi-daemon.conf enable-dbus was set to not where it should have been yes
Went to https://manpages.debian.org/testing/avahi-daemon/avahi-daemon.conf.5.en.html and discovered the Avahi configuration file is located at /etc/avahi/avahi-daemon.conf. So I pico /etc/avahi/avahi-daemon.conf
and uncommented dbus-enabled=yes
. Save. Reboot the system.
Still no change in result.
Hi, I'm currently using this module on debian 10 so I should be able to help.
I have encountered this error when a device is registered in avahi (it was found on the local network) but could no longer be resolved (I think it's the job of getaddrinfo
on linux). I know of two reasons for this :
In /etc/nsswitch.conf
you should have a line like :
hosts: files mdns4_minimal mdns6_minimal [NOTFOUND=return] dns
(copied from mine, may vary. The important bit is mdns4_minimal
or mdns4
If you don't care about name resolution, you can customize the name resolution step in mdns to skip it.
Hi I am getting same error as described above. Any updates @cjohnweb ?
My environment is
Here's some context:
On a new, small express sample project I
npm install mdns --save
Then I write a simple piece of server side code in a class to broadcast that I have a web server on port 80, which looks something like this:
But when I
npm start
, I get the following:So line 31 of my service-mdns.js looks like this:
const httpAd = mdns.createAdvertisement(mdns.tcp('http'), parseInt(port))
I've read some projects which claim that lines starting with
*** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi.
is normal and to just ignore it. But as you can see, I can't simply ignore it. I've installed previous versions, like 5.2.1. I've tried installing/updating everything from my build tools to the avahi library installed on my system.I'm assuming it's an issue with the npm package, but I'm not certain. Is anyone else having similar issues? If so, what fixed it for you? Or is this package being phased out as some claim?
Thanks
PS. My package.json file: