Skip to content
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

Problem with quarkus-websockets on 2.0.0.Alpha1 #16753

Closed
ia3andy opened this issue Apr 23, 2021 · 12 comments · Fixed by #16948 or #17692
Closed

Problem with quarkus-websockets on 2.0.0.Alpha1 #16753

ia3andy opened this issue Apr 23, 2021 · 12 comments · Fixed by #16948 or #17692
Labels
kind/bug Something isn't working
Milestone

Comments

@ia3andy
Copy link
Contributor

ia3andy commented Apr 23, 2021

Describe the bug

With quarkus main branch, I get this exception when sending a websocket message (no problem with 1.13.2.Final):

2021-04-23 10:56:41,739 WARN  [io.net.cha.DefaultChannelPipeline] (vert.x-eventloop-thread-5) An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.: io.netty.handler.codec.http.websocketx.CorruptedWebSocketFrameException: RSV != 0 and no extension negotiated, RSV:4
	at io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder.protocolViolation(WebSocket08FrameDecoder.java:426)
	at io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder.protocolViolation(WebSocket08FrameDecoder.java:422)
	at io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder.decode(WebSocket08FrameDecoder.java:197)
	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:508)
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:447)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:719)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:655)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:581)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)

Expected behavior

Should work

Actual behavior

Exception and not working

To Reproduce

https://github.com/ia3andy/reproducer-websocket

The reproducer use the websocket example codestart which is very close to the quickstart.

Steps to reproduce the behavior:

  1. Start in dev mode
  2. Hit http://localhost:8080/supersonic-chat.html
  3. Type your name, connect
  4. Type a message, send
  5. Exception

Environment (please complete the following information):

Output of uname -a or ver

~/w/r/q/quarkus> uname -a                                      extension-codestarts
Darwin MacBook-Pro-de-Andy.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64

Output of java -version

~/w/r/q/quarkus> java -version                                 extension-codestarts
openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.10+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.10+9, mixed mode)

Quarkus version or git rev

999-SNAPSHOT

Build tool (ie. output of mvnw --version or gradlew --version)


 ./mvnw --version                    master(origin/master)
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /Users/ia3andy/.m2/wrapper/dists/apache-maven-3.6.3-bin/1iopthnavndlasol9gbrbg6bf2/apache-maven-3.6.3
Java version: 11.0.10, vendor: AdoptOpenJDK, runtime: /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home
Default locale: fr_FR, platform encoding: UTF-8
OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"

CC @cescoffier

@ia3andy ia3andy added the kind/bug Something isn't working label Apr 23, 2021
@ia3andy
Copy link
Contributor Author

ia3andy commented Apr 26, 2021

This also affect 2.0.0.Alpha1.

@ia3andy ia3andy changed the title Problem with quarkus-websockets on main Problem with quarkus-websockets on 2.0.0.Alpha1 Apr 26, 2021
@ia3andy
Copy link
Contributor Author

ia3andy commented Apr 26, 2021

@geoand could you triage, I am not sure who to ping on this beside @cescoffier.

@geoand
Copy link
Contributor

geoand commented Apr 26, 2021

cc @stuartwdouglas

@stuartwdouglas
Copy link
Member

Looks like the fix for this did not go into the 4.x branch

@cescoffier
Copy link
Member

Hum, possibly. I remember having a hard time rebasing the WebSocket split. Maybe I missed something.

@stuartwdouglas
Copy link
Member

Now that it has been merged we just need a release from the current main branch.

@cescoffier
Copy link
Member

@stuartwdouglas do you want me to cut a release of quarkus-http? Would be good to have it integrated before the second alpha.

@stuartwdouglas
Copy link
Member

If you have time that would be great

@cescoffier
Copy link
Member

Ok, working on it!

@suchwerk
Copy link
Contributor

suchwerk commented Jun 2, 2021

@stuartwdouglas I just run into that issue on my own project. Then i tried this reproducer with 2.0.0.CR2 and it also failed.

@gsmet gsmet reopened this Jun 3, 2021
@gsmet
Copy link
Member

gsmet commented Jun 3, 2021

@stuartwdouglas I can confirm I was able to reproduce it with main by just going through the steps in Andy's original message. Could you have a look? That looks like a very annoying issue.

@HK-hub
Copy link

HK-hub commented Nov 18, 2023

I have also encountered this problem, please let me know if there is a possible solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
7 participants