I’ve changed versions from 2.1 to 2.2.0 to 2.2.1 sequentially. On version 2.2.1 in production, the session started to drop suddenly and display the login page without any apparent pattern. It doesn’t matter who logs in, whether it’s admin or another role. If the session drops, sometimes when clicking on a dataGrid, I receive the following in the log:
Caused by: java.lang.IllegalStateException: ResourceRole not found by code: ANONYMOUS
When clicking in the menu tab area, it logs out to the login page.
The build for prod is done with:
./gradlew -Pvaadin.productionMode=true bootJar
In dev mode, no errors or such behavior are observed.
In prod, the application runs in Docker and is behind nginx with SSL, so the problem might be in the nginx rules.
Everything worked correctly on version 2.1.
I am seeking advice on what to look into.
PS: I’ve noticed a feature; if on the login page I check the “remember me” checkbox, then the session either drops immediately, meaning I have to log in a second time and then it works without issues, or the login and subsequent work proceed normally.