Push not enabled despite annotation `@Push` added to `AppShell` in Vaadin 16
See original GitHub issueTo reproduce:
- Download and unzip this project
- Go to project folder / import project into IDE
- Run the Maven goal
jetty:run
- Browse to http://localhost:8080
AppShell
class contents:
@PWA(name = "Project Base for Vaadin", shortName = "Project Base", enableInstallPrompt = false)
@Push
public class AppShell implements AppShellConfigurator {
}
The MainView
class contains only this code:
@Route("")
public class MainView extends VerticalLayout {
@Override
protected void onAttach(AttachEvent attachEvent) {
add(new Span("pushed"));
getUI().get().push();
}
}
Erroneous behavior: The explicit UI::push
in call fails with the following:
java.lang.IllegalStateException: Push not enabled
at com.vaadin.flow.component.UI.push(UI.java:654)
at org.vaadin.example.MainView.onAttach(MainView.java:21)
at com.vaadin.flow.component.ComponentUtil.onComponentAttach(ComponentUtil.java:230)
...
Expected behavior: The explicit UI::push
call does not fail. This works in Vaadin 15 series versions, e.g., 15.0.4.
Versions:
- Vaadin 16.0.0.beta1
- Java 8
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to use Vaadin FLOW server-push with Spring Boot
You must add annotation for the "whole" application (which @Push is) to your central configuration place (which is the class implementing ...
Read more >Upgrade Guide Generator | Upgrading | Vaadin Docs
Upgrade Guide Generator · Select your Vaadin versions: · Before You Start · Vaadin 14 to 23 Upgrade Guide · Upgrade Steps |...
Read more >Index (Flow Server 4.0.0 API) - javadoc.io
A - Static variable in annotation type com.vaadin.flow.component. ... Enables push if push support is available and push has not yet been enabled....
Read more >CUBA Platform. Developer's Manual
Vaadin web applications framework. HTML / CSS / JavaScript. Java Servlets. This manual and other documentation related to the CUBA platform can be...
Read more >chameleon | Customizable honeypots for monitoring network traffic
However chameleon build file is not available. ... and move the following annotations to it: - @Push from net.cbsolution.chameleon.ui.views.AlertView.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@manolo It’s a regression between 15 and 16. I believe it is more related to
AppShellConfigurator
not used correctly to initializeUI.pushConfiguration
. Push works correctly after I enable it using the property.As reference, the workaround is to use the server side bootstrap by enabling the appropriate flag