homebridge-dacp icon indicating copy to clipboard operation
homebridge-dacp copied to clipboard

dns service error: name conflict

Open jausto opened this issue 7 years ago • 11 comments

Hi! getting a weird error every time I try to set up your app. Ive tried restarting and renaming things.

[2018-2-25 13:37:31] [DysonPlatform] Initializing DysonPlatform platform...
[2018-2-25 13:37:31] [DACP] Initializing DACP platform...
[2018-2-25 13:37:31] [DACP] DACP Platform Plugin Loaded - Version 0.8.0
[2018-2-25 13:37:31] [DACP] Found accessory in config: "iTunes"
[2018-2-25 13:37:31] [DACP]
[2018-2-25 13:37:31] [DACP] Skipping creation of the accessory "iTunes" because it doesn't have a pairing code or
[2018-2-25 13:37:31] [DACP] service name yet. You need to pair the device/iTunes, reconfigure and restart homebridge.
[2018-2-25 13:37:31] [DACP]
[2018-2-25 13:37:31] [DACP] Beginning remote control announcements for the accessory "iTunes".
[2018-2-25 13:37:31] [DACP]
[2018-2-25 13:37:31] [DACP]     Use passcode 8199 to pair with this remote control.
[2018-2-25 13:37:31] [DACP]
[2018-2-25 13:37:31] [DACP] Found accessory in config: "AppleTV-1"
[2018-2-25 13:37:31] [DACP]
[2018-2-25 13:37:31] [DACP] Skipping creation of the accessory "AppleTV-1" because it doesn't have a pairing code or
[2018-2-25 13:37:31] [DACP] service name yet. You need to pair the device/iTunes, reconfigure and restart homebridge.
[2018-2-25 13:37:31] [DACP]
[2018-2-25 13:37:31] [DACP] Beginning remote control announcements for the accessory "AppleTV-1".
[2018-2-25 13:37:31] [DACP]
[2018-2-25 13:37:31] [DACP]     Use passcode 3379 to pair with this remote control.
[2018-2-25 13:37:31] [DACP]

/homebridge/node_modules/mdns/lib/advertisement.js:56
  dns_sd.DNSServiceRegister(self.serviceRef, flags, ifaceIdx, name,
         ^
Error: dns service error: name conflict
    at new Advertisement (/homebridge/node_modules/mdns/lib/advertisement.js:56:10)
    at Object.create [as createAdvertisement] (/homebridge/node_modules/mdns/lib/advertisement.js:64:10)
    at new DacpRemote (/homebridge/node_modules/homebridge-dacp/src/dacp/DacpRemote.js:29:21)
    at DacpPlatform._createRemote (/homebridge/node_modules/homebridge-dacp/src/index.js:160:24)
    at _accessories.devices.map.device (/homebridge/node_modules/homebridge-dacp/src/index.js:139:14)
    at Array.map (<anonymous>)
    at DacpPlatform.accessories (/homebridge/node_modules/homebridge-dacp/src/index.js:123:33)
    at Server._loadPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:364:20)
    at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:308:16)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:85:36)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)

jausto avatar Feb 25 '18 21:02 jausto

The names of the remote controls may not be reused anywhere on your home network, e.g. not on another homebridge instance, not by a computer, by the Apple TV or any other device. They have to be unique.

grover avatar Feb 25 '18 21:02 grover

I think they are though? any other thoughts?

2018-2-25 13:45:42] [DACP] DACP Platform Plugin Loaded - Version 0.8.0
[2018-2-25 13:45:42] [DACP] Found accessory in config: "Jaimes Music"
[2018-2-25 13:45:42] [DACP]
[2018-2-25 13:45:42] [DACP] Skipping creation of the accessory "Jaimes Music" because it doesn't have a pairing code or
[2018-2-25 13:45:42] [DACP] service name yet. You need to pair the device/iTunes, reconfigure and restart homebridge.
[2018-2-25 13:45:42] [DACP]
[2018-2-25 13:45:42] [DACP] Beginning remote control announcements for the accessory "Jaimes Music".
[2018-2-25 13:45:42] [DACP]
[2018-2-25 13:45:42] [DACP]     Use passcode 9058 to pair with this remote control.
[2018-2-25 13:45:42] [DACP]
[2018-2-25 13:45:42] [DACP] Found accessory in config: "Jaimes Atv"
[2018-2-25 13:45:42] [DACP]
[2018-2-25 13:45:42] [DACP] Skipping creation of the accessory "Jaimes Atv" because it doesn't have a pairing code or
[2018-2-25 13:45:42] [DACP] service name yet. You need to pair the device/iTunes, reconfigure and restart homebridge.
[2018-2-25 13:45:42] [DACP]
[2018-2-25 13:45:42] [DACP] Beginning remote control announcements for the accessory "Jaimes Atv".
[2018-2-25 13:45:42] [DACP]
[2018-2-25 13:45:42] [DACP]     Use passcode 4584 to pair with this remote control.
[2018-2-25 13:45:42] [DACP]

