vaadin / flow

Vaadin Flow is a Java framework binding Vaadin web components to Java. This is part of Vaadin 10+.
Apache License 2.0
603 stars 165 forks source link

Two times invocation of the com.vaadin.flow.router.HasUrlParameter#setParameter method in Vaadin Flow 24.4.0.rc1 #19540

Open alexanoid opened 3 months ago

alexanoid commented 3 months ago

Description of the bug

This issue occurred once before, then you fixed it, and now it has returned in Vaadin Flow 24.4.0.rc1. When accessing the page, the method сom.vaadin.flow.router.HasUrlParameter#setParameter is called twice.

I also use vaadin.eagerServerLoad=true

In version 24.4.0.beta5 everything works fine, so apparently something has changed in Vaadin Flow 24.4.0.rc1.

Expected behavior

method com.vaadin.flow.router.HasUrlParameter#setParameter is called only one time

Minimal reproducible example

n/a

Versions

mshabarov commented 3 months ago

Has the same root cause (extra history navigation event) as in https://github.com/vaadin/flow/issues/19525 and https://github.com/vaadin/flow/issues/19494

mcollovati commented 3 months ago

I was unable to reproduce with a simple view implementing HasUrlParameter in 24.4.0.rc1. I tried it with and without vaadin.eagerServerLoad setting, but the setParameter is invoked once.

Artur- commented 3 months ago

It does not happen on initial load but only on navigation, and #19539 fixes it

alexanoid commented 3 months ago

In which version will this fix be released? I tried 24.4.0.rc2 but it still doesn't work.

alexanoid commented 3 months ago

@Artur- I tried with 24.4.1, the same problem

Artur- commented 3 months ago

Then it sounds like a different problem that needs a test case

alexanoid commented 3 months ago

@Artur Would it be sufficient to show you this problem on a real website online?

mshabarov commented 3 months ago

@alexanoid this may give us some insights about use case, but I'd say it's not sufficient to reliably fix the issue, we need a reproducible example.

alexanoid commented 2 months ago

@mshabarov It looks like the cause of the issue is described here: https://github.com/vaadin/flow/issues/19613 Thi is replaceState

caalador commented 3 weeks ago

@alexanoid can you test with Flow 24.4.6 (It will be in Vaadin 24.4.9 when it comes out) that has the fix for 19613.

alexanoid commented 3 weeks ago

@caalador I tried the new version, and the issue disappeared for most pages, but it still reproduces on one of them. I don't quite understand what's special about it; it seems just like the others. I have rolled back to the old version again. Also, the problem from this issue has returned: https://github.com/vaadin/flow/issues/18736

alexanoid commented 2 weeks ago

@caalador I added new issues: https://github.com/vaadin/flow/issues/19822 and https://github.com/vaadin/flow/issues/19823