N
N
Nick20152016-01-26 15:33:01
Android
Nick2015, 2016-01-26 15:33:01

Error with parse.com - "space, apostrophe"?

First, let me explain the situation... There is a record of data on parse.com and everything is working well. Here's what the record looks like and how data is loaded from it:

public ArrayList<MyObj> loadMyObjs() {
        Log.d("Parse", "MyObj");
 
        final ArrayList<MyObj> myObjs = new ArrayList<>();
        ParseQuery<ParseObject> query = ParseQuery.getQuery("MyObj");
        query.whereEqualTo("user", ParseUser.getCurrentUser());
        List<ParseObject> parseObjects = null;
        try {
            parseObjects = query.find();
            for (ParseObject object : parseObjects){
                MyObj myObj= new MyObj();
                myObj.setId(UUID.fromString((String) object.get(MyObj.JSON_ID)));
                myObj.setTitle(object.getString(MyObj.JSON_TITLE));
                myObj.setDetails(object.getString(MyObj.JSON_DETAILS));
                myObj.setParseId(object.getObjectId());
                myObjs.add(myObjs);
            }
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return myObjs;
    }

SaveObject to parse.com
public void saveMyObjss( ArrayList<MyObjs> myObjss){
        for(final MyObjs myObjs : myObjss) {
            ParseObject object = myObjs.getObject();
            if (isOnline()) {
                if (myObjs.getParseId() == null) {
                    Log.i("MyObjsParse", "myObjs == 1");
                    object.put(MyObjs.JSON_ID, myObjs.getId() + "");
                    if (myObjs.getTitle() == null) {
                        object.put(MyObjs.JSON_TITLE, "");
                    } else {
                        object.put(MyObjs.JSON_TITLE, myObjs.getTitle());
                    }
 
                    if (myObjs.getDetails() == null) {
                        object.put(MyObjs.JSON_DETAILS, "");
                    } else {
                        object.put(MyObjs.JSON_DETAILS, myObjs.getDetails());
                    }
                    object.put("user", ParseUser.getCurrentUser());
                    object.saveInBackground(new SaveCallback() {
                        @Override
                        public void done(ParseException e) {
                            Log.i("Save my myObjss", "MyObjs save(Parse)");
                        }
                    });
                } else {
                    if (myObjs.getParseId() != null) {
                        Log.i("MyObjsParse", "myObjs >>>>>> 0");
                        ParseQuery<ParseObject> query = ParseQuery.getQuery("MyObjs");
                        query.whereContains("user", ParseUser.getCurrentUser().toString());
                        Log.i("ObjectId", " " + myObjs.getParseId());
                        query.getInBackground(myObjs.getParseId(), new GetCallback<ParseObject>() {
                            @Override
                            public void done(ParseObject object, ParseException e) {
                                if (e == null) {
                                    object.put(MyObjs.JSON_ID, myObjs.getId() + "");
                                    object.put(MyObjs.JSON_TITLE, myObjs.getTitle());
                                    object.put(MyObjs.JSON_DETAILS, myObjs.getDetails());
                                    object.put("user", ParseUser.getCurrentUser());
                                    object.saveEventually(new SaveCallback() {
                                        @Override
                                        public void done(ParseException e) {
                                            Log.i("Save my myObjss", "MyObjs save(Parse)");
                                        }
                                    });
                                }
                            }
                        });
                    }
        }
    }

I have 2 fields. These fields record the name and details of the object. When I enter a space or an apostrophe, the data is saved on pars.com normally, but when I want to load it, I get this error (when I deleted that element with a space, everything is fine):
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err: com.parse.ParseRequest$ParseRequestException: i/o failure
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at com.parse.ParseRequest.newTemporaryException(ParseRequest.java:289)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at com.parse.ParseRequest$2.then(ParseRequest.java:144)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at com.parse.ParseRequest$2.then(ParseRequest.java:138)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at bolts.Task$15.run(Task.java:917)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at java.lang.Thread.run(Thread.java:856)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err: Caused by: java.io.IOException: unknown format (magic number 227b)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:101)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:81)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at com.parse.ParseDecompressInterceptor.intercept(ParseDecompressInterceptor.java:40)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at com.parse.ParseHttpClient$ParseNetworkInterceptorChain.proceed(ParseHttpClient.java:147)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at com.parse.ParsePlugins$1.intercept(ParsePlugins.java:115)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at com.parse.ParseHttpClient$ParseNetworkInterceptorChain.proceed(ParseHttpClient.java:147)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at com.parse.ParseHttpClient.execute(ParseHttpClient.java:122)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at com.parse.ParseRequest$3.then(ParseRequest.java:135)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at com.parse.ParseRequest$3.then(ParseRequest.java:132)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at bolts.Task$15.run(Task.java:917)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at bolts.Task.completeAfterTask(Task.java:908)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at bolts.Task.continueWithTask(Task.java:715)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at bolts.Task.continueWithTask(Task.java:726)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at bolts.Task$13.then(Task.java:818)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:     at bolts.Task$13.then(Task.java:806)
01-25 22:03:08.211 2755-2755/com.admin.test W/System.err:   ... 4 more

What is the problem here please?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Vishnevsky, 2016-02-10
@Tema_man

Perhaps it has something to do with the closure of parse.com?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question