title: mDNS on react-native Request failed with status code 500
body: <p>I am currently working on an IoT project which requires service discovery (I am in the Android side). I decided to use <a href="https://github.com/balthazar/react-native-zeroconf" rel="nofollow noreferrer">react-native-zeroconf</a> and I encountered a problem.</p>
  <p>There is a warning Error: Request failed with status code 500 once I called .scan() method.
  I have already added permission into the AndroidManifest file. Thank you in advance.</p>
  <p>Edit: remove async from function</p>
  <pre><code>export function scanmDNS() {
    const zeroconf = new Zeroconf();
    zeroconf.scan();
    const res = zeroconf.getServices();
    console.log({ res });
    zeroconf.stop();
  }
  </code></pre>
  <pre><code>Object {
    &quot;res&quot;: Object {},
  }
  
  Possible Unhandled Promise Rejection (id: 0):
  Error: Request failed with status code 500
  createError@http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false&amp;app=com.doji.dojimobileapplication&amp;modulesOnly=false&amp;runModule=true:224752:26
  settle@http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false&amp;app=com.doji.dojimobileapplication&amp;modulesOnly=false&amp;runModule=true:224742:25
  onloadend@http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false&amp;app=com.doji.dojimobileapplication&amp;modulesOnly=false&amp;runModule=true:224619:15
  dispatchEvent@http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false&amp;app=com.doji.dojimobileapplication&amp;modulesOnly=false&amp;runModule=true:33843:31
  setReadyState@http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false&amp;app=com.doji.dojimobileapplication&amp;modulesOnly=false&amp;runModule=true:32985:29
  __didCompleteResponse@http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false&amp;app=com.doji.dojimobileapplication&amp;modulesOnly=false&amp;runModule=true:32783:29
  emit@http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false&amp;app=com.doji.dojimobileapplication&amp;modulesOnly=false&amp;runModule=true:4940:42
  __callFunction@http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false&amp;app=com.doji.dojimobileapplication&amp;modulesOnly=false&amp;runModule=true:5979:36
  http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false&amp;app=com.doji.dojimobileapplication&amp;modulesOnly=false&amp;runModule=true:5707:31
  __guard@http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false&amp;app=com.doji.dojimobileapplication&amp;modulesOnly=false&amp;runModule=true:5933:15
  callFunctionReturnFlushedQueue@http://localhost:8081/index.bundle?platform=android&amp;dev=true&amp;minify=false&amp;app=com.doji.dojimobileapplication&amp;modulesOnly=false&amp;runModule=true:5706:21
  callFunctionReturnFlushedQueue@[native code]
  Possible Unhandled Promise Rejection (id: 1):
  </code></pre>