Kilian
08/02/2023, 6:35 PMsslConnector(
keyStore = keystore,
keyAlias = keyAlias,
keyStorePassword = { keyStorePassword.toCharArray() },
privateKeyPassword = { keyPassword.toCharArray() },
) {
// this.host = "0.0.0.0"
this.keyStorePath = file
this.port = port
}
Unfortunately i get a crash
[eventLoopGroupProxy-3-1] WARN io.netty.channel.DefaultChannelPipeline - 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.DecoderException: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.isEmpty()' on a null object reference
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(Unknown Source:103)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(Unknown Source:53)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(SourceFile:2)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(SourceFile:1)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(SourceFile:1)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(Unknown Source:0)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(SourceFile:2)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(SourceFile:1)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(SourceFile:2)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(Unknown Source:101)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(SourceFile:1)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(Unknown Source:24)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(Unknown Source:4)
at io.netty.channel.nio.NioEventLoop.run(Unknown Source:131)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(Unknown Source:41)
at io.netty.util.internal.ThreadExecutorMap$2.run(Unknown Source:8)
at io.ktor.server.netty.EventLoopGroupProxy$Companion.create$lambda$1$lambda$0(Unknown Source:5)
at io.ktor.server.netty.EventLoopGroupProxy$Companion.$r8$lambda$XgnKz7L6tCWRUaIAa7SVURwtFE4(SourceFile:1)
at androidx.core.app.ActivityCompat$$ExternalSyntheticLambda0.run(SourceFile:31)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(Unknown Source:2)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.isEmpty()' on a null object reference
at io.netty.handler.ssl.JdkAlpnSslEngine$AlpnSelector.checkUnsupported(Unknown Source:11)
at io.netty.handler.ssl.JdkAlpnSslEngine.verifyProtocolSelection(Unknown Source:41)
at io.netty.handler.ssl.JdkAlpnSslEngine.wrap(SourceFile:3)
at io.netty.handler.ssl.SslHandler.wrap(SourceFile:1)
at io.netty.handler.ssl.SslHandler.wrapNonAppData(Unknown Source:30)
at io.netty.handler.ssl.SslHandler.unwrap(Unknown Source:169)
at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(Unknown Source:39)
at io.netty.handler.ssl.SslHandler.decode(Unknown Source:13)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(Unknown Source:5)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(Unknown Source:33)
... 20 more
seems like in JdkAlpnSslEngine String protocol = getApplicationProtocol();
produces a null value. Any idea how to fix it?Kilian
08/02/2023, 6:38 PMKilian
08/02/2023, 6:55 PMPim
12/17/2024, 11:48 AMKilian
12/17/2024, 11:50 AMPim
12/17/2024, 11:51 AMPim
01/06/2025, 10:40 AMenableHttp2 = false
on the NettyApplicationEngine.Configuration
. Not sure how that’s connected though.