Skip to content
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

Network Request Failed #16081

Closed
AAGSICON opened this issue Sep 25, 2017 · 12 comments
Closed

Network Request Failed #16081

AAGSICON opened this issue Sep 25, 2017 · 12 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@AAGSICON
Copy link

screenshot_2017-09-22-13-18-50-54

var SERVER_SIGNUP_URL = 'https://192.168.0.80/Registration/Registration.php';
fetch(SERVER_SIGNUP_URL + '?username=' + this.state.username + '&password=' + this.state.password)
.then((response) => response.json())
.then((responseData) => {
var id = responseData.id;
if (id === -1) {
this.hideProgressBar();
showMessage("Something is bad", "This username is already taken");
}
else {
this.props.navigator.push({
name: 'contacts',
password: this.state.password,
id: id,
username: this.state.username
});
}
})
.done();

@1048034876
Copy link

I have this problem too on android

@jakelacey2012
Copy link

Have you guys looked at this? https://stackoverflow.com/questions/38418998/react-native-fetch-network-request-failed

@clearloop
Copy link

clearloop commented Sep 28, 2017

if someone try to use emulator fetching "http://localhost/" or http://127.0.0.1/,
change them to '10.0.2.2'

@pull-bot
Copy link

@facebook-github-bot no-template

@facebook-github-bot
Copy link
Contributor

Hey, thanks for reporting this issue! It looks like your description is missing some necessary information, or the list of reproduction steps is not complete. Can you please add all the details specified in the Issue Template? This is necessary for people to be able to understand and reproduce the issue being reported. I am going to close this, but feel free to open a new issue with the additional information provided. Thanks! See "What to Expect from Maintainers" to learn more.

@facebook-github-bot facebook-github-bot added the Ran Commands One of our bots successfully processed a command. label Oct 10, 2017
@fsunset
Copy link

fsunset commented Nov 26, 2017

@AAGSICON @1048034876 - hey guys, have you reach a fix for it please? I'm stuck. Thanks a lot!

@ducanhmai205
Copy link

im stuck this too.

@1048034876
Copy link

you can try your ip instead of localhost

@JosePaulo95
Copy link

Dont get your ip from a website like findmyip.com go to the cmd and ipconfig

@branb
Copy link

branb commented Apr 12, 2018

I had the same error using http://localhost:8000 as my development server.

I think on react native 0.52.x it worked fine, but after upgrading to 0.54.x it caused the network request failed error.

As mentioned in #16081 (comment) and #16081 (comment), replacing localhost with my actual IP (not 127.0.0.1) didn't cause the error anymore.

@egeniegithub
Copy link

how to change the default IP address as development server?

@webeasystep
Copy link

this fix the problem
https://www.youtube.com/watch?v=shstJgkLW-I

@facebook facebook locked as resolved and limited conversation to collaborators Oct 10, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests