My app uses 1.5.1 of the Android Parse SDK.
Many of my customers connect to Parse.com without issue. I have some customers who are receiving an error as follows:
i/o failure: org.apache.http.conn.HttpHostConnectException: Connection to https://api.parse.com refused
com.parse.ParseException: i/o failure: org.apache.http.conn.HttpHostConnectException: Connection to https://api.parse.com refused
at com.parse.ParseRequest.connectionFailed(SourceFile:387)
at com.parse.ParseRequest$3.call(SourceFile:271)
at com.parse.Task$3.run(SourceFile:199)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
I am running the code in a thread and have a timer that will stop the timer and put a message that it is unable to connect. It is failing before this timer times out.
Here it the code that is failing:
new Thread(new Runnable() {
public void run() {
try {
Parse.initialize(mContext, mAppId, mAppKey);
ParseQuery<ParseObject> query1 = ParseQuery.getQuery("myTable");
query1.setCachePolicy(ParseQuery.CachePolicy.NETWORK_ONLY);
ParseObject metaData = query1.getFirst();
// do other work...
}
catch (Exception e) {
Log.e(TAG, e);
}
}
});
The customers show screen shots with active data connections (both cellular and wireless).
Any ideas on why some customers are failing and most work?