SORMAS-Project icon indicating copy to clipboard operation
SORMAS-Project copied to clipboard

Connection to the server is lost and an 'endless' loop of errors is displayed in the server logs when trying to save a user as 'admin+surveillance officer'

Open adinaflorea9 opened this issue 2 years ago • 1 comments

Bug Description

When trying to create a new user, or edit an existing one, and give it the user roles of admin + surveillance officer, a loop of errors is displayed in the logs and the connection to the server is lost.

Steps to Reproduce

  1. Logged in with an admin, either create a new user or edit an existing one and give it the user roles of admin+surveillance officer;
  2. Click save in the form.

Actual Behavior

In the UI, the page loads for a long time, until the notification 'Connection to the server lost' appears.

In the server logs, the system displays errors in a loop.

Expected Behavior

No errors should be thrown.

Screenshots

System Details

  • Device: Windows 10
  • SORMAS version: 1.75.0-SNAPSHOT()
  • Android version/Browser: Chrome
  • Server URL: local machine
  • User Role: admin; admin+surveillance officer

Additional Information

Server Logs admin+survoff.txt

adinaflorea9 avatar Aug 01 '22 08:08 adinaflorea9

Likely related to the User.UserListener.beforeAnyUpdate logic. It likely has to be changed to afterAnyUpdate (PostPersist, PostUpdate).

MartinWahnschaffe avatar Aug 01 '22 09:08 MartinWahnschaffe

In this bug is an other bug also fixed that I thought is connected :

  • login with a user that has Admin right
  • go to User page and add "Surveillance Officer" right
  • save the user
  • go back and remove right "Surveillance Officer"
  • save user
  • pop up view is displayed and click yes

Before It was a error that the user was already saved

Now No error is showed and the user is saved

dinua avatar Aug 11 '22 11:08 dinua

Verified ticket on the local machine using the latest version of SORMAS from the development branch - 1.75.0-SNAPSHOT(7791d91).

adinaflorea9 avatar Aug 19 '22 11:08 adinaflorea9