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

Push connection does not consider context path when opened in a route with nested wildcard params #8968

Closed
mperktold opened this issue Sep 8, 2020 · 3 comments · Fixed by #9040
Assignees
Labels
BFP Bugfix priority, also known as Warranty bug Impact: High push Severity: Major

Comments

@mperktold
Copy link

mperktold commented Sep 8, 2020

Description of the bug

I have configured Vaadin to be served from a context path /vaadin/*.
Also I have a route about that takes a @WildcardParameter.

When I directly open the app at a nested wildcard parameter, e.g. /vaadin/about/a/b, the client tries to establish the push connection at / instead of /vaadin and therefore fails.

When you enter the app at other routes, like /vaadin, /vaadin/about or even /vaadin/about/a, everything works fine.
Then you can even navigate navigate to /vaadin/about/a/b via the router, and it still works.

I observed this problem when upgrading from Vaadin 14.3.0 to 17.0.0.

Minimal reproducible example

I created a repository that reproduces the problem: vaadin-pushproblems

Run the project, either using the Jetty Maven plugin via mvn jetty:run or using embedded Jetty server by executing the Main class.
Open the browser's DevTools to observe what's happening.
Open localhost:8080/vaadin/about/a/b.

Expected behavior

The push connection should be established correctly regardless of where the user enters the app.

Actual behavior

The push connection is tried to be established at / instead of /vaadin and therefore fails.

Versions:

- Vaadin / Flow version: 17.0.0
- Java version: 11.0.8
- OS version: Windows 10 64 bit
@joheriks
Copy link
Contributor

joheriks commented Sep 21, 2020

Thank you @mperktold for the detailed bug description and example. This is indeed a regression from introduced with the new bootstrapping handlers in V17 (due to shared logic the problem also manifests even without using @Push, in that the live reload on frontend changes wouldn't work on views with parameters containing slashes).

OLD Vaadin Flow bugs & maintenance (Vaadin 10+) automation moved this from WIP to Closed Sep 22, 2020
@mperktold
Copy link
Author

You're welcome @joheriks, thanks for taking care of this.

I wanted to verify that this works now as expected, but I'm not sure which version contains the fix.
With 17.0.4, it works in the reproducer but not in our actual project, which is odd.

Any idea why this could be the case?

@joheriks
Copy link
Contributor

joheriks commented Oct 1, 2020

@mperktold The change did not make it into the latest Vaadin 17 release (Flow 4.0.2), so it shouldn't work with 17.0.4. Should be available in next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BFP Bugfix priority, also known as Warranty bug Impact: High push Severity: Major
3 participants