admin管理员组

文章数量:1313598

I face big plications here, my app doesnt start up and I get this strange error I havent faced before. Im running my app via Expo, just as a sidenote.

[Unhandled promise rejection: TypeError: Network request failed]

  • node_modules\whatwg-fetch\dist\fetch.umd.js:535:17 in setTimeout$argument_0
  • node_modules\react-native\Libraries\Core\Timers\JSTimers.js:130: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

I tried already to reinstall expo - did not help me in any way.

3 Weeks ago when I started my break from coding everything worked fine. I dont know what is the problem, the error is not pointing at any special part of the code. I can provide you with any informations needed, because at this point I dont even know where I should start to look for any errors.

I face big plications here, my app doesnt start up and I get this strange error I havent faced before. Im running my app via Expo, just as a sidenote.

[Unhandled promise rejection: TypeError: Network request failed]

  • node_modules\whatwg-fetch\dist\fetch.umd.js:535:17 in setTimeout$argument_0
  • node_modules\react-native\Libraries\Core\Timers\JSTimers.js:130: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

I tried already to reinstall expo - did not help me in any way.

3 Weeks ago when I started my break from coding everything worked fine. I dont know what is the problem, the error is not pointing at any special part of the code. I can provide you with any informations needed, because at this point I dont even know where I should start to look for any errors.

Share Improve this question asked Apr 20, 2021 at 18:46 Kubaghetto the fresh TestobunKubaghetto the fresh Testobun 4531 gold badge7 silver badges26 bronze badges 1
  • I am also not using localhost. It is a remote server that returns the data fine from the browser. – Jennifer Elyse Commented Jun 30, 2021 at 3:49
Add a ment  | 

2 Answers 2

Reset to default 5

If you are using an emulator then the issue could be that the localhost on Android/ios is pointing to the emulated Android/ios device, and not to the machine on which your server is running.

The solution is to replace localhost with the IP address of your machine. Try changing http://localhost:4000 by http://10.0.2.2:4000/

I picked this up from this post Maybe this helps

It is because your whatwg-fetch stop connection to this url because multiple calls at a time so, Just Change your Route name i.e, for eg: if your Url is like "http://10.0.2.2:4000/login" change it to something with new name like "http://10.0.2.2:4000/loginuser" and try

本文标签: javascriptTypeErrorNetwork Request Failed (no hint where problem is)Stack Overflow