-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Push work with WebSockets #63
Comments
I don't know if this is being addressed already, anyway, I created an issue to post a workaround: I see also there's an issue in Flow about upgrading to Atmosphere 2.6.5 that may solve the issue. SolutionHowever, I found a workaround for Karaf that works with the current version of Atmosphere: OSGi fragment bundleCreate and install an empty fragment bundle with following entries in the Java manifest:
I found this in some Atmosphere post but I don't remember the source. You may need to install it with a low start-level in Karaf so that it starts before the web framework. This may not be needed anymore or be fixed in current or future versions of karaf or pax web. Explicitly configure mappingPath to AtmosphereIn Vaadin 8, the above fragment was enough to make it work, however, in the current version, the following is also required: It seems Atmosphere is unable to read OSGi whiteboard servlet context path or something similar, so it fails to set the mapping path. However, you can explicitly configure it by passing a init parameter to the servlet:
|
I wonder what is different in our environment 🤔 I switched the Karaf example to use websockets just a while ago, because it works fine for me. I did the switch and tests in Vaadin 20 branch though, but I'm not aware of any changes that might affect this. Pax web or Felix Jetty as http whiteboard implementation? Would you test the master version of the Karaf example and check if you have issues there? |
I would like to be more verbose with steps to reproduce to avoid any misunderstanding. https://github.com/vaadin/vaadin-flow-karaf-example git clone [email protected]:vaadin/vaadin-flow-karaf-example.git cd vaadin-flow-karaf-example cd starter wait for artifact deployment and go to browser open page http:localhost:8181 There will be request like this: As a result:
We never said that WS are supported because:
I would say this is an issue in the Atmosphere since it has to provide May be it's fixed in the newer versions but we can't use newer Atmosphere versions out of the box. I'm not sure what we can do here about this........: WS doesn't have to be a requirement for the project so we may not require capabilities which are WS only related ( though it looks like the capability is generic Atmosphere capability). Also it seems this is not enough to make WS works... Anyway this is a know limitation and we have an issue for this : https://github.com/vaadin/flow/issues/5146 This is a duplicate , so I'm closing this. |
OK, the "steps to reproduce" mentions V19 and I've used v19 branch but it has no any Push config at all. Push is used in the |
With the proper steps to reproduce I cannot reproduce the issue: https://github.com/vaadin/vaadin-flow-karaf-example git clone [email protected]:vaadin/vaadin-flow-karaf-example.git cd vaadin-flow-karaf-example cd main-ui wait for artifact deployment and go to browser open page http:localhost:8181 There will be request like this: ws://localhost:8181/?v-r=push&v-uiId=1&v-pushId=f907ede4-a19c-46ba-80eb-58018f6c912d&X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=2.3.2.vaadin1-javascript&X-Atmosphere-Transport=websocket&X-Atmosphere-TrackMessageSize=true&Content-Type=application/json;%20charset=UTF-8&X-atmo-protocol=true So there is Push and it uses WS transport. |
Description of the bug / feature
Make Push work with WebSockets
Minimal reproducible example
Starter project and Karaf examples don't work with WebSockets Push
Expected behavior
Push (Atmosphere) should detect and install WebSockets mode correctly
Actual behavior
Atmosphere 2.4.30vaadin1 fails to initialize websockets support in OSGi karaf container
Versions:
The text was updated successfully, but these errors were encountered: