Getting httpStatusCode 400 while accessing Tracker Capture app

While accessing the Tracker Capture app, it is showing
for long duration, while checking it in inspect and console tab it is showing below error,

{“programs”:}{“httpStatus”:“Bad Request”,“httpStatusCode”:400,“status”:“ERROR”,“message”:“Direct self-reference leading to cycle (through reference chain: org.hisp.dhis.program.Program["relatedProgram"])”}

We have fixed it by database level by executing "update program set relatedprogramid = null; " command, then it working but after 30 min or 1 hr we are facing the same issue again.

DHIS2 Version: 2.39.2

  • does someone is editing the program metadata during these 30m/1h ?
    • can you check the updated_at timestamp ?
    • perhaps there’s a bug in the maintenance or dhis2 backend that “fillin” the relatedProgram field (this seem linked to using the same tracked entity type)
1 Like

Hi @kandarpjoshi,

The error message suggest that your tracker program is in some sort of endless loop (self-reference).

Check the ‘Enrollment details’ section of your tracker program and if you have selected the ‘trackedentitytype’ in the Related program, remove it.
Screenshot from 2024-06-14 18-33-14

1 Like