AbstractAppRouterLayout - Connection Lost

Hi,

I’m trying to use the AbstractAppRouterLayout in a simalar way like in the Bakery-Demo. But I get the message “Server connection lost, trying to reconnect…” everytime.

@Viewport(Constants.VIEWPORT)
@PWA(name = "...", shortName = ".,
		startPath = "",
		backgroundColor = "#227aef", themeColor = "#227aef")
public class MainView extends AbstractAppRouterLayout {

	private final VerticalLayout contentArea;

	@Override
	protected void configure(AppLayout appLayout, AppLayoutMenu menu) {
		...
	}
	
	public MainView() {
		this.contentArea = new VerticalLayout();
		this.contentArea.setPadding(false);		
		getElement().appendChild(contentArea.getElement());
	}

}
@Route(value = RouteConstants.START, layout = MainView.class)
public class LandingView extends VerticalLayout{
	
	public LandingView() {
		...
	}
}

The “Connection Lost” message appears only for the views which are annotated with “@Route(value = …, layout = MainView.class)”.
At the moment there are no other action than building the frontend, no database or webservice call…

The problem disappears if I don’t add any menu items.

Any suggestions?

Best Regards.