Login page error "Invalid JSON response from server"

Hi, all. I try to create authorization page https://vaadin.com/tutorials/securing-your-app-with-spring-security/setting-up-spring-security
LoginForm is show And i get error message “Invalid JSON response from server” when open page Localhost:8080. What wrong? I did all as described in tutorial.

LoginForm component = new LoginForm();
@Route(value = “”)
public class MainView extends VerticalLayout {
private static final long serialVersionUID = 1L;
public MainView() {

    LoginForm component = new LoginForm();
    
	component.addLoginListener(e -> {
        boolean isAuthenticated = authenticate(e);
        if (isAuthenticated) {
            UI.getCurrent().navigate("app");
        } else {
            component.setError(true);
        }
        component.setEnabled(true);
    });
    setDefaultHorizontalComponentAlignment(Alignment.CENTER);

    add(component);
}

private boolean authenticate(AbstractLogin.LoginEvent e) {
    Notification.show(e.getUsername() + " = " + e.getPassword());
    return true;
}

}
"
17948154.jpg

Dear all,
I Have the exact same problem.
Any idea ?
Thanks a lot.

Same problem, only with chrome.

We have the same Problem in our application with Vaadin 8.9.0.
Exists any solution / bugs on side of Vaadin?

same problem for me too, with vaadin 14

Karsten Lehmann:
We have the same Problem in our application with Vaadin 8.9.0.
Exists any solution / bugs on side of Vaadin?

We could fix the error for us. On our side the error depends on the existing NGINX proxy of our environment. At the proxy we increased two timeouts (proxy_read_timeout & proxy_send_timeout) to 120 seconds. After that the error vanished. Perhaps this information is helpful.

I resolved the problem in our application with this solution :

https://github.com/vaadin/flow/issues/4212