becvert / cordova-plugin-zeroconf

Cordova ZeroConf Plugin
MIT License
81 stars 57 forks source link

1.3.3 sends empty hostnames #72

Closed fttx closed 5 years ago

fttx commented 6 years ago

Steps to reproduce:

create a cordova project, add the plugin, add the watch example of the readme inside a deviceready callback.

This is the output: image

While if i revert back to 1.3.2 it works properly: image

It doesn't happen with all services, for example, i can see the hostname of my printer with v1.3.3. I use node_mdns to announce the service.

emcniece commented 6 years ago

1.3.2 - 1.3.3 comparison: https://github.com/becvert/cordova-plugin-zeroconf/compare/0aab272057eeee4bdb4eb81e633b5093d203012a...3669c917571fbb56c6ebd841b00527ee9ade8233

This may be a problem with jmdns:3.5.4, needs investigation.

emcniece commented 6 years ago

jmdns:3.5.4 does not appear to have anything that should cause a situation like this.

Is it possible that the pure-IPv6 resolution (example 1, v1.3.3) behaves different than the IPv4 resolution (example 2, v1.3.2)?

@fttx do you get different results if you force watching for IPv4?

zeroconf.watchAddressFamily = 'ipv4';
zeroconf.watch('_http._tcp.', 'local.', function(result) {
...
fttx commented 6 years ago

Nope, still empty hostname

emcniece commented 6 years ago

Ok - does the hostname show up in an external Bonjour browser application? (Mac/Win)

fttx commented 6 years ago

Yes, it does image

emcniece commented 6 years ago

Hmm... I'm running out of ideas. Do you have any other mobile devices you could test the app on?

becvert commented 5 years ago

Closing old issue. Feel free to reopen.

fttx commented 5 years ago

Sorry to bother you again, but the bug is still there, and it is related to jmdns. There is a pull request from the past year: https://github.com/jmdns/jmdns/pull/165

emcniece commented 5 years ago

Thank you for finding the root cause! @becvert maybe we should keep this open until jmdns/jmdns#165 is merged.