Synchronization does not work after deleting a new event on Android [FIXED]

Hi all,

Users are unable to sync data. There is no error showing. After clicking send, it shows syncing data, but it goes back to the same message below again and again, so nothing is pushed to the server. It happens with granular and full data sync. The users are stuck.

Android version: 3.1.0.1

DHIS 2 Version: 2.41.2

Thanks

Hi @fernando ,
We also face this issue randomly. Rebooting of a device usually helps. If not, you may also try to clear all local data or reinstall the program. But be carefull! In this case you will loose all unsynced data.

1 Like

Hi @m.siusko,

Thanks for your help. What does reinstalling the program mean?
I will tell the users to reboot their devices. They have already entered much data that is unsynced due to the problem, so clearing the local data will make them lose data and reenter it again.

1 Like

I mean that sometimes you need to uninstall and then install your Android App again.

P.S. I just found that this issue occurs when you try to create an event and then immediately go back without making any changes.

Last time I just created another event and that also solved the problem.

1 Like

Hi @m.siusko,

Reinstalling the android app will remove unsynced data?

Could please explain the part below in another way?

1 Like
  1. Yes
  2. Press “+” and then Enter event. Then do nothing and press “back errow”. Choose “Discard any changes”. Try to sync. This algorythm replicates the error in 100% times for me.
1 Like

Hi @m.siusko,

We have tried all possibilities: reinstall Android app, clear local data, reboot the device and press+ to create event (do nothing and discard the changes), but the problem still continues.

Thanks

1 Like

Hi @fernando, I am sorry for the issues you are encountering, could you give us some more information on what kind of configuration you are using? is it a a tracker program with events? do you have any program rules enabled?
Also if you had a testing server in which we could replicate this.
This will help us replicate and troubleshoot the issue. It certainly should be showing a more relevant error message.

1 Like

@fernando , @Xavi and others,
With the latest version 3.1.1.1 of the program, this issue occurs only if you follow these steps:

  1. Create an event in the app.
  2. Delete the event without syncing it.
  3. Attempt to sync.

In this scenario, the app will become stuck, and further synchronization will not be possible.
Then the only way to solve the issue is to delete local data or reinstall the App. It is not very common scenario. But it is annoying for users

1 Like

Hi @m.siusko,

Thanks for sharing the steps. We have updated the android capture to 3.1.1.1.
Again we are facing the same problem below:

This time when we update a completed event and try to sync the changes, nothing happens. By clicking on send, it processes and stops, going back to the sync message box. it is a headache.

Thanks again

1 Like

Hi

Thanks @m.siusko for your suggestions… @fernando , would it be possible to provide more information:

@Xavi

Please share details about the configuration. And are they the same steps mentioned by @m.siusko ?

And do you have a testing server that you could share with the Android team to reproduce the issue?

Thanks!

Thanks all for your inputs,

I was able to reproduce the issue following the steps provided by @m.siusko, I have just created this Jira ticket to follow it up.

2 Likes

Hi everyone,

Thanks for bringing this up and for the detailed investigation!

We’ve been looking into the issue and believe we’ve identified a possible root cause. It seems that if a user creates and then deletes an event before it has ever been synced with the server—or discards changes on a newly created event—the sync status of the enrollment and the associated TEI does not update correctly. Instead of switching to “synced”, they remain in a “pending to sync” state.

When you later try to sync the TEI or enrollment, the system finds nothing to actually sync (since the event was deleted), and as a result, no sync is performed and the post-sync status update is not triggered. This causes the enrollment and TEI to appear stuck in a syncing loop.

We’re currently working on a fix for this behavior. You can follow the progress through this JIRA ticket that Victor shared:
:backhand_index_pointing_right: ANDROSDK-2067

The good news is that this seems to be a visual issue only—data should still sync correctly otherwise. However, if you believe this is causing actual data loss or sync failures, please let us know with as much detail as possible.

In the meantime, here’s a simple workaround you can try:

  1. Go into the enrollment dashboard where the event was deleted.
  2. Open any other event for this enrollment and change a value temporarily, then set it back to the original value (this will mark the event as “needing sync”).
  3. Click “Sync TEI” or “Sync Enrollment” again.

This should force the sync process to trigger properly and update the status of the TEI and enrollment.

Hope this helps, and thanks again for your patience and collaboration!

Best regards,
Marcos

2 Likes

Hi

Checking the linked issue, the bug is fixed on the 1.12.1 apk. Thanks @here! <3