Can not create BackendLessGeometry from type weborb.reader.CacheableAdaptingTypeWrapper


I’m currently trying to receive/remove a LineString from my database once it is approved/disapproved and reflect that on my Android application, however every time I approve or disapprove my app crashes giving the error:

Application ID: 99C0754B-6B4E-417F-FF30-6281C4DFFB00

java.lang.RuntimeException: Can not create BackendlessGeometry from type weborb.reader.CacheableAdaptingTypeWrapper
                 	at com.backendless.persistence.BackendlessGeometryFactory.createObject(
                 	at weborb.util.ObjectFactories._createArgumentObject(
                 	at weborb.util.ObjectFactories.createArgumentObject(
                 	at weborb.reader.AnonymousObject.getPropertyValue(
                 	at weborb.reader.AnonymousObject.setFieldsDirect(
                 	at weborb.reader.AnonymousObject.adaptToClass(
                 	at weborb.reader.AnonymousObject.adapt(
                 	at weborb.reader.AnonymousObject.adapt(
                 	at weborb.reader.CacheableAdaptingTypeWrapper.adapt(
                 	at com.backendless.async.message.AsyncMessage$ResponseHandler.handle(
                 	at com.backendless.async.message.AsyncMessage.handleCallback(
                 	at com.backendless.core.AndroidCarrier$1.handleMessage(
                 	at android.os.Handler.dispatchMessage(
                 	at android.os.Looper.loopOnce(
                 	at android.os.Looper.loop(
                 	at java.lang.reflect.Method.invoke(Native Method)

I’m confused as I am able to retrieve the LineStrings initially just fine, and I am also able to change other properties for that particular object, such as likes and have it reflect on the Android app just fine as well. Furthermore, I am also able to delete the object from and have it reflect on my application too.

I have two functions that are for the approval functionality here:

override suspend fun observeApproval(): Flow<PointSet> {
        return callbackFlow {
            Log.d("observeApproval", "here")
            val event = backendless.of(
            val callback = object : AsyncCallback<PointSet> {
                override fun handleResponse(response: PointSet) {
                    Log.d("observeApproval", response.toString())

                override fun handleFault(fault: BackendlessFault?) {
                    Log.d("observeApproval", fault.toString())
                    fault?.message?.let { cancel(message = it) }
            event.addUpdateListener("approved = false or approved = true", callback)
            awaitClose {


   private fun observeApproval() { // Observes or "listens" to changes for a PointSet based on approval/disapproval
        viewModelScope.launch(Dispatchers.IO) {
            repository.observeApproval().collect { set ->
                Log.d("observeApproval", "${set.points.toString()}")
                if (set.approved) {
                } else {
                    pointSets.removeAll {
                        it.objectId == set.objectId

Any help or explanation would be appreciated! Thank you!

Hello @Kayin_Ilagan,

I have created an internal ticket for this issue. Once we have any update on it, you will be informed about it here in this thread.



I managed to fix the issue! It turns out that when I receive the PointSet object from Backendless, the collection automatically unmaps it for me, however when trying to access my ‘points’ property of the PointSet object, the object itself is still a hashmap. The hashmap contains information needed to be identified as a LineString, however Android’s compiler cannot cast it as LineString. In order to fix it, I had to access the hashmap’s coordinates key and cast the associated value Array. Once casted, every element of that array is also casted as an Array which allowed me to access the Double values of the X and Y coordinates and create the LineString object manually in Android.

Hope this helps anyone!