Sync log on Android: Missing DataElement and ProgramStageSection related to ProgramRuleAction

Hi everyone,
When using the DHIS2 Android app, the sync error log tab displays several logs during data synchronization. The error log shows missing DataElement and ProgramStageSection related to ProgramRuleAction.

DHIS2 version : 2.41.1
DHIS2 Capture Android Version : 3.0.1 (Playstore Version)

Here’s the setup:

  • We have a Tracker Program with multiple stages: A, B, C, and D.
  • User X can enter data only in Stage A.
  • User Y can enter data in Stages B, C, and D.
  • There are program rules applied.

When syncing data on mobile, we get the following error log every time:

{"creationDate":"Sep 2, 2024 07:01:39","errorCode":"FK","errorComponent":"","errorDescription":"Missing DataElement TQcBYg90B5p from ProgramRuleAction AYixc64zkGN"}
{"creationDate":"Sep 2, 2024 07:01:39","errorCode":"FK","errorComponent":"","errorDescription":"Missing ProgramStageSection Dh3k9hBVIxH from ProgramRuleAction aah8YJUVQR8"}

Hi @rcpoudel,

it seems there are two programRuleActions that are configured with metadata that is not accessible to the user. This means that those programRuleActions won’t be evaluated in the device, but the data collection and the rest of programRules should work as expected. Are they working?

It is hard to suggest a solution without knowing a bit more about the configuration of the program. Maybe it is fine that those programRuleActions are not executed for that particular user. Or maybe the non-accessible metadata can be set to view-only. If you want to share more details by DM, I could help to figure out the solution.

Regards

2 Likes

Dear @vgarciabnz

Yes, the data collection and other sync processes are working perfectly. The error appears only as a warning in my approach. I just wanted to check if I missed anything in the configuration since every time I sync the data, these sync errors appear, but the collected data syncs as expected.

The programRuleActions logs are just samples; there are more than 50 in total.

In my opinion, while loading the metadata on the mobile application, the DataElement and ProgramStageSection are not being downloaded in the mobile configuration (this is because we set different DataElement and ProgramSection for different users and user groups as per the project requirements), although all the program rules are being downloaded related to that tracker program. This discrepancy causes the mentioned error to appear in the sync issue log during the execution of the program rules.

Thank you for your insights. I’ll DM you directly to provide more details and explore the best solution for this.