Search code examples
google-chrome-extensiongoogle-chrome-osmdns

Chrome Sockets API Behaves Differently on Chrome OS (vs. Ubuntu, Windows)?


I have a sample Chrome packaged app which uses the Chrome sockets API to perform DNS service discovery. The heavy lifting is borrowed from the example here:

https://github.com/GoogleChrome/chrome-app-samples/tree/master/mdns-browser

I just use service names such as _pdl-datastream._tcp.local (instead of the default of _services._dns-sd._udp.local).

On both my Ubuntu and Windows setups (Chrome 25.0.1364.172), the app can successfully find my network printer; I can list its IP address and service instance name. However, it fails in Chrome OS on my Samsung Chromebook (Chrome 25.0.1364.173); nothing is found.

Any idea what the problem might be? Is this a known issue?


Solution

  • You should check if it's the default firewall. On a Chromebook by default I believe all incoming connections are blocked. If you're running in dev mode you can do the following to allow all incoming udp traffic to test whether this is the problem:

    1. Press Ctrl+Alt+T to bring up a terminal window and type the following
    2. shell
    3. sudo iptables -I INPUT -p udp -j ACCEPT