2

Parse server giving me an i/o failure anytime I try to make any query.

I have tried using another server, checking my connection, using other hones, starting a new android project, but nothing seems to work.

public class StarterApplication extends Application {
  @Override
  public void onCreate() {
    super.onCreate();

    // Enable Database.
    Parse.enableLocalDatastore(this);

    // Add your initialization code here
    Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())
        .applicationId("b8c0194c615939346333f498a40551ff16eb7952")
        .clientKey("a54b263385f0a91a75537686c7afec0a77e3d3c7")
        .server("http://35.188.72.145:80/parse/")
        .build()
    );
    ParseObject object = new ParseObject("ExampleObject");
    object.put("myNumber", "123");
    object.put("myString", "rob");
    object.saveInBackground(new SaveCallback() {
      @Override
      public void done(ParseException e) {
        if(e == null) {
          Log.i("Parse_Result", "Successful!");
        } else {
          Log.i("Parse_Result", "Failed: " + e.toString());
        }
      }
    });
  }
} 

Instead of logging successful, I got the i/o failure.

5
  • It does not seem to be a SDK problem, but a server problem. Try to run curl -X GET http://35.188.72.145:80/parse/health and check if your server is healthy. I tried here and I got no response. Maybe some firewall? I'd suggest you to first run parse server in a local machine (github.com/parse-community/parse-server#locally) to make sure that your Android app is working and then try to setup a remote server. Commented Jun 26, 2019 at 23:20
  • Hello, I am still getting the i/o failure error, even when running it with mogodb locally Commented Jun 27, 2019 at 11:48
  • Is curl -X GET http://yourlocalserver/parse/health working? Commented Jun 27, 2019 at 16:54
  • I am getting port timeout after waiting for 20 seconds Commented Jun 27, 2019 at 21:17
  • So you have something wrong with your server. Can you please share the command you are using to start the parse server in your local machine? Commented Jun 28, 2019 at 18:11

2 Answers 2

0

Make sure that the internet connection (in your AndroidManifest) is enabled

<uses-permission android:name="android.permission.INTERNET" />
Sign up to request clarification or add additional context in comments.

Comments

0

If you have tried adding internet connection in the AndroidManifest, try uninstalling the app from emulator and run the app again. This worked for me, may or may not work for you.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.