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

WebSocket Client ignores maxFrameSize property #20731

Closed
andlinger opened this issue Oct 13, 2021 · 3 comments · Fixed by #20794
Closed

WebSocket Client ignores maxFrameSize property #20731

andlinger opened this issue Oct 13, 2021 · 3 comments · Fixed by #20794
Labels
area/websockets kind/bug Something isn't working
Milestone

Comments

@andlinger
Copy link
Contributor

andlinger commented Oct 13, 2021

Describe the bug

The Quarkus Websocket Client from the extension io.quarkus:quarkus-websockets-client.
There was already an issue about this: #17206
It seems that the problem happens again in Quarkus 2.3.0.Final.

I create the session as described in the documentation:

ContainerProvider.getWebSocketContainer().connectToServer(EmptyEndpoint.class, URI.create(url));

@ClientEndpoint(decoders = DevToolsResponseDecoder.class, encoders = DevToolsRequestEncoder.class)
public static class EmptyEndpoint {}

Property max-frame-size is configured.
quarkus.websocket.max-frame-size=15000000

Expected behavior

The frame size should match the configuration.

Actual behavior

The frame size does not match the configuration.

io.netty.handler.codec.http.websocketx.CorruptedWebSocketFrameException: Max frame length of 1280000 has been exceeded.
	at io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder.protocolViolation(WebSocket08FrameDecoder.java:424)
	at io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder.decode(WebSocket08FrameDecoder.java:286)
	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:507)
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:446)
	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.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:986)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:834)

How to Reproduce?

No response

Output of uname -a or ver

Darwin Kernel Version 20.6.0

Output of java -version

openjdk version "11.0.12" 2021-07-20

GraalVM version (if different from Java)

21.2.0 (build 11.0.12+6-jvmci-21.2-b08)

Quarkus version or git rev

2.3.0.Final

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

------------------------------------------------------------ Gradle 6.8 ------------------------------------------------------------ Build time: 2021-01-08 16:38:46 UTC Revision: b7e82460c5373e194fb478a998c4fcfe7da53a7e Kotlin: 1.4.20 Groovy: 2.5.12 Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020 JVM: 11.0.12 (GraalVM Community 11.0.12+6-jvmci-21.2-b08) OS: Mac OS X 11.5 x86_64

Additional information

No response

@andlinger andlinger added the kind/bug Something isn't working label Oct 13, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Oct 13, 2021

/cc @evanchooly

@gsmet
Copy link
Member

gsmet commented Oct 13, 2021

/cc @stuartwdouglas I suppose we don't apply the config properly in the client anymore?

@stuartwdouglas
Copy link
Member

Looks like this was never propagated to the client: quarkusio/quarkus-http#88

gsmet added a commit to gsmet/quarkus that referenced this issue Oct 15, 2021
@quarkus-bot quarkus-bot bot added this to the 2.5 - main milestone Oct 18, 2021
@aloubyansky aloubyansky modified the milestones: 2.5 - main, 2.4.0.Final Oct 18, 2021
aloubyansky pushed a commit to aloubyansky/quarkus that referenced this issue Oct 18, 2021
Fixes quarkusio#20731

(cherry picked from commit e8dcbc7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/websockets kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants