becvert / cordova-plugin-zeroconf

Cordova ZeroConf Plugin
MIT License
81 stars 57 forks source link

No IP, TXT records or resolved events #77

Open TomMettam opened 5 years ago

TomMettam commented 5 years ago

On Android, for most devices, we get "added" event for most devices, however this event is missing the IP address and TXT record data.

avahi-browse shows all the devices correctly with full info.

I can get it to work by adding a call to reInit() prior to the watch command, however, this really shouldn't be necessary since the app has only just started up.. the reInit() command also takes about 10 seconds to complete.

emcniece commented 5 years ago

The resolved event is the one for detecting addresses - do your expected details show up in there?

TomMettam commented 5 years ago

No, as mentioned above we don't receive the resolved events at all unless we call reInit first.

emcniece commented 5 years ago

Wondering if this is a timing issue. Do you kick off your watch() from inside (or after) a platform.ready() or similar call?

TomMettam commented 5 years ago

Yes, inside the platform.ready callback. I thought timing issue too, so i tried a ten second timer instead. No dice

emcniece commented 5 years ago

Intriguing, thanks for confirming. Some more thoughts...

TomMettam commented 5 years ago

After issuing reInit all the other devices on the network came through as resolved.

tonetechnician commented 4 years ago

Picking up on a relatively inactive thread here, but I'm also running into this issue with iOS.

Particularly, I notice the issue doesn't happen when creating the bonjour service on my Mac - if so then the iOS device picks up the resolved action just fine. But when the service is created on Windows, I'm only left with the "added" action, and it never gets resolved.

Did you guys figure it out?