Android Search error: Oops something didn’t go as planned. Let us get you back in action

Hi, everyone.
I can not Search for TEI from one Orgunit in another Orgunit for a tracker capture on an android tablet. When I click on Search after I put ID TEI, I get the following error Oops, something didn’t go as planned. Let us get you back in action
Note: This happens only in one Orgunit while the other Orgunit works fine.

java.lang.ClassCastException: android.database.sqlite.SQLiteException cannot be cast to org.hisp.dhis.android.core.maintenance.D2Error
at org.dhis2.usescases.searchTrackEntity.SearchRepositoryImpl.transformResult(SearchRepositoryImpl.java:845)
at org.dhis2.usescases.searchTrackEntity.SearchRepositoryImpl.lambda$searchTrackedEntities$1$org-dhis2-usescases-searchTrackEntity-SearchRepositoryImpl(SearchRepositoryImpl.java:186)
at org.dhis2.usescases.searchTrackEntity.SearchRepositoryImpl$$ExternalSyntheticLambda0.apply(Unknown Source)
at androidx.paging.DataSource$1.apply(DataSource.java:192)
at androidx.paging.DataSource$1.apply(DataSource.java:187)
at androidx.paging.DataSource.convert(DataSource.java:200)
at androidx.paging.WrapperPageKeyedDataSource$1.onResult(WrapperPageKeyedDataSource.java:70)
at org.hisp.dhis.android.core.trackedentity.search.TrackedEntityInstanceQueryDataSourceResult.loadInitial(TrackedEntityInstanceQueryDataSourceResult.kt:60)
at androidx.paging.WrapperPageKeyedDataSource.loadInitial(WrapperPageKeyedDataSource.java:59)
at androidx.paging.PageKeyedDataSource.dispatchLoadInitial(PageKeyedDataSource.java:339)
at androidx.paging.ContiguousPagedList.(ContiguousPagedList.java:175)
at androidx.paging.PagedList.create(PagedList.java:216)
at androidx.paging.PagedList$Builder.build(PagedList.java:388)
at androidx.paging.LivePagedListBuilder$1.compute(LivePagedListBuilder.java:206)
at androidx.paging.LivePagedListBuilder$1.compute(LivePagedListBuilder.java:171)
at androidx.lifecycle.ComputableLiveData$2.run(ComputableLiveData.java:101)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)

Thanks

Hello @jamal_aljadan .

Can you please clarify what do you mean by searching in another Org Unit? Android behaves differently than Web in terms of searching and will search by Program (without specifying any Org Unit) and under all the Org Units assigned to the user in the Search configuration under user settings.

So I don’t know if you mean using filters, or performing a full search (in every program -which is not OU related-), or by having two users assigned to different Org Units.

Hello @jaime.bosque
I will clarify the problem:
for example I have X Orgunit and Y Orgunit
When I search for registered patients in Y from a user related to X, I get the required result.
But when I searched for registered patients in X from users related to Y, I didn’t get any results and appeared the wrong message as you showed in the previous post.

I hope the problem has become clear.

Hi @jamal_aljadan,

Thanks for sharing. I would like to understand it a bit better. If I am not wrong, there are two orgunits (X and Y) and two different dhis2 users, each one of them assigned to a different orgunit, is it right? If so, how are the orgunits assigned to each user (capture and search)?

And the search, is it based on a patient ID (a tracker attribute)?

Thanks

Hello @vgarciabnz,
It is exactly as you explained it.
Each user has the authority to collect data within it’s his orgunit only and search within all orgunits by patient ID (a tracker attribute).

Thank you

Hey @jamal_aljadan . Is this a testing server where you could share credentials via private message? If yes, plesae provide them privately with the steps required (the user to use and the patients to search in both org units).

Hi @jaime.bosque . Unfortunately, I don’t have a testing server. I will prepare the server for testing and share it with you.

Best regards.

1 Like

Perfect! Please let me know once you have it ready. Don’t forget to share the credentials via Private Message :slight_smile:

1 Like