react-native: Networking is not working
Description
Hi, hope you are all doing well. I have created an app in v0.71.5, and everything is totally fine, but I am facing an issue that never faced before, and also couldn’t find any other report.
Networking is not working when I open chrome debugger. It is working normally, in the moment I open debugger, it does not show any error message, or any response, it is not triggered at all.
At the beginning I thought it is because of the domain, it was http and with IP, I just created a SSH domain and it’s still the same. When I try in other apps, it is working fine, but not in this app. The configuration is the same.
React Native Version
0.71.5
Output of npx react-native info
There are no logs, app wors fine, but networking not.
Steps to reproduce
I am not sure if you can reproduce it. I created a project, added UI components, then when tried to use axios, was working fine, but when opened debugger, it is not working anymore.
Snack, code example, screenshot, or link to a repository
I can’t do any screenshot, since it is only not triggering axios/fetch or any other network library at all.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 16 (2 by maintainers)
I have this same issue. Incredibly frustrating. I have found dozens of issues on this repo related to the issue including: #32730 #33404 #37907 #38015
The following are all the popular solutions to these issues that I’ve found:
implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.11' implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.11' implementation 'com.squareup.okhttp3:okhttp-urlconnection:5.0.0-alpha.11'I have tried all of these in multiple different combinations and the only one that even remotely works is XMLHttpRequest. This is an extremely extremely extremely poor solution, given the number of libraries using fetch, and the difficulty of manually replacing a library every single time it is discovered to use this common function. Hopefully there will be some sort of built in fix for this in the future.