platform
platform copied to clipboard
Polymer version should be defined in vaadin_versions.json
Describe the bug
Using a V21 or V22 Flow application and adding https://vaadin.com/directory/component/pdf-browser to it (version 3.1.0) then the resulting application will show only a white screen with the blue Vaadin loading bar. Chrome Console reveals that two versions of Polymer have just clashed and the application will not come up.
Expected-behavior
Vaadin should pin the polymer version so that sub-dependencies in Add-Ons cannot lead to clashes.
Reproduction
Using a V21 or V22 Flow application and adding https://vaadin.com/directory/component/pdf-browser to it (version 3.1.0) then the resulting application will show only a white screen with the blue Vaadin loading bar.
Use the starter application, add a PdfBrowserViewer viewer = new PdfBrowserViewer(); line in the MainView.
System Info
macOS latest, Vaadin 21.0.8/22.0.1, Chrome + Firefox.
Thanks for using Vaadin Platform, we appreciate your help and are going to take care of this as soon as possible.
We do not hardcode Polymer version in platform internationally to avoid having two versions installed. Flow does pin version to 3.2.0 because there has been an internal Shadow DOM usage change in 3.3.0 that affected some Flow features.
The only proper way to fix this would be to update Flow to enforce using npm 8.3.0 and especially "overrides" feature, see https://github.com/vaadin/flow/issues/9986#issuecomment-993244917
Wouldn't the proper fix be to use the latest Polymer version Flow and fix whatever issues there are preventing it today?
In any case I think detecting/circumventing the problem at compile-time would be easier than letting users find out what went wrong when they face a white screen instead of their application.