Git Product home page Git Product logo

Comments (8)

kurucaner avatar kurucaner commented on April 27, 2024 1

I'm getting the same error, but only from Android. I don't think this is related to Axios because I used the bare JavaScript fetch method and the API call just never resolves.

from axios.

kurucaner avatar kurucaner commented on April 27, 2024 1

I'm getting the same error, but only from Android. I don't think this is related to Axios because I used the bare JavaScript fetch method and the API call just never resolves.

I'm stuck at this problem for like 1 week. Some people say that axios isn't using an API that called NSURLSession provide by Apple to make a request so when user switch to another app the OS just cancel that request.

Honestly, in my case, I'm convinced that this is a backend problem. I created a basic Node.js backend and made a similar API call to it; everything was working just fine. We are looking into the issue and will keep you updated if we figure this out.

from axios.

nkqdev avatar nkqdev commented on April 27, 2024 1

@suhaotian I'm using SOAP service so when it's say Network Error everything just stop and i don't see any retry

from axios.

vivek0046 avatar vivek0046 commented on April 27, 2024 1

same issue ,any resolution?

from axios.

MenamAfzal avatar MenamAfzal commented on April 27, 2024 1

Em facing the same issue ....!

from axios.

nkqdev avatar nkqdev commented on April 27, 2024

I'm getting the same error, but only from Android. I don't think this is related to Axios because I used the bare JavaScript fetch method and the API call just never resolves.

I'm stuck at this problem for like 1 week. Some people say that axios isn't using an API that called NSURLSession provide by Apple to make a request so when user switch to another app the OS just cancel that request.

from axios.

suhaotian avatar suhaotian commented on April 27, 2024

@nkqdev If it's GET data, if fetch data error, it should have chance to retry few times. check this article 3 Tips to Make Your App More Stable

@kurucaner And the android error, I think it's because you use '127.0.0.1' or 'localhost', I met this error before, and change the local IP to LAN ip(for example, like 192.168.1.10), then it's worked.

I use expo and this is how I get LAN ip in dev mode:

import Constants from 'expo-constants';

const host = Constants.expoGoConfig?.debuggerHost?.split(':')?.[0];
const API_URL = process.env.EXPO_PUBLIC_API_URL || '';

export const baseURL =
  host &&
  (host.startsWith('192.168') || host.startsWith('10.') || host.startsWith('172.')) &&
  (API_URL.indexOf('localhost') > -1 || API_URL.indexOf('127.0.0.1') > -1)
    ? 'http://' + host + ':' + (API_URL.split(':').pop() || '')
    : API_URL;

from axios.

wilsonmjunior avatar wilsonmjunior commented on April 27, 2024

Em facing the same issue ....!

from axios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.