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

With vaadin-core-14.9.x ServerInfo#fetchVaadinVersion only checks for "vaadin-versions.json" causing extra logging and no platform version in DevModeGizmo #15236

Closed
lmorocz opened this issue Nov 22, 2022 · 2 comments

Comments

@lmorocz
Copy link

lmorocz commented Nov 22, 2022

Description of the bug

Since #13749 there are two separate versions.json files for vaadin-core (vaadin-core-versions.json) and vaadin (vaadin-versions.json) maven artifacts.

Since v14.9.0 there is a com.vaadin.flow.internal.ServerInfo class with a fetchVaadinVersion method which in DEV mode tries to obtain the Vaadin platform version from vaadin-versions.json, but if you opt for the vaadin-core maven dependency then there is no such file, only a vaadin-core-versions.json in the vaadin-core module.

Because of this there is no platform version in DevModeGizmo and every time a new UI is created the Unable to determine version information. No vaadin_versions.json found INFO message appears with the com.vaadin.flow.internal.ServerInfo logger.

Expected behavior

In DEV mode with vaadin-core 14.9.2+ dependency there shouldn't be Unable to determine version information. No vaadin_versions.json found INFO message for com.vaadin.flow.internal.ServerInfo logger, and there should be a platform version in DevModeGizmo.

Minimal reproducible example

  1. Download any (Spring Boot or Plain Java) Vaadin v14.9.1 flow starter package from https://vaadin.com/hello-world-starters (like https://github.com/vaadin/skeleton-starter-flow-spring/archive/v14.zip or https://github.com/vaadin/skeleton-starter-flow/archive/v14.zip).
  2. Unzip, in pom.xml search for:
    <dependencies>
        <dependency>
            <groupId>com.vaadin</groupId>
            <!-- Replace artifactId with vaadin-core to use only free components -->
            <artifactId>vaadin</artifactId>

modify the vaadin artifactId to vaadin-core

    <dependencies>
        <dependency>
            <groupId>com.vaadin</groupId>
            <!-- Replace artifactId with vaadin-core to use only free components -->
            <artifactId>vaadin-core</artifactId>
  1. Compile and start the app with mvn
  2. Load http://localhost:8080 on any browser and check the logs for messages like this:
2022-11-22 10:54:25.887  INFO 11912 --- [nio-8080-exec-3] com.vaadin.flow.internal.ServerInfo      : Unable to determine version information. No vaadin_versions.json found

Workaround

Use this configuration in your vaadin-core based Spring Boot application.properties to start without the DevModeGizmo and the new License Checker:

vaadin.devmode.liveReload.enabled=false
vaadin.oldLicenseChecker=true

Versions

  • Vaadin / Flow version: 14.9.1
  • Java version: 11 (not relevant)
  • OS version: Windows 10 Pro x64 (not relevant)
  • Browser version (if applicable): Chrome 107.0.5304.107 (official) (64 bit) (not relevant)
  • Application Server (if applicable): Tomcat (not relevant)
  • IDE (if applicable): IDEA (not relevant)
caalador added a commit that referenced this issue Nov 23, 2022
Use vaadin-core-versions instead of
vaadin-versions as core-versions is also available
when using the full vaadin dependency

Fixes #15236
caalador added a commit that referenced this issue Nov 25, 2022
Use vaadin-core-versions instead of
vaadin-versions as core-versions is also available
when using the full vaadin dependency

Fixes #15236
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 14.9.2.

@lmorocz lmorocz closed this as completed Dec 2, 2022
@lmorocz
Copy link
Author

lmorocz commented Dec 2, 2022

Thanks for the quick fix @caalador!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants