-
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
It does not seem like publish() actually publishes publicly properly #46
Comments
In contrast,
const mdns = require("mdns");
const init = async () => {
console.log("Publishing bonjour service");
const ad = mdns.createAdvertisement(mdns.tcp("testapp"), 3000);
ad.start();
while (true) {
// keep the process alive
await new Promise((resolve) => setTimeout(resolve, 4000));
console.log("instance", ad);
await new Promise((resolve) => setTimeout(resolve, 2000));
console.log("Waiting...");
}
};
init(); ![]() |
@StefanWallin Thanks for the heads up. It maybe related to the issues mentioned but I'll have to dig further to see if I can replicate. |
@StefanWallin Also, which version of bonjour-service are you using? |
your client detects both, but mdns-client cannot detect from this library. |
I realized that one thing that might be interesting to know is that I'm currently without a stable wifi since I'm in my mountain cabin and not at home. So my current network setup is my macbook relying on being wifi-connected to an iPhone with Internet Sharing turned on and using that as a hotspot. |
Hi, I've been struggling with a similar issue and have been comparing an implementation based on multicast-dns that works with the Discovery app, with one based on bonjour-service that shows up in Discovery app but does not reveal any further details (such as hostname and IP address). The difference also manifests in other Mac-based zeroconf browsers (e.g. Zero Conf Browser and LocalSites) in that they can open the advertised website when advertised using multicast-dns, but not when advertised using bonjour-service. Looking at Wireshark logs (and with my very limited knowledge of DNS) the main difference appears to be that bonjour sends all records in the Answers section, whereas in multicast-dns I was able to copy the behaviour of another working device and send only the PTR record in the Answers section, while sending types SRV, TXT and A in the Additional records section. Perhaps this is what bonjour browsers expect. multicast-dns response (working) Multicast Domain Name System (response) bonjour-service response (not working) Multicast Domain Name System (response) |
@JensEggers Thanks for the deeper dive, it is super helpful. |
This might be duplicate of #9 or #13, if that's the case I'm sorry!
🥂 🍻 Thanks in advance for great work with open sourcing this. 🎉
I'm trying this on:
npx ts-node -v
:v10.9.2
node -v
: `v18.13.02.1.0 (6)
Description
I'm trying to implement the
react-native-zeroconf
library in my react native app and serve from my server with yourbonjour-service
, but It does not seem that the announce from this library is reaching the network properly.If I use the Discovery App I can see services such as Airplay and others, but not whatever I announce from this library.
If I try to scan for
airplay
overtcp
withreact-native-zeroconf
I get matches from within my iOS simulator I will see my apple TV which is only connected by bluetooth even.My setup
index.ts
It will output something like this:
If I use
![Screenshot 2024-01-05 at 19 24 39](https://private-user-images.githubusercontent.com/457653/294579099-bedd12c3-5ee7-4550-9558-430b4c7ed740.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwNjQ5MzAsIm5iZiI6MTczOTA2NDYzMCwicGF0aCI6Ii80NTc2NTMvMjk0NTc5MDk5LWJlZGQxMmMzLTVlZTctNDU1MC05NTU4LTQzMGI0YzdlZDc0MC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwOVQwMTMwMzBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xMmEzN2YyOGQ1ZmVkMDgyN2U5NTA3YmNlMzE3NjUzZTgzZDhiYmQ1NWIyNzRiMDRkYTVhMDliZWFmNWU3NzQ2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.NP9BjgVRVrXRr398Yc8fUZH8UnK1cLTayL-uYx7ji-4)
bounjour-service
as client it works, but not ideal for a react native environment, and it's weird that other applications cannot see the announcement either.The text was updated successfully, but these errors were encountered: