Unable to delete an object Parse Server

441 Views Asked by At

Everything is working fine untill I decide to delete something, my hosting is back4app.com. I verified the security restrictions of my Database so it's ok I can write, read also delete objects, but when I try to delete an object by using e.g:

gameScore.delete();

I got an error like this:

Connection Error
There was a networking error in the connection to parseapi.back4app.com/....

I don't understand why, because I can do queries, update objects, create new objects and all, the only thing I can't do is deleting objects, why?

OBS: I'm using parse4cn1 API for Codename One framework and my hosting is back4app.com.

EDITED:

@ShaiAlmog Yes this is an android device, today my friends and I have figured out what is causing that issue, and it's related with android version, it worked fine in versions 6.0.1 and higher, but in versions such as 4.4.2, 4.2.2 and probably lower it doesn't work and won't work. Not sure if it's either a parse4cn1 API issue or a Codename One API issue, I couldn't debug it because I have no debugging skills, but anyways it's android version related. In my country those android versions are pretty much in use so most of my custumers also some of my friends with Codename One subscriptions are using those versions of android, we hopefully wait for an update if that issue is confirmed by your side.

Debugging log:

04-12 04:06:28.896: W/Conscrypt(2285): Could not set socket write timeout: java.lang.reflect.InvocationTargetException
04-12 04:06:28.896: W/Conscrypt(2285):  at java.lang.reflect.Method.invokeNative(Native Method)
04-12 04:06:28.896: W/Conscrypt(2285):  at java.lang.reflect.Method.invoke(Method.java:511)
04-12 04:06:28.896: W/Conscrypt(2285): Caused by: libcore.io.ErrnoException: setsockopt failed: EBADF (Bad file number)
04-12 04:06:28.896: W/Conscrypt(2285):  at libcore.io.Posix.setsockoptTimeval(Native Method)
04-12 04:06:28.896: W/Conscrypt(2285):  at libcore.io.ForwardingOs.setsockoptTimeval(ForwardingOs.java:120)
04-12 04:06:28.916: I/System.out(7079): showKeyboard false
04-12 04:06:28.996: D/hawaii.hwcomposer(1460): FBDevice::vsync called 65 times
04-12 04:06:29.006: D/hawaii.hwcomposer(1460): FBDevice::post called 7 times [7 0 0 0 0 0 0 0]
04-12 04:06:29.156: D/dalvikvm(7079): GC_CONCURRENT freed 1931K, 24% free 14689K/19148K, paused 2ms+12ms, total 53ms
04-12 04:06:29.226: D/Biblioteca Digital(7079): [EDT] 0:5:58,564 - Exception: java.net.ProtocolException - DELETE does not support writing
04-12 04:06:29.226: W/System.err(7079): java.net.ProtocolException: DELETE does not support writing
04-12 04:06:29.226: W/System.err(7079):     at libcore.net.http.HttpURLConnectionImpl.initHttpEngine(HttpURLConnectionImpl.java:249)
04-12 04:06:29.226: W/System.err(7079):     at libcore.net.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:79)
04-12 04:06:29.226: W/System.err(7079):     at libcore.net.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:197)
04-12 04:06:29.226: W/System.err(7079):     at libcore.net.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:281)
04-12 04:06:29.226: W/System.err(7079):     at com.codename1.impl.android.AndroidImplementation.openOutputStream(AndroidImplementation.java:4784)
04-12 04:06:29.226: W/System.err(7079):     at com.codename1.io.ConnectionRequest.performOperation(ConnectionRequest.java:674)
04-12 04:06:29.226: W/System.err(7079):     at com.codename1.io.NetworkManager$NetworkThread.run(NetworkManager.java:282)
04-12 04:06:29.226: W/System.err(7079):     at com.codename1.impl.CodenameOneThread$1.run(CodenameOneThread.java:60)
04-12 04:06:29.226: W/System.err(7079):     at java.lang.Thread.run(Thread.java:856)
1

There are 1 best solutions below

5
On BEST ANSWER

It's a bug in Parse4cn1 I've created a pull request with the proposed fix for the maintainer of the project here: https://github.com/sidiabale/parse4cn1/pull/36