-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
quarkus-smallrye-graphql: NPE when connecting with websocat #28190
Comments
@carueda - can you share a reproducer ? |
@phillip-kruger oh, sorry about that. Here it is: https://github.com/carueda/microprofile-graphql-quickstart
Thanks.
|
Hi @carueda I am following your instructions to recreate the issue, but I can not seem to. a few questions:
I get no error in my Quarkus log, but I get
Let me know. Thanks |
Hi @phillip-kruger, thanks for the fast replies!
https://github.com/vi/websocat is a handy tool that I sometimes use to monitor traffic in websocket-enabled applications. It is not critical at all for me, but, as already said, I entered this ticket because its use seems to be exposing an issue in Quarkus.
Yes. Interesting that in your case websocat is not even able (apparently) to hit the quarkus grapqhl endpoint. To double check my repro, I just tried it fresh on a Linux machine and with the very latest websocat version available at https://github.com/vi/websocat/releases , 1.11.0 : (note, using port 9090 here because I have one other app on 8080) When I enter the websocat command, it immediately triggers the NPE on the Quarkus side: Hope that helps clarify things. Thanks again. |
Ok, I managed to recreate the issue ! Thanks. I ran into vi/websocat#23, so when I change to use 127.0.0.1 is works. I'll look into this a.s.a.p |
Hi, @carueda , @phillip-kruger I recreated the issue as well. It seems that the problem is caused by the subprotocol of the opened websocket which is null. Hope that may help things |
Is there no way to set the subprotocol in websocat? |
Thanks @yesunch ! @phillip-kruger Good point and I should have done a bit more research. Though the output of
|
Describe the bug
NPE in
SmallRyeGraphQLOverWebSocketHandler.java
when connecting withwebsocat
. Stack trace in additional info below.Please note: My app functionality seems unaffected, but I sometimes use the handy websocat tool for some basic monitoring and I thought I'd enter this ticket in case it's actually exposing some unknown bug in Quarkus. I explored the documentation in case it could be related with some websocket protocol variation or something like that but was not able to find anything specific. It could also be a some websocat issue... in any case, there's an NPE lurking there that should probably be handled more gracefully.
Thanks!
Expected behavior
No exceptions.
Actual behavior
NPE in
SmallRyeGraphQLOverWebSocketHandler.java
How to Reproduce?
quarkus dev
websocat ws://localhost:8080/graphql
. The NPE is thrown.Output of
uname -a
orver
Darwin Kernel Version 19.6.0: Tue Jan 12 22:13:05 PST 2021; root:xnu-6153.141.16~1/RELEASE_X86_64 x86_64
Output of
java -version
openjdk version "17.0.3" 2022-04-19 OpenJDK Runtime Environment GraalVM CE 22.1.0 (build 17.0.3+7-jvmci-22.1-b06) OpenJDK 64-Bit Server VM GraalVM CE 22.1.0 (build 17.0.3+7-jvmci-22.1-b06, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
CLI 2.12.1.Final. BUT my pom.xml with 2.12.3.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Additional information
The text was updated successfully, but these errors were encountered: