Shamsudeen
Shamsudeen

Reputation: 21

Parse Error com.parse.ParseRequest$ParseRequestException: i/o failure

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.

Upvotes: 2

Views: 842

Answers (2)

botdotcom
botdotcom

Reputation: 71

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.

Upvotes: 0

Dai Nguyen
Dai Nguyen

Reputation: 9

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

<uses-permission android:name="android.permission.INTERNET" />

Upvotes: 0

Related Questions