I am working on DHIS2 in a dev environment. When accessing the user app I am unable to edit as I am getting error. The message says: There was an error fetching this user. meanwhile when I check the devTools payload header I got the details below.
message: “Could not find acceptable representation”
I am getting the same error with the https://play.dhis2.org/ demo instance.
On a closer look the api url is http://localhost:8080/api/39/userSettings/keyUiLocale?user=admin
I thought the version should have been 38. How come it's showing 39?
Would you please try to clear the cache? Server cache from the Data Administration app → Maintenance → Clear Cache, & reload apps. Then use the Browser Cache Cleaner app (best way to make sure it’s not a browser cache issue is to access the site from a new/different browser/profile which you have not accessed before. I recommend Guest mode.
If none of the above works. Please share the steps to reproduce this on play. Thank you!
@Gassim thanks for stopping by. I tried again later and the play.dhis2.org demo site is working. But in my local environment, despite clearing the cache, I cannot still edit the user record. Meanwhile User role and user group is editable. And I am able to create new user. But when I click it the edit user button, I get the error:
http://localhost:8080/api/39/userSettings/keyUiLocale?user=admin 406
(anonymous) @ Api.js:339
Api.js:359 API request failed with status 406
Request: GET ../api/39/userSettings/keyUiLocale?user=admin
By the way I want to find out if I have to install the apps manually on my local instance. After I setup the server locally on an empty database, I found out the apps work out of the box. Do I need to install the apps manually to my instance to get the best experience?
@rithvik Actually I attempted to reverse to version 2.38.1.1 but after I launch the server again it still load the version 2.39 snapshot. It seems the version 2.38.1.1 hotfix is loading the 2.39 SNAPSHOT. I guess the stable version will be 2.38.1.
I have not raised an issue before, can you point me to a guide on that or will you please raise the issue?
In the dhis-core repo, did you checkout to patch/2.38.1.1 branch before building the custom image?
If not, then please checkout to patch/2.38.1.1 and build a new image.
Alternatively you can run “d2 cluster up 2.38.1.1” to spin up DHIS2 2.38.1.1 with an empty db.
I downloaded the zip package in the release. I step down to 2.38.1 and the user is editable. But when I use the 2.38.1.1 release I run into the error where I cannot edit the user. It was showing the error above.
I added a docker-composer configuration to the existing dhis2 docker configuration to setup custom container with a database and a Nginx proxy and use the the docker command directly.
Its working now ok. The only issue is each time I build a new image, the dhis2 docker image spin up a new database. But I will try and work around that.
@rithvik I followed your suggestion and clone the patch/2.38.1.1 version for a custom docker container. Now I am able to edit a user. The system is up and ok. But when I tried to create data element using the maintenance app I am getting error 500. I checked the devTools and see that the payload is ok. in the console it print Api.js:371 API request failed with status 500 Request: POST http://localhost:8080/api/29/dataElements
I am only able to view the tables. When I click individual row to edit or tried to add new record I get the Internal server error. Meanwhile the server is running ok.
When I open the maintenance app and check the network tab, I see error 404 in the Header with the url http://localhost:8080/api/29/userDataStore/maintenance. "httpStatusCode":404,"status":"ERROR","message":"The namespace 'maintenance' was not found."}