We are having an issue with component shadow DOMs not being loaded. When this happens, the component tag appears in the page HTML, but it isn’t styled properly and doesn’t function.
The setup to the problem is a bit complex, so bear with me as I try to explain.
We have a “core” application, which is packaged as a WAR file using the standard Vaadin Maven build process. The application contains multiple pages with @Routes, but let’s focus on two, call them A and B. Page A is the page that users land on after logging in. Page B is some other page, but the important distinction from A is that B uses the Details component, while A does not.
Page A
Page B → Details
We also have some add-on features packaged as JAR files. These add-ons also have multiple pages, and we define the Routes to them using the API instead of the @Route annotation. Let’s focus on one add-on page, call it Z, also with a dependency on the Details component.
Page Z → Details
Here’s the problem. If I log in to page A and then immediately navigate to page Z, the Details component won’t work. If, however, I log in to page A, visit page B, and then navigate to page Z, then the Details component works fine (on both B and Z).
A → Z = Details broken
A → B → A → Z = Details works
also
A → Z (Details broken) → A → B (Details works) → A → Z (Details works)
This issue only occurs in a production deployment. In our development environment everything works fine. Note also that this isn’t specific to the Details component, I’ve just chosen it as an example.
I’m guessing that there’s some sort of lazy loading of the resource bundle that isn’t working properly for pages that weren’t part of the original frontend compilation process?