Comments (11)
I'm not seeing anything in https://github.com/quarkusio/quarkus/commits/main/extensions/websockets that might've caused it. @mkouba @cescoffier, please comment if you have some ideas
from quarkus.
@paolo-cutilli-eudata Hm, I've tried to connect to the endpoint using new WebSocket("ws://" + location.host + "/ws", "custom-protocol")
in JS and it seems to work - I can even see the log message Socket opened: abcdef...
in the console. In fact, the protocols paremeter seems to be ignored completely. I don't know if that's expected though, in the sense that the server can fall back to the default protocol if no matching protocol is found.
By the way, I don't think that @RequestScoped
is a good match for a jakarta.websocket
server endpoint. The spec does not say anything about CDI contexts so I'd say that @ApplicationScoped
/@Dependent
would be a "safer" choice.
from quarkus.
@mkouba thank you for the suggestion about the @RequestScoped
annotation.
regarding the WebSocket, i tried your approach in JS directly from the /q/dev page and i cannot open the WebSocket.
i can see the open log message too, but immediatly followed by the close message
Socket opened: pBnZ5eTS0EYXXBFK-KunRgXVdcMgFoMt_-rdsF-7
Socket closed: pBnZ5eTS0EYXXBFK-KunRgXVdcMgFoMt_-rdsF-7 -
and the following error
is there additional information that i can give you so that you can reproduce the problem?
from quarkus.
Hm, I do not observe this behavior 🤷.
is there additional information that i can give you so that you can reproduce the problem?
I can't think of anything.
from quarkus.
@mkouba I gathered some other interesting information. The same test described above works in Firefox.
From Chrome it does not work. I tried Postman WebSocket also and it does not work from there. I have Postman installed as a snap package on Ubuntu that i think it's based on electron/chromum engine. Do you think that this can be useful to circumscribe the problem?
from quarkus.
@mkouba I gathered some other interesting information. The same test described above works in Firefox. From Chrome it does not work. I tried Postman WebSocket also and it does not work from there. I have Postman installed as a snap package on Ubuntu that i think it's based on electron/chromum engine. Do you think that this can be useful to circumscribe the problem?
It might be related. On the other hand, I've tried with Chromium (Version 122.0.6261.94 (Official Build) snap (64-bit)) and it worked just fine.
from quarkus.
@mkouba I gathered some other interesting information. The same test described above works in Firefox. From Chrome it does not work. I tried Postman WebSocket also and it does not work from there. I have Postman installed as a snap package on Ubuntu that i think it's based on electron/chromum engine. Do you think that this can be useful to circumscribe the problem?
It might be related. On the other hand, I've tried with Chromium (Version 122.0.6261.94 (Official Build) snap (64-bit)) and it worked just fine.
Same configuration - Chromium Version 122.0.6261.94 (Official Build) snap (64-bit) - throws this error
from quarkus.
@sberyozkin Could you pls run this ^ test too?
from quarkus.
We have the exact same issue after upgrading to Quarkus 3.8.1. We downgraded to 3.6.9 to get it working. The upgrade to 3.7.0/3.7.1 seems to be the one that breaks it.
Same errors and behaviour. Our custom protocol is called differently but the issue seems to be the same. @OnOpen
is called seemingly successful and immediately afterwards @OnClose
is called. The client (Postman) reports "Error: Server sent no subprotocol".
We've integrated a ServerEndpointConfig.Configurator
to inspect the request and response objects while handshake is happening but they seem to be ok. They contain the exact same headers in the working and in the broken version of Quarkus. When @OnClose
is called the reported CloseReason
is Going Away (1001).
from quarkus.
It is likely due to:
from quarkus.
Confirmed - See quarkusio/quarkus-http#143.
from quarkus.
Related Issues (20)
- Quarkus is not able to determine trust store type and requires to configure file type property now HOT 12
- WebSockets Next: make it possible to write a ping frame to the connection
- WebSockets Next: rename WebSocketServerConnection to WebSocketConnection HOT 1
- Custom Exception in SecurityIdentityAugmentor HOT 13
- Add the ability to ask for devservices to use the shared network HOT 30
- WebSockets Next: add test for filtering connected clients while broadcasting
- Native quarkus-amazon-lambda-http -- runtime provided is no longer supported HOT 1
- Prevent reordering of env in kubernetes deployment HOT 3
- Unable to produce multiple synthetic beans of same type having different identifiers HOT 2
- @MessageBundle with custom keys does not work properly HOT 3
- Deployment of new version of application with OpenShift extension fails with `LabelSelectorRequirement(nil)}: field is immutable` HOT 5
- WebSockets Next: detect incorrect path parameter usage
- AudioSystem.getMixerInfo return empty array when running desktop application with quarkus framework in JVM Mode with Quarkus.run method HOT 6
- Migrate OIDC-based extensions from config classes to `@ConfigMapping` HOT 14
- WebSockets Next: investigate error handling HOT 20
- CORS issues when running Dev UI from Openshift Dev Spaces HOT 2
- Datasource: devservice is started even if shouldn't HOT 11
- quarkus-elasticsearch-java-client extension raises exception on DELETE request HOT 3
- Qute is not adding the right NativeImageResourceBuildItem when using a custom template root HOT 9
- Update partial extension names to include full extension names HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quarkus.