We are currently facing an issue in DHIS2 where we are unable to edit user details. When attempting to update a user, we encounter the following error message:
“Error updating user: An unknown error occurred - (500)”
This error is preventing us from making any updates to user accounts. We are using DHIS2 version 2.38.2. Additionally, we have attempted to use the User-Extended-App, but it is also not functioning as expected and only returns an error.
Has anyone else experienced a similar issue, or does anyone have recommendations for troubleshooting or resolving this? Any guidance or insights would be greatly appreciated.
Thank you, Mr. @dmaritim and Mr. @mkannan, for your prompt response.
Unfortunately, I am unable to access the log files as I do not have backend access to the server. It appears that all user privileges are correctly configured, and the issue seems to be related to server-side errors (500). I have already reached out to my colleague, @tuzoengelbert, to review the logs or share them with me, and he has assured me that he will do so.
@Waheed please i am currently experiencing same issues when my users are unable to edit and changes, please can you guide on the step you took to resolve this same issues previously, because i see you have similar challenge in the past, i dont mind sharing my log error if required. @Gassim please can you assist as well
Please I need your support, I was going through Dhis community forum and I noticed you have had similar challenges to what we are currently experiencing with our DHIS, " Error updating user: Answered unknown error occurred - 500" is the exact error we are getting.
Please can you walk me through how you were able to navigate past this problem, I will be glad to here from you.
Sorry to hear that you’re facing an issue with updating user info. In order to be able to assist you, please provide more information:
What is the version of the DHIS2 instance that you are using?
What are the steps to reproduce this issue? If you could share just the step by step actions that lead to seeing this error, it will be helpful to debug on play.dhis2.org
see the below error section from from the catalina log.
java.lang.NullPointerException: Cannot invoke “org.hisp.dhis.user.User.getPasswordLastUpdated()” because “user” is null
** at org.hisp.dhis.user.DefaultUserService.userNonExpired(DefaultUserService.java:674) ~[dhis-service-core-2.42.0**
see the below error section from from the catalina log.
java.lang.NullPointerException: Cannot invoke “org.hisp.dhis.user.User.getPasswordLastUpdated()” because “user” is null
** at org.hisp.dhis.user.DefaultUserService.userNonExpired(DefaultUserService.java:674) ~[dhis-service-core-2.42.0**
It appears that User Extended app doesn’t work in version 2.42 by @eyeseetea. The latest version it’s compatible with is version 2.41:
However, I also see from your screenshot above that you are using the Users app, but I’m not able to reproduce this issue on play in app and instance version { "app_name": "Users", "app_version": "100.11.0" "dhis2_version": "2.42.3.1" } .
The screenshot shows that you are creating a new user using the Users app, but it’s not showing the input that’s causing this error. It might help more if you could show an example screenshot with all the fields as well as the DevTools (F12 → Network tab & Console logs). Please try to test this again using your browser’s Guest/private mode.
From the observation, no particular input is throwing the error, the error appear while trying to save the input, attached is the video of the input from the attached link. DHIS error.pptx - Google Slides.
I dont know if it will be possible to have a brief 5min online demo/meeting to enable me walk you through the background of this problem.
Hello @Gassim, and thank you for looking into this.
You are correct, the currently available version of the User Extended app is compatible up to 2.41. We are currently working on a version compatible with 2.42, which we expect to release in the coming days.
Once it is available, we will post an announcement. Thanks again for the follow up!
Hello @eyeseetea thanks for providing insight to this issue, please do you have any idea on how i can resolve the issue with user management, the superuser account cant make any changes to user profiles like changing of password or updating user profile or creating a new user.
Also, all period are opened for data entry even after setting lock exception to prevent data entry within a specific period. attached is the exact error we get when we try creating a new user.
Thank you very much, Arinze, for your message.
Regarding the User App, we’ll let @Gassim respond, as we understand this is something that affects the DHIS2 core. However, once we release the User-Extended App compatible with v42, if the issue is still happening, we’ll be happy to help by gathering more information and trying to understand what might be going on.
I only see this now but note there was a bug on earlier versions of 2.42 where you cannot create or update user passwords. The issue is related to the password expiry setting in DHIS. There was a bug where a user cannot be created or the account cannot be updated (I think it is if the user has never logged in yet). The bug is already fixed for the next release 2.42.3 but in the meantime you can overcome this by turning password expiry to NEVER for the meantime or setting it and reverting back when you want to create or update users.
Thank you so so much, the user management issue has been resolved, i went to system setting - Access and the changed “Require user account change“ from 6month to NEVER and the issue was resolved.
Please i have another serious challenge, after the migration to version 2.42.0, i noticed that all my datasets are automatically open for data entry despite the fact that i have lock exception set on all the dateset to prevent data entry, Now all dataset and period are opened by default for data entry, even after implementing the lock exceptions yet the data set still remain open, even data entered in 2019 are now opened and can edit by data entry user.
Please i will be glad if you could assist with useful guide on how to resolve this challenge.