title: react native won't fetch locally on emulator
body: <p>I have a problem with iOS and Android. I'm using the following code:</p>
  
  <pre><code>fetch('https://192.168.0.143:3000/auth/signin').then(() =&gt; console.log('ok')).catch(error =&gt; console.log(error));
  </code></pre>
  
  <p>This is simplified offcourse, but you will get the point.</p>
  
  <p>This does not work, I get an error with "network request failed". When I test it in postman, it works! also <a href="https://localhost:3000/auth/signin" rel="nofollow noreferrer">https://localhost:3000/auth/signin</a> works in postman (192.168.0.143 is my local IP), but not through react-native fetch.</p>
  
  <p>I've created a self signed key, and my node js server code is the following:</p>
  
  <pre><code>https.createServer({
      key: fs.readFileSync('server.key'),
      cert: fs.readFileSync('server.cert')
  }, app).listen(3000,
  () =&gt; console.log('listening...'))
  </code></pre>
  
  <p>server.key and server.cert are both in the folder where app.js (nodejs) also is. And the server is running.</p>
  
  <p>Is there a problem with my self signed certificate? Or where can I locate my problem?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I've created a new part of my node.js-script:</p>
  
  <pre><code>const test = (req, res) =&gt; {
      res.status(200).send('OK').end()
  }
  app.get('/test', test)
  </code></pre>
  
  <p>So when I visit <a href="https://localhost:3000/test" rel="nofollow noreferrer">https://localhost:3000/test</a> on safari on my ios simulator, I see "OK". But the network request still keeps failing in my app. I think it has something to do with my self-signed certificate, but I don't know the exact problem.</p>