Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client side meltdowns if you add a textfield and a combobox #6029

Closed
alump opened this issue Jul 5, 2019 · 6 comments
Closed

Client side meltdowns if you add a textfield and a combobox #6029

alump opened this issue Jul 5, 2019 · 6 comments

Comments

@alump
Copy link
Contributor

alump commented Jul 5, 2019

Setup:

  • MacOS 10.14.5 (18F132)
  • Intellij IDEA 2019.1.3
  • Maven 3.6.1
  • Amazon Corretto 11.0.3.7.1
  • Spring boot starter for 14 RC3

Steps:

  1. Download RC3 Spring Boot starter
  2. Import to you IDEA
  3. Add this line to MainView (after add(button);):
    add(new TextField(), new ComboBox<>());
  4. Run app with mvn spring-boot:run

Expected outcome:
I can see app with button, textfield and combobox. Browser console isn't full of errors.

Actual outcome:
Following error starts browser console:
Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "vaadin-text-field" has already been used with this registry
After this everything seams to be broken, and many of undefined errors follow.

Looks like combobox internally using textfield is causing re-registeration of textfield, while textfield itself has already caused registration?

@henrikerola
Copy link

This happened to me as well. Download a new project from https://start.vaadin.com/ and added a new view there containing add(new TextField(), new ComboBox<>());

@mehdi-vaadin mehdi-vaadin moved this from Inbox - needs triage to Product backlog in OLD Vaadin Flow ongoing work (Vaadin 10+) Jul 8, 2019
@mstahv
Copy link
Member

mstahv commented Jul 8, 2019

I tried this with servlet starter with Jetty and the whole servlet was undeployed (default servlet of jetty showed directory listing) when jetty was running.

When the "mvn jetty:run" was restarted, it worked correctly.

@mehdi-vaadin
Copy link
Contributor

We should verify whether cleaning the project and removing package*.json files and node_modules folder and recreating them will solve this issue or not.

@mehdi-vaadin mehdi-vaadin moved this from Product backlog to Iteration Backlog in OLD Vaadin Flow ongoing work (Vaadin 10+) Jul 9, 2019
@ujoni ujoni self-assigned this Jul 9, 2019
@project-bot project-bot bot moved this from Iteration Backlog to In progress in OLD Vaadin Flow ongoing work (Vaadin 10+) Jul 9, 2019
@ujoni
Copy link
Contributor

ujoni commented Jul 9, 2019

Running rm -rf package-lock.json node_modules target does indeed solve the issues. However, a more elegant solution would not go amiss.

@ujoni ujoni moved this from In progress to Iteration Backlog in OLD Vaadin Flow ongoing work (Vaadin 10+) Jul 10, 2019
@ujoni
Copy link
Contributor

ujoni commented Jul 11, 2019

This issue will likely be fixed with #6001 and #6046. They will be released with rc5 and this issue needs to be verified against the release candidate. Testing against a custom build works.

@ujoni ujoni removed their assignment Jul 15, 2019
@ujoni
Copy link
Contributor

ujoni commented Jul 16, 2019

I am unable to reproduce this issue using 14.0.0.rc5.

In addition, I am unable to reproduce the issue with starter following the steps:

  • get spring starter from vaadin.com/start
  • set Vaadin version to 14.0.0.rc3
  • remove package-lock.json, package.json, webpack.config.js, and webpack.generated.js
  • run either
    • mvn install
    • mvn spring-boot:run (and then kill process)
  • upgrade version to 14.0.0.rc4
  • add add(new TextField(), new ComboBox<>()); to MainView.java
  • run either
    • mvn spring-boot:run
    • mvn clean spring-boot:run

In theory doing that should produce a project which is in the same state as the starter which was downloaded when 14.0.0.rc3 was the latest release.

I'll close this issues. If it pops up again, we'll tackle it then.

@ujoni ujoni closed this as completed Jul 16, 2019
OLD Vaadin Flow ongoing work (Vaadin 10+) automation moved this from Iteration Backlog to Done - pending release Jul 16, 2019
@mehdi-vaadin mehdi-vaadin added this to the 2.0.4 milestone Jul 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
OLD Vaadin Flow ongoing work (Vaadin ...
  
Done - pending release
Development

No branches or pull requests

5 participants