Failed to execute 'define' on 'CustomElementRegistry': the name "vaadin-overlay" has already been used with this registry

Hi,

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.

All ideas are welcome!

Kind regards,
Kristof.

mismatch between versions: normally it’s caused by add-ons

Showing us your pom might help us to identify the old / unsupported addon

1 Like

Hi,
this happened to me too. Did you find out what happened? Everything was ok with Vaadin 24.3. After upgrade to Vaadin 24.4 this error occurred.

Thx

JS

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.

JS

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.

Same issue here with lookup field .

See here for the lookup field: Vaadin 24 compatibility? · Issue #21 · vaadin-component-factory/lookup-field-flow · GitHub

Normally the version 24.0.4 should solve the issue: Lookup Field - Vaadin Add-on Directory