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
2 Answers
Reset to default 5If 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
版权声明:本文标题:javascript - TypeError - Network Request Failed (no hint where problem is) - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741912303a2404515.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论