This is not (yet?) a bug report as it also could be a configuration bug but it’s very difficult to find out the cause so far.
Every time upon login it fails with a 409 when requesting trackedEntityInstances
due to the ou=
parameter being empty. The response is 409 with “At least one organisation unit must be specified”.
The user has access to (all 3 types of) Org Units, Programs are assigned to Org Units etc. - general data entry works in the GUI (Tracker Capture, Event Capture, Data Entry) but not in the Android app.
Could you share what is the source for the ou parameter when accessing TEIs in order to track back?
The /api/me … call correctly returns an array of orgunits for organisationUnits
and teiSearchOrganisationUnits
.
Entry from Nginx’s access log:
Summary
::ffff:xx.xx.xx.xx - username [15/May/2019:11:56:47 +0000] “GET /api/trackedEntityInstances?ou=&ouMode=DESCENDANTS&fields=trackedEntityInstance,created,lastUpdated,orgUnit,trackedEntityType,coordinates,featureType,deleted,relationships[trackedEntityInstanceA,trackedEntityInstanceB,relationship,relationshipName,relationshipType,created,lastUpdated,from[trackedEntityInstance[trackedEntityInstance],enrollment[enrollment],event[event]],to[trackedEntityInstance[trackedEntityInstance],enrollment[enrollment],event[event]],relative],attributes[attribute,value,created,lastUpdated],enrollments[enrollment,created,lastUpdated,orgUnit,program,enrollmentDate,incidentDate,followup,status,deleted,trackedEntityInstance,coordinate,events[event,enrollment,created,lastUpdated,status,coordinate,program,programStage,orgUnit,eventDate,completedDate,deleted,dueDate,attributeOptionCombo,dataValues[dataElement,storedBy,value,created,lastUpdated,providedElsewhere]],notes[note,value,storedBy,storedDate]],attributes[attribute,value,created,lastUpdated]&paging=true&page=10&pageSize=50&includeAllAttributes=true HTTP/1.1” 409 124 “-” “Dhis2/0.15.5-SNAPSHOT/1.2.3/Android_25” “-”
DHIS2 is on 2.31.2 f3d71fe (an upgrade to 2.31.3 did not help)
App versions tested: 1.2.1, 1.2.2, 1.2.3
Android version: 7.1