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

InvalidRouteConfigurationException is incorrectly reported #20124

Closed
MatthewVaadin opened this issue Oct 2, 2024 · 4 comments · Fixed by #20126
Closed

InvalidRouteConfigurationException is incorrectly reported #20124

MatthewVaadin opened this issue Oct 2, 2024 · 4 comments · Fixed by #20126

Comments

@MatthewVaadin
Copy link
Contributor

Description of the bug

When I start the application, I receive the following error during initialization:

java.lang.IllegalStateException: com.vaadin.flow.server.InvalidRouteConfigurationException: 'com.vaadin.controlcenter.idm.view.group.GroupCreateView' declares '@Route' and '@RouteAlias' with the same path 'new'

In the view, it uses @Route and @RouteAlias with the same value (new), however they use different layouts that have different path prefixes.

GroupCreateView:

@Route(layout = GroupGridLayout.class, value = "new")
@RouteAlias(layout = SettingsGroupGridLayout.class, value = "new")

The two paths should be:

  • for @route ➡️ app/{appId}/idm/groups/new
  • for @RouteAlias ➡️ settings/idm/groups/new

This has been caused by the following fix: #19977

Expected behavior

The application should start normally

Minimal reproducible example

Will add tomorrow if needed. See https://github.com/vaadin/control-center

Versions

  • Vaadin / Flow version: 24.5.0.beta3
@mcollovati mcollovati moved this to 🔖 High Priority (P1) in Vaadin Flow bugs & maintenance (Vaadin 10+) Oct 2, 2024
@mcollovati mcollovati moved this to 🔎Iteration reviews in Vaadin Flow ongoing work (Vaadin 10+) Oct 2, 2024
@mcollovati mcollovati self-assigned this Oct 2, 2024
@github-project-automation github-project-automation bot moved this from 🔖 High Priority (P1) to ✅ Closed in Vaadin Flow bugs & maintenance (Vaadin 10+) Oct 3, 2024
@github-project-automation github-project-automation bot moved this from 🔎Iteration reviews to Done in Vaadin Flow ongoing work (Vaadin 10+) Oct 3, 2024
vaadin-bot added a commit that referenced this issue Oct 3, 2024
…20126) (CP: 23.5) (#20129)

* fix: consider layout prefixes when checking for route and alias paths (#20126)

Fixes #20124

* fix test

---------

Co-authored-by: Marco Collovati <[email protected]>
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.5.0.beta5 and is also targeting the upcoming stable 24.5.0 version.

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.3.19.

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.4.14.

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 23.5.8.

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