Issue with User Editing and User-Extended-App in DHIS2 (Version 2.38.2)

Dear Community,

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 in advance for your support!

It looks like a server error. Sharing the related log file would be very helpful (without disclosing sensitive info, of course)

@Waheed as part of the things to look at, include the Privileges given to the editing User; to see that they have the proper rights to edit users.

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.

Thank you once again for your swift assistance.

Thanks for sharing the update. Thank you @mkannan , @dmaritim , and @tuzoengelbert for helping out.

@Waheed, I hope you resolve this soon. Please remember to share more details about what was going on and how it’s resolved.

Thanks!

Thank you, Mr. @Gassim I will keep you updated once I receive the feedback or the database for more investigations.
Thanks

@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

Hello James,

Compliments of the season to you.

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.

Thanks

Hi @Cnote and @Okafor_Arinze !

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:

  1. What is the version of the DHIS2 instance that you are using?
  2. 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
  3. After the above two points, it might be necessary to look into the logs, see detailed instruction here.

Thanks!

@Gassim thanks for you response and below is the response to the question.

  1. my dhis version is 2.42.0
  2. this attached screenshot reproduce the error
  3. 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**

@Gassim thanks for you response and below is the response to the question.

  1. my dhis version is 2.42.0
  2. this attached screenshot reproduce the error

  1. 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**

Hi @Cnote

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.

Thank you!

Hello @Gassim,

Thanks for your support,

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.

Thanks

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.

I will be glad to hear from your soonest.

Thanks

Hello @Gassim

I have not heard from you since my last response to you, Please can you refer me to a DHIS Developer in your community that can assist me.

Thanks

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.

Regards,

Hi @Okafor_Arinze,

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.

Regards
Elmarie

Hello @Elmarie_Claasen

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.

Thanks

Hi @Okafor_Arinze
I am glad this helped but it is a temporary fix. Ideally you should upgrade to v2.42.3 soonest.

Regarding the dataset lock exception challenge, I do not have a clear idea what could cause this. Maybe @Gassim can look into this.