Dynamic loading of a web component fails with 'Error Application ROOT-2521314 already initialized'
See original GitHub issueDescription of the bug
I’ve implemented dynamic loading of a Vaadin exported web component inside a Vaadin 23.2 view, the respective commit is here: https://gitlab.com/mrts/vaadin-embedding-example-guestbook/-/commit/b091d08c1038264f25b6f2c725652297852494ce.
The custom element is loaded and registered successfully, but rendering fails with the error Application ROOT-2521314 already initialized
:
Loading custom element guest-book dynamic-webcomponent-loader.ts:37:16
registering <guest-book> using id GuestBook-0 guest-book.js:112:13
Processing time was 2ms FlowClient.js:205:19
Uncaught Error: Application ROOT-2521314 already initialized
initApplication FlowBootstrap.js:93
Expected behavior
When I open http://localhost:8080/dynamic-loader and click the Load web component button, then the web component is loaded and displayed on the page, the same way as in http://localhost:8080/basic.html.
Minimal reproducible example
See https://gitlab.com/mrts/vaadin-embedding-example-guestbook.
Run the project using mvn jetty:run
and open http://localhost:8080/dynamic-loader in the browser to test.
Versions
- Vaadin / Flow version: 23.2.9
- Java version: 11
- OS version: Ubuntu 22.04
- Browser version (if applicable): Firefox 107
- Application Server (if applicable): Jetty
Issue Analytics
- State:
- Created 10 months ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Vaadin - Bountysource
The custom element is loaded and registered successfully, but rendering fails with the error Application ROOT-2521314 already initialized :
Read more >Web Component: Dom Exception: This name has already ...
Error : A custom element with name 'slim-repeat' has already been defined. This error seems to be caused by two third-parties trying to...
Read more >ActiveX component (EmiratesID) fails to initialize - OutSystems
Hi, https://sathishv10.outsystemscloud.com/IDCard/ I'm trying to read Data from National ID card (EmiratesID) via ActiveX EIDA_ZF_ActiveX.
Read more >Dynamically Loading Components with Angular CLI
When moving from a multi-page application to a SPA, one of the problems that presents itself is the payload size upon initial load....
Read more >What happened to web components? - LogRocket Blog
Some developers say web components have already died, while others think they're the future of web development.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
With #15315 the embedding seems to work fine
The fix seems to work well. However, I see continuous web socket disconnections, but I don’t have yet understood if it is an issue with jetty version in use or if it is somehow related to the test project code