Open realulim opened 3 years ago
Hi @realulim, thanks for issuing this, would you please be so kind and upload/share your reproducible example with us?
Here it is: https://github.com/realulim/vaadin-reproducer I have included a Selenide test that just keeps on repeating itself (Login/Logout of Application) until the error occurs. You can follow the progress of the test by reloading build/report/extent/index.html. Sometimes it will take more than 100 iterations of the test, but most of the time the error will occur within 30 iterations. Start the test with the gradle task "uiTest".
So, are you reproducing this?
Either request
is null, or request.getAttribute(REQUEST_START_TIME_ATTRIBUTE)
is null, however neither should be null since the attribute is set in VaadinService.requestStart()
. However, one of those clearly is; my bet is on the attribute.
You can shadow VaadinService
with a project-copy of that class, and modify the requestEnd()
function to print to stdout what exactly is null. That would give us more insight on what's wrong.
Whichever of the two it is, the root cause is almost certainly a race condition, because it only happens occasionally and under load. I think there's some potential for it causing problems in hard-to-debug production setups. Seeing that the code is 8 years old, without any null-checks and under-tested, this is one for the head surgeon :)
Description of the bug / feature
When I subject Vaadin to a mild dose of load (via running a Selenium Test Suite) I am getting occasional NullPointerExceptions, which translate to the UI not responding to the user action.
While I am not sure about the underlying issue, at least the NPE should be fixed in Vaadin.
Minimal reproducible example
Put any Vaadin 14.4.* application with Spring and Spring Security under stress. The error mostly appears upon trying to login. Example: https://github.com/realulim/vaadin-reproducer
Expected behavior
A reasonable error message should be produced that gives a bit more detail on the possible cause.
Actual behavior
A NullPointerException is thrown (see attached stacktrace)
Versions: