parse-community / Parse-SDK-Android

The Android SDK for Parse Platform
https://parseplatform.org/
Other
1.88k stars 734 forks source link

Parse Cloud on Android with error i/o failure. #1048

Closed dev01-adroitinfosol closed 4 years ago

dev01-adroitinfosol commented 4 years ago

hi, im stuck with this issue on android devices, i used :

    android:usesCleartextTraffic="true"
    android:networkSecurityConfig="@xml/network_security_config"

    <meta-data
        android:name="com.parse.SERVER_URL"
        android:value="@string/parse_server" />
    <meta-data
        android:name="com.parse.APPLICATION_ID"
        android:value="@string/parse_app_id" />
    <meta-data
        android:name="com.parse.CLIENT_KEY"
        android:value="@string/parse_client_id" />

everything i can find on google, but still when i call parse cloud function request :+1:

    HashMap<String,String> map = new HashMap<>();
    map.put("score", String.valueOf(rightQuestionCount));
    map.put("time", String.valueOf((int)timeSpent/1000));
    map.put("user", ParseUser.getCurrentUser().getObjectId());

    ParseCloud.callFunctionInBackground("saveLeaderboard", map, new FunctionCallback<Map<String,Object>>() {
        @Override
        public void done(Map<String,Object> objectMap, ParseException e) {

            if (e!=null) {
                Log.e(TAG, "parse error : "+e.getLocalizedMessage() );
            } else {
//                    Log.e(TAG, "done: "+object.toString() );
            }
        }
    });

always getting error, V/com.parse.ParseRequest: Request failed. Waiting 1232 milliseconds before attempt parse-community/parse-server#1 V/com.parse.ParseRequest: Request failed. Waiting 1232 milliseconds before attempt parse-community/parse-server#2 V/com.parse.ParseRequest: Request failed. Waiting 1232 milliseconds before attempt parse-community/parse-server#3 V/com.parse.ParseRequest: Request failed. Waiting 1232 milliseconds before attempt parse-community/parse-server#4

error i/o failure.

could you please help me?

mtrezza commented 4 years ago

This looks like a network issue.

The client SDK seems to be unable to reach Parse Server. Do other requests (like queries or user sign-up) execute successfully when made by client SDK?

dev01-adroitinfosol commented 4 years ago

yes, everything is working except ParseCloud.

mtrezza commented 4 years ago

Can you post the Parse Server logs when you try to call a Cloud Code function? Does the call time out or how long does it take until the client logs the i/o error?

dev01-adroitinfosol commented 4 years ago

logs are given below:

2020-07-11 10:46:15.314 14777-14820/ V/com.parse.ParseRequest: Request failed. Waiting 1512 milliseconds before attempt #1 2020-07-11 10:46:16.836 14777-14823/ V/com.parse.ParseRequest: Request failed. Waiting 3024 milliseconds before attempt #2 2020-07-11 10:46:19.869 14777-14826/ V/com.parse.ParseRequest: Request failed. Waiting 6048 milliseconds before attempt #3 2020-07-11 10:46:25.927 14777-14829/ V/com.parse.ParseRequest: Request failed. Waiting 12096 milliseconds before attempt #4 2020-07-11 10:46:38.045 14777-14777/ E/TestEngine: parse error : i/o failure

mtrezza commented 4 years ago

These are the Android logs, can you post the Parse Server logs? Does the call time out or how long does it take until the client logs the i/o error?

dev01-adroitinfosol commented 4 years ago

ok i dont have that.

mtrezza commented 4 years ago

I'm closing this as it does not seem to be a Parse Android SDK issue.

Here are some resources you can try:

Feel free to comment if you have any questions and we can re-open this issue.