Javascript Debug session closed because of io.netty.handler.codec.CorruptedFrameException

Answered

Hello,

I'm trying the Javascript Debug in the ultimate edition, to debug some GWT classes in intelliJ. Please bear with me as I'm new to GWT.

We use the gwt-maven-plugin to start the debug mode:

"C:\Program Files\Java\jdk1.8.0_181\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:54016,suspend=y,server=n -Dmaven.multiModuleProjectDirectory=C:\git\XXX\XXX -Dmaven.home=C:\maven -Dclassworlds.conf=C:\maven\bin\m2.conf -javaagent:C:\Users\XXX\.IntelliJIdea2018.2\system\captureAgent\debugger-agent.jar=file:/C:/Users/XXX/AppData/Local/Temp/capture.props -Dfile.encoding=UTF-8 -classpath "C:\maven\boot\plexus-classworlds-2.5.2.jar;C:\Program Files\JetBrains\IntelliJ IDEA Ultimate 2018.2.5\lib\idea_rt.jar" org.codehaus.classworlds.Launcher -Didea.version=2018.2.5 gwt:debug -Pdev -e

The GWT Development Mode window appears with the following info:

00:00:00,002 [INFO] Running CodeServer with parameters: [-noprecompile, -port, 9876, -sourceLevel, 1.8, -bindAddress, 127.0.0.1, -launcherDir, C:\XXX\XXX\target\war, -logLevel, INFO, -generateJsInteropExports, -XmethodNameDisplayMode, ONLY_METHOD_NAME, -style, PRETTY, com.XXX]
00:00:25,081 [INFO] Code server started in 25.08 s ms

I have a breakpoint set in the code, and I then start the Javascript Debug configuration with the Chrome browser. In the browser, I trigger the breakpoint by clicking a button in the GUI. After I pressed the button, the intelliJ window gets the focus, the breakpoint triggers, and after 2 seconds the debug session terminates.

In the log, I have the following exception:

2018-11-07 14:15:23,797 [ 702008]  ERROR - ltInWebServer.BuiltInWebServer - Max frame length of 104857600 has been exceeded. 
io.netty.handler.codec.CorruptedFrameException: Max frame length of 104857600 has been exceeded.
    at io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder.protocolViolation(WebSocket08FrameDecoder.java:412)
    at io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder.decode(WebSocket08FrameDecoder.java:277)
    at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:647)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:582)
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:499)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:461)
    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
2018-11-07 14:15:23,798 [ 702009]  ERROR - ltInWebServer.BuiltInWebServer - IntelliJ IDEA 2018.2.5  Build #IU-182.4892.20
2018-11-07 14:15:23,798 [ 702009]  ERROR - ltInWebServer.BuiltInWebServer - JDK: 1.8.0_181
2018-11-07 14:15:23,798 [ 702009]  ERROR - ltInWebServer.BuiltInWebServer - VM: Java HotSpot(TM) 64-Bit Server VM
2018-11-07 14:15:23,798 [ 702009]  ERROR - ltInWebServer.BuiltInWebServer - Vendor: Oracle Corporation
2018-11-07 14:15:23,798 [ 702009]  ERROR - ltInWebServer.BuiltInWebServer - OS: Windows 10
2018-11-07 14:15:23,798 [ 702009]  ERROR - ltInWebServer.BuiltInWebServer - Last Action: Debug
2018-11-07 14:15:23,798 [ 702009]   INFO - ltInWebServer.BuiltInWebServer - Channel will be closed due to error

Does anyone have any idea how can I change this max frame length limit or do you have any idea if this comes from intelliJ or from the GWT's side?

Any input on this is really appreciated.

Thank you very much!

3 comments
Comment actions Permalink

Are you able to debug the app in Chrome Dev tools out of the IDE or you get the same error?

0
Comment actions Permalink

Yes, sorry, I forgot to mention, debugging works fine in Chrome's built-in debugger.

0
Comment actions Permalink

I managed to solve the issue by compiling only the source code needed for debug in GWT, not the whole application's code, and it worked because it fit in that limitation of 100MB.

0

Please sign in to leave a comment.