BackendlessException{ code: 'Internal client exception', message: 'null' }

Hi. I have problem with getting users from table from params. Doing this like:

StringBuilder whereClause = new StringBuilder();
whereClause.append("Users[name]");
whereClause.append(".objectId='").append(SharedPrefs.getObjectId(context)).append("'");
whereClause.append(" and ");
whereClause.append("bodybuilding = true and crossfit = true");

BackendlessDataQuery dataQuery = new BackendlessDataQuery();
dataQuery.setWhereClause(whereClause.toString());
List<MatchedUserModel> result = Backendless.Persistence.of(MatchedUserModel.class).find(dataQuery).getData();
Log.e("aaaa", result.size() + "");

And trying get count of them… But I always getting

BackendlessException{ code: 'Internal client exception', message: 'null' }

How can I fix this? Maybe i doing something wrong? Or I need do other code? Not from this tutorial
https://backendless.com/documentation/data/android/data_relations_retrieve.htm?

Hi Gleb,

You can’t use synchronous API calls in the main thread in Android. This is specified in the documentation: https://backendless.com/documentation/data/android/data_sync_and_async_calls.htm

Please try using asynchronous methods.

Than you for reply. Can you show me where I have to add callback? Cuz I don’t understand.

This doc page contains both sync and async code examples: https://backendless.com/documentation/data/android/data_basic_search.htm

Thank you for help.