-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not discovering services on my local network #9
Comments
After additional testing I found out that my service will be discovered if the
If the publish happens before search is initiated the service never gets discovered. |
Hi @capJavert, out of interest, if you restart both machines then start |
Nope |
Interesting, we've been unable to replicate this issue across two Macs on a network. I'll leave this open for now and update if we find anything. |
If you need any more info from me or you have questions about the setup please do tell. I am open to dig into this. |
I just had a similar problem: My Windows PC would detect devices on the network (Blackmagic ATEMs and HyperDecks) if I disconnect those devices from the network and reconnect them or if I repower them. However, if I just start the bonjour browser with the devices already running, they would not be found. Strangely, I could solve this problem by restarting the Windows machine... I have no idea what causes this ;-) |
@capJavert did you manage to resolve this? |
I'm running into this issue too: Devices announcing themselves on the network whilst the bonjour browser is running are picked up, but go undetected otherwise. I did some digging in Wireshark to see if the expected traffic was being sent, and found none when monitoring the expected network interface (Ethernet). However, when monitoring a different interface (eg, vEthernet for WSL, or "Loopback Pseudo-Interface"), I can see the MDNS queries going out. It seems the selection of the correct interface, or the broadcasting to multiple interfaces isn't working as expected. In import { Bonjour } from 'bonjour-service';
import os from 'os';
var networkInterfaces = os.networkInterfaces();
console.log(networkInterfaces);
const bonjourInstance = new Bonjour({});
console.log("Starting network discovery");
let browser = bonjourInstance.find({ type: 'minismu', protocol: 'tcp' });
browser.on('up', service => {
console.log('Device up:', service);
});
browser.on('down', service => {
console.log('Device down:', service);
});
browser.on('error', err => {
console.error('Error occurred:', err);
});
browser.start(); |
I have the simple setup from the README.
Service.js:
Client.js:
When I publish and search services on the same computer (i am on macOS 12.1) they are discovered. But when I run the above code on two different machines eg. One computer is running
Service.js
and another one is runningClient.js
the find callback never triggers and no services are found.I can confirm that my HTTP server is visible if I manually input the computer address and go for example to the
GET /api
endpoint on another computer so they definitely see each other.Any tips on debugging this?
The text was updated successfully, but these errors were encountered: