React-native fetch throws “Network request failed” error on Android Devices with backend in remote server

i used react native for mobile development and i used node js as a backend in a remote server(not localhost) with “”, but i got network error in android 5.1 physical devise and return undefined as output of api,what should i do? i used a simple get requset to my api. i test an example api “” and it works properly with this test api. i have an api file:

    export const fetchMeetups = () => 
                .then(res => res.json()).catch((e) =>e);

and in the app.js:

static defaultProps = {
state = {
    loading: false,
    meetups: []

async componentDidMount() {
        loading: true
    const data = await this.props.fetchMeetups();
    setTimeout( () => this.setState({loading: false, meetups: 

and in the android i got this error: Network request failed

Does this help?

this answer is about ios, i work around android. i install a new react native and i dont have android folder to change AndroidManifest.xml file that mention in one answers of this question

the ip has problem, the problem solved by using domain and ssl for the donain

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.