Skip to content

XMLHttpRequest failed: "Unable to connect to the Parse API" on Android (react native) #1792

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

Closed
ghost opened this issue May 14, 2016 · 4 comments

Comments

@ghost
Copy link

ghost commented May 14, 2016

componentWillMount(){
    Parse.initialize('appname');
    Parse.serverURL = 'http://localhost:1337/parse/';
  }

It perfectly works on IOS, but for some reason it doesn't on Android... it should be an easy fix, but, alas, I haven't been able to find it.

@drew-gross
Copy link
Contributor

"Unable to connect to the Parse API" means there is some sort of network issue in your system. Check to make sure all your URLs are set correctly. If you still have issues, please ask on Server Fault or Stack Overflow.

@w3care25
Copy link

Usually this error occurs when you have ssl enabled on your server where you setup parse server.
Reason behind this is that node rejects unauthorized TLS.

So you can check it by putting
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";

in you parse server instance file. hope you issue will be fixed. let me know if it isn't.

@callmephilip
Copy link

This most likely has to do with how Android emulator deals with local host connection - more info here https://stackoverflow.com/questions/6760585/accessing-localhostport-from-android-emulator

@lexycole
Copy link

I had this issues eailer, reason was i SignUp with Github and fail to authenticate my mail address.
I solved it by signIn with email and password and verifying my mail too.
Hope this solve yours too.
Thanks ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants