Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

react-native - fetch: Network request failed

$
0
0

I am developing a app using React Native and expo. I want to fetch an API but I get this error.

[Unhandled promise rejection: TypeError: Network request failed]- node_modules\whatwg-fetch\dist\fetch.umd.js:541:17 in setTimeout$argum- node_modules\react-native\Libraries\Core\Timers\JSTimers.js:130:14 in - node_modules\react-native\Libraries\Core\Timers\JSTimers.js:383:16 in - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:416:- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:109:- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:364:14 in _callTimer- node_modules\react-native\Libraries\Core\Timers\JSTimers.js:383:16 in callTimers   - node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:416:4 in __callFunction- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:109:6 in __guard$argument_0- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:364:10 in __guard- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:108:4 in callFunctionReturnFlushedQueue* [native code]:null in callFunctionReturnFlushedQueue

Fetching another url (like: "https://jsonplaceholder.typicode.com/todos/1") works fine. And when I paste the exact same url in my Browser it also works fine. The weird thing is that it works sometimes.

I suspect it has something to do with the ssl certification, because when running a ssl test over it it shows "chain issues". I can't fix the ssl cerficat, but is there a way to ignore the incomplete ssl certification?


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>