/homebridge/node_modules/mdns/lib/advertisement.js:56
  dns_sd.DNSServiceRegister(self.serviceRef, flags, ifaceIdx, name,
         ^
Error: dns service error: name conflict
    at new Advertisement (/homebridge/node_modules/mdns/lib/advertisement.js:56:10)
    at Object.create [as createAdvertisement] (/homebridge/node_modules/mdns/lib/advertisement.js:64:10)
    at new DacpRemote (/homebridge/node_modules/homebridge-dacp/src/dacp/DacpRemote.js:29:21)
    at DacpPlatform._createRemote (/homebridge/node_modules/homebridge-dacp/src/index.js:160:24)
    at _accessories.devices.map.device (/homebridge/node_modules/homebridge-dacp/src/index.js:139:14)
    at Array.map (<anonymous>)
    at DacpPlatform.accessories (/homebridge/node_modules/homebridge-dacp/src/index.js:123:33)
    at Server._loadPlatformAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:364:20)
    at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:308:16)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:85:36)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
*** 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/avahi-compat?s=libdns_sd&e=node>
*** 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/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister>

jausto avatar Feb 25 '18 21:02 jausto

No other chance. You either have another homebridge running that is broadcasting these same names, another device on your network is already using the names. Every time someone came to me with the above error, that was the case.

grover avatar Feb 25 '18 21:02 grover

Ya, i named everything gibberish, I even did homebridge fresh install with only this plugin. Still a no go.

Looks like its something to do with my system https://github.com/oznu/docker-homebridge/issues/35

Ill just try in a couple months.

jausto avatar Feb 25 '18 23:02 jausto

This error occurs if you initially try to configure multiple remotes (it crashes on the second remote that homebridge-dacp tries to create). If you create one remote, pair it, add the pairing details and then create the second (and subsequent) remotes, it works fine.

Worked this out after creating a whole new test instance of homebridge I had no plans of linking to HomeKit, and I only creating one remote for testing, which worked fine. :)

Djelibeybi avatar Mar 18 '18 04:03 Djelibeybi

Thanks for the heads up, I'll try to figure out what's causing this. If you happen to have the crash report, could you add it here?

grover avatar Mar 20 '18 23:03 grover

@grover exactly the same crash report as posted by @jausto

Djelibeybi avatar Mar 20 '18 23:03 Djelibeybi

Here it is for completeness sake:

[2018-3-21 10:24:51] [DACP] Initializing DACP platform...
[2018-3-21 10:24:51] [DACP] DACP Platform Plugin Loaded - Version 0.9.1
[2018-3-21 10:24:51] [DACP] Found accessory in config: "Theatre Apple TV Remote"
[2018-3-21 10:24:51] [DACP]
[2018-3-21 10:24:51] [DACP] Skipping creation of the accessory "Theatre Apple TV Remote" because it doesn't have a pairing code or
[2018-3-21 10:24:51] [DACP] service name yet. You need to pair the device/iTunes, reconfigure and restart homebridge.
[2018-3-21 10:24:51] [DACP]
[2018-3-21 10:24:51] [DACP] Beginning remote control announcements for the accessory "Theatre Apple TV Remote".
[2018-3-21 10:24:51] [DACP]
[2018-3-21 10:24:51] [DACP] 	Use passcode 8428 to pair with this remote control.
[2018-3-21 10:24:51] [DACP]
[2018-3-21 10:24:51] [DACP] Found accessory in config: "Lounge Apple TV Remote"
[2018-3-21 10:24:51] [DACP]
[2018-3-21 10:24:51] [DACP] Skipping creation of the accessory "Lounge Apple TV Remote" because it doesn't have a pairing code or
[2018-3-21 10:24:51] [DACP] service name yet. You need to pair the device/iTunes, reconfigure and restart homebridge.
[2018-3-21 10:24:51] [DACP]
[2018-3-21 10:24:51] [DACP] Beginning remote control announcements for the accessory "Lounge Apple TV Remote".
[2018-3-21 10:24:51] [DACP]
[2018-3-21 10:24:51] [DACP] 	Use passcode 6161 to pair with this remote control.
[2018-3-21 10:24:51] [DACP]

/usr/lib/node_modules/homebridge-dacp/node_modules/mdns/lib/advertisement.js:56
  dns_sd.DNSServiceRegister(self.serviceRef, flags, ifaceIdx, name,
         ^
Error: dns service error: name conflict
    at new Advertisement (/usr/lib/node_modules/homebridge-dacp/node_modules/mdns/lib/advertisement.js:56:10)
    at Object.create [as createAdvertisement] (/usr/lib/node_modules/homebridge-dacp/node_modules/mdns/lib/advertisement.js:64:10)
    at new DacpRemote (/usr/lib/node_modules/homebridge-dacp/src/dacp/DacpRemote.js:29:21)
    at DacpPlatform._createRemote (/usr/lib/node_modules/homebridge-dacp/src/index.js:206:24)
    at _accessories.devices.map.device (/usr/lib/node_modules/homebridge-dacp/src/index.js:185:14)
    at Array.map (<anonymous>)
    at DacpPlatform.accessories (/usr/lib/node_modules/homebridge-dacp/src/index.js:169:33)
    at Server._loadPlatformAccessories (/usr/lib/node_modules/homebridge/lib/server.js:364:20)
    at Server._loadPlatforms (/usr/lib/node_modules/homebridge/lib/server.js:308:16)
    at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:85:36)
    at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:649:30)
    at Object.Module._extensions..js (module.js:660:10)
    at Module.load (module.js:561:32)
    at tryModuleLoad (module.js:501:12)

And the corresponding config.json snippet:

{
	"platform": "DACP",
	"devices": [{
			"name": "Theatre Apple TV Remote",
			"features": {
				"alternate-playpause-switch": true,
				"no-volume-controls": true,
				"no-skip-controls": true
			}
		},
		{
			"name": "Lounge Apple TV Remote",
			"features": {
				"alternate-playpause-switch": true,
				"no-volume-controls": true,
				"no-skip-controls": true
			}
		}
	]
}

Djelibeybi avatar Mar 20 '18 23:03 Djelibeybi

Thanks!

grover avatar Mar 20 '18 23:03 grover

This is exactly what I have faced with my setup as well and mentioned in the latest issue.

I had installed the previous version of homebridge-dacp and wanted to update it on the latest 0.9.1 with a complete new Raspberry and a fresh setup. When trying to enter the pin into iTunes either it doesnt accepted the pin or I couldnt even see that the new remote appeared in iTunes. I also tried it as mentioned the previous version just using the name "New Remote Control" which showed afterwards the remote in iTunes but unfortunately iTunes does not at all accept the pin as shown in the Log in Homebridge.

here is a snippet from log:

`[2018-3-25 23:44:23] [DACP2] Starting DACP browser... /usr/lib/node_modules/homebridge-dacp/src/index.js:79 const artwork = device.features['album-artwork']; ^

TypeError: Cannot read property 'album-artwork' of undefined at config.devices.forEach.device (/usr/lib/node_modules/homebridge-dacp/src/index.js:79:38) at Array.forEach () at DacpPlatform._enableArtworkCameras (/usr/lib/node_modules/homebridge-dacp/src/index.js:78:25) at DacpPlatform._didFinishLaunching (/usr/lib/node_modules/homebridge-dacp/src/index.js:72:10) at API.emit (events.js:180:13) at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:98:13) at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10) at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (module.js:649:30) at Object.Module._extensions..js (module.js:660:10) at Module.load (module.js:561:32) at tryModuleLoad (module.js:501:12) at Function.Module._load (module.js:493:3) at Function.Module.runMain (module.js:690:10) at startup (bootstrap_node.js:194:16) at bootstrap_node.js:666:3 `

BerkTam avatar Mar 25 '18 21:03 BerkTam

@BerkTam your crash report is different and should be fixed with 0.9.2, which I deployed moments ago.

I'll keep looking at the others soonish. Thanks!

grover avatar May 02 '18 20:05 grover