New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPE from WebIconsRequestMatcher #18965
Comments
The problem here is that during a reload, there are requests incoming before VaadinService completes its intialization. Dispatching requests to a servlet before |
Sounds like some other issue we had before? Icons, pwa, something ? |
A simple "fix" is to initialize |
If we need a service instance to determine that a request is for a PWA icon, what other options are there than returning 401 if the request comes in before the service instance is available? |
I have no quick alternatives in mind right now. Maybe generating the icons at frontend build time and storing the paths somewhere so that the registry could read the list without waiting for VaadinService could help. But since the issue impacts only dev-mode during hot reload, I think that for the moment we can just add the null check when instantiating |
During a hot reload, there may be requests incoming before VaadinService completes its intialization. In this situation a NPE is thrown when trying to create WebIconsRequestMatcher. This change postpones the instantiation until VaadinService is available. Fixes #18965
During a hot reload, there may be requests incoming before VaadinService completes its intialization. In this situation a NPE is thrown when trying to create WebIconsRequestMatcher. This change postpones the instantiation until VaadinService is available. Fixes #18965
During a hot reload, there may be requests incoming before VaadinService completes its intialization. In this situation a NPE is thrown when trying to create WebIconsRequestMatcher. This change postpones the instantiation until VaadinService is available. Fixes #18965
During a hot reload, there may be requests incoming before VaadinService completes its intialization. In this situation a NPE is thrown when trying to create WebIconsRequestMatcher. This change postpones the instantiation until VaadinService is available. Fixes #18965
During a hot reload, there may be requests incoming before VaadinService completes its intialization. In this situation a NPE is thrown when trying to create WebIconsRequestMatcher. This change postpones the instantiation until VaadinService is available. Fixes #18965 Co-authored-by: Marco Collovati <marco@vaadin.com>
This ticket/PR has been released with Vaadin 24.4.0.alpha21 and is also targeting the upcoming stable 24.4.0 version. |
This ticket/PR has been released with Vaadin 24.3.10. |
Description of the bug
This happens if you reload / at a suitable point during startup of an application.
Once the app has fully started, this no longer reproduces.
Expected behavior
No exception
Minimal reproducible example
A new starter with authentication
Versions
The text was updated successfully, but these errors were encountered: