Synchronization Error - Android App

Thank you, James. We seem to be having an issue with synchronization now.

Each time I try to sync my configuration, I receive the message in the DHIS2 log on the tablet that the synchronization failed and in the DHIS2 log for the system that an org unit is not part of the search scope. If I add the new org unit to the search scope (the org units causing the issues are not a part of the project, not even in the same country as the project), when I try to synchronize again, I have the same issue, but with a new org unit that is unrelated. Please find the errors from Android and desktop below:

Android:
[{“errorCode”:409,“errorDate”:“Jan 7, 2019 8:15:26 AM”,“errorDescription”:"{"httpStatus":"Conflict","httpStatusCode":409,"status":"ERROR","message":"An error occurred, please check import summary.","response":{"responseType":"ImportSummaries","status":"ERROR","imported":0,"updated":0,"deleted":0,"ignored":1,"importOptions":{"idSchemes":{},"dryRun":false,"async":false,"importStrategy":"SYNC","mergeMode":"REPLACE","reportMode":"FULL","skipExistingCheck":false,"sharing":false,"skipNotifications":false,"datasetAllowsPeriods":false,"strictPeriods":false,"strictCategoryOptionCombos":false,"strictAttributeOptionCombos":false,"strictOrganisationUnits":false,"requireCategoryOptionCombo":false,"requireAttributeOptionCombo":false,"skipPatternValidation":false,"force":false},"importSummaries":[{"responseType":"ImportSummary","status":"ERROR","importOptions":{"idSchemes":{},"dryRun":false,"async":false,"importStrategy":"SYNC","mergeMode":"REPLACE","reportMode":"FULL","skipExistingCheck":false,"sharing":false,"skipNotifications":false,"datasetAllowsPeriods":false,"strictPeriods":false,"strictCategoryOptionCombos":false,"strictAttributeOptionCombos":false,"strictOrganisationUnits":false,"requireCategoryOptionCombo":false,"requireAttributeOptionCombo":false,"skipPatternValidation":false,"force":false},"importCount":

{"imported":0,"updated":0,"ignored":1,"deleted":0}

,"conflicts":[

{"object":"TrackedEntityInstance.trackedEntityType","value":"Invalid trackedEntityTypeSgDABZDT1cA"}

],"reference":"AQ3FoZ3oaI7"}],"total":1}}",“errorMessage”:“Server connection failed. Click to check details”},

{“errorCode”:409,“errorDate”:“Jan 7, 2019 8:15:04 AM”,“errorMessage”:“Organisation unit is not part of the search scope: Lpnz4RIuU1P”}

,

{“errorCode”:409,“errorDate”:“Jan 7, 2019 8:15:02 AM”,“errorMessage”:“Organisation unit is not part of the search scope: Lpnz4RIuU1P”}

Desktop:
WARN 2019-01-07 13:30:50,798 Resolved [org.hisp.dhis.common.IllegalQueryException: Organisation unit is not part of the search scope: WR1RxkJ7dTY] (AbstractHandlerExceptionResolver.java [http-bio-8081-exec-3166])

2 Likes

Hi @berhard,

Based on the error shared, it might be caused by either of the following;

  1. Slow internet
  2. The account might not have been set up correctly
  3. Some objects might not have been correctly shared

Kindly confirm if these options are all ruled out for us to escalate this to the support team. Other members’ contribution to this issue is welcomed too.

Best,
James.

1 Like

Hi James,

We have looked into all of these issues. The internet is not an issue, the accounts are assigned to the correct search and maintenance org units and user groups with permissions to all related objects, and said objects are correctly shared.

Best,

Blake

2 Likes

Hi @berhard,

I see two different errors in the log.
One is for the trackedEntityType with uid SgDABZDT1cA, it seems it is not valid for the program. Maybe a configuration error, could you check it?

For the org units. Make sure all capture organisation units are selected as well in the search tree.

If that does not help you, you could send us some user credentials for your test environment and we will try to find what is going on.

2 Likes

Thank you for coming through @Pablo!

Best,
James.

1 Like

Hi @Pablo,

Thanks for following up on this. the org units are all correct and the tracked entity type referenced above isn’t linked to this project in any way, it’s actually linked to another project (we’re using AOCs to clarify to which projects data should be assigned). I am happy to five you some user credentials for our test environment. Do you have an email I can send them to ?

2 Likes

Here is my email:

ppajuelo@quadram.mobi

Please, in addition to the credentials, could you also share your tablet model, android version and app version?
Thank you!

2 Likes

Hi @berhard!

I found where the problem is. There are some corrupted metadata (in the categories).
For example, the category with uid HCuwQJqFNb5 has these as categoryOptions:

<categoryOptions>
    <categoryOption id="OalC53qJ1lP">
    <categoryOption id="OalC53qJ1lP">
    <categoryOption id="JqncRuULiEV">
<categoryOptions>

As you can see it has a duplicate. The web interface is not showing it, but the API is. I’ll send you a list with the categories uids which are corrupted.

2 Likes