-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting NETWORK_ERROR sometimes when requesting #181
Comments
Trying |
Can I implement retry logic for the same request, if I got the specific error. Would something like this work with apisauce: axios/axios#934. |
You can access the axiosInstance after creating an api by doing |
hi I wrote like this api.axiosInstance.interceptors.response.use(function (response) { I always get log 'interceptors response success' for fine calls. But nothing got logged for NETWORK_ERROR. Means not intercepted for this error. Why is that? |
I believe axios treats that as an exception, so perhaps doesn't take the interception route home? I haven't tried that before so I can't say for sure. |
how we can effectively debug the issue. to find who is responsible for the error |
Everything that apisauce knows comes from that, so if you have a look at that error message and stack trace closely, that might give you some more info. In your original post, I see something like Getting access to the server logs can help too (not sure if that's an option for you or not). Lack of a good error message certain is frustrating to track down. |
Even i am facing the same issue........... |
Can someone please post the solution if u get any info about this? |
Check your network connection... I had the same problem hahaha |
I am having same issue @keerthi0611 are you able to solve it? |
@waleedarshad Check your network connection . Maybe your device is disconnected. |
My network is good, but I still get |
Guys, sadly I'm here for the same reason. NETWORK_ERROR pops out without any clue. I've noticed that it depends on the machine whom listens the requests. But couldn't realize any possible cause. |
+1 |
1 similar comment
+1 |
|
I get the NETWORK_ERROR in react-native v0.61.5 on iOS if I minimize the app during the request before a response is received. The request however still reaches the server but axios reports an NETWORK_ERROR with |
I have same issue NETWORK_ERROR with status: null |
I facing the same NETWORK_ERROR problem ,
|
I had same issue NETWORK_ERROR status: null. |
THE SOLUTION is:
Good Luck |
Had this issue. I was following a tutorial that was using an emulator, but I was using a real device for my testing. |
@amabdul did you come right ? so we can close this ? |
I have the same issue, even in my baseURL I have used my machine ipv4 address instead of localhost but still the problem remains |
So I had a similar issue and it was because I was sending the date to my APS .net backend but the date wasn't in a string format. |
Check the data, I had the same problem and noticed that a variable in my data was undefined |
Well, I tried all of the possibilities, I used the correct IPv4, IPv6, './listings/, localhost. The response of the request: |
Same here, apisauce doesnt even send the request at all, just returns NETWORK_ERROR because the payload is malformed - needs better handling. |
When I try to fetch data sometimes I am getting the error, most of the time works fine.
If it generate error once, the chance of occurence is high, in the immediate call.
The error log in the chrome debugger is:
{duration: 126, problem: "NETWORK_ERROR", originalError: Error: Network Error
at createError (blob:http://10.0.0.59:8081/f5cf0951-79a8-4e8c-9a37-0013ae13…, ok: false, status: null, …}
react-native-cli: 2.0.1
react-native: 0.55.4
I am not getting why the error occur for the same success request. The network is reachable. Since it occur sometime its become a headache. Please help
The text was updated successfully, but these errors were encountered: