I’m in the process of upgrading an application from Vaadin 14 to 24.
I think I’m almost through all issues, except for this one.
The application doesn’t load the frontend and in the browser I see the following console error:
Uncaught (in promise) DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "vaadin-overlay" has already been used with this registry
at window.customElements.define (http://localhost:8080/login:4:829)
at VAADIN/build/generated-flow-imports-B9TluLxi.js (http://localhost:8080/VAADIN/build/generated-flow-imports-B9TluLxi.js:162086:20)
at __require (http://localhost:8080/VAADIN/build/generated-flow-imports-B9TluLxi.js:3:50)
at http://localhost:8080/VAADIN/build/generated-flow-imports-B9TluLxi.js:184813:16
I tried cleaning up dependencies and checked which ones support version 24, but this error … I don’t understand where it could be coming from.
Same advice as what Christian said above: it’s likely and add-on. If you share the list of add-on components you are using, we might be able to figure out which one is it.
Hi all,
I found out the reason why it didn’t work.
For me it was vcs-lookup-field (Lookup field add-on). This addon says it’s compatible with v24, but internally it uses v23 components. I removed it (we didn’t need it anyway) and now everything works.
I went through all dependencies and indeed there were a couple.
The Card component from Appreciated and the ConfirmDialog from org.claspina.
I updated all of them to the latest, and then replaced certain implementations (like the confirm dialog) and removed others.
I think there were multiple issues, so it was a bit hard to identify exactly which one gave issues.
Thanks all for pointing me in the right direction.