vaadin / flow

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

[PiT 24.5] com.vaadin.flow.router.NotFoundException: No layout for client path '' #19956

Closed ZheSun88 closed 1 week ago

ZheSun88 commented 1 week ago

Description of the bug

when start a app using 24.5.0.alpha17, i saw this error in the build log and got a blank app

this error only happens with the latest alpha.. not in previous ones

com.vaadin.flow.router.NotFoundException: No layout for client path ''
        at com.vaadin.flow.router.internal.DefaultRouteResolver.resolve(DefaultRouteResolver.java:58) ~[flow-server-24.5.0.alpha20.jar:24.5.0.alpha20]
        at com.vaadin.flow.router.Router.resolveNavigationTarget(Router.java:120) ~[flow-server-24.5.0.alpha20.jar:24.5.0.alpha20]
        at com.vaadin.flow.component.UI.renderViewForRoute(UI.java:2009) ~[flow-server-24.5.0.alpha20.jar:24.5.0.alpha20]
        at com.vaadin.flow.component.UI.browserNavigate(UI.java:1877) ~[flow-server-24.5.0.alpha20.jar:24.5.0.alpha20]
        at com.vaadin.flow.component.ComponentEventBus.fireEventForListener(ComponentEventBus.java:239) ~[flow-server-24.5.0.alpha20.jar:24.5.0.alpha20]
        at com.vaadin.flow.component.ComponentEventBus.handleDomEvent(ComponentEventBus.java:488) ~[flow-server-24.5.0.alpha20.jar:24.5.0.alpha20]
        at com.vaadin.flow.component.ComponentEventBus.lambda$addDomTrigger$dd1b7957$1(ComponentEventBus.java:298) ~[flow-server-24.5.0.alpha20.jar:24.5.0.alpha20]
        at com.vaadin.flow.internal.nodefeature.ElementListenerMap.lambda$fireEvent$2(ElementListenerMap.java:475) ~[flow-server-24.5.0.alpha20.jar:24.5.0.alpha20]
        at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) ~[na:na]

Expected behavior

the app works

Minimal reproducible example

curl -s -f 'https://start.vaadin.com/dl?&preset=react-crm-tutorial&projectName=react-crm-tutorial' -o react-crm-tutorial.zip
unzip react-crm-tutorial.zip
cd react-crm-tutorial
perl -0777 -pi -e 's|(<vaadin.version>)([^\s]+)(</vaadin.version>)|${1}24.5.0.alpha17${3}|g' pom.xml
perl -pi -e 's|(\s*)(</properties>)|$1$2\n$1<repositories><repository><id>v</id><url>https://maven.vaadin.com/vaadin-prereleases</url></repository></repositories>|' pom.xml
perl -pi -e 's|(\s*)(</properties>)|$1$2\n$1<pluginRepositories><pluginRepository><id>v</id><url>https://maven.vaadin.com/vaadin-prereleases</url></pluginRepository></pluginRepositories>|' pom.xml
perl -pi -e 's|<java.version>21</java.version>|<java.version>17</java.version>|' pom.xml
./mvnw

Versions

mshabarov commented 1 week ago

The same project gives me "Could not navigate to ''" for older alphas and even for 24.4.x.