You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
io.grpc.StatusException: UNKNOWN
at io.grpc.Status.asException(Status.java:552)
at io.grpc.kotlin.ClientCalls$rpcImpl$1$1$1.onClose(ClientCalls.kt:300)
at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:574)
at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:72)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:742)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:723)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.UnsupportedOperationException
at io.grpc.netty.AbstractHttp2Headers.isEmpty(AbstractHttp2Headers.java:40)
at io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder$FrameReadListener.onHeadersRead(DefaultHttp2ConnectionDecoder.java:419)
at io.netty.handler.codec.http2.DefaultHttp2ConnectionDecoder$FrameReadListener.onHeadersRead(DefaultHttp2ConnectionDecoder.java:352)
...
These lines are new in DefaultHttp2ConnectionDecoder in version 101 compared to 100 and cause the error:
} else if (validateHeaders && !headers.isEmpty()) {
// Need to check trailers don't contain pseudo headers. According to RFC 9113
// Trailers MUST NOT include pseudo-header fields (Section 8.3).
for (Iterator<Entry<CharSequence, CharSequence>> iterator =
headers.iterator(); iterator.hasNext();) {
CharSequence name = iterator.next().getKey();
if (Http2Headers.PseudoHeaderName.hasPseudoHeaderFormat(name)) {
throw streamError(stream.id(), PROTOCOL_ERROR,
"Found invalid Pseudo-Header in trailers: %s", name);
}
}
}
... the reason is that it calls !headers.isEmpty(), which looks like this in AbstractHttp2Headers in grpc-netty:
@Override
public boolean isEmpty() {
throw new UnsupportedOperationException();
}
Expected behavior
No failure, when calling a GRPC service.
Actual behavior
This failure, when calling a GRPC service:
These lines are new in
DefaultHttp2ConnectionDecoder
in version 101 compared to 100 and cause the error:... the reason is that it calls
!headers.isEmpty()
, which looks like this inAbstractHttp2Headers
in grpc-netty:Steps to reproduce
build.gradle.kts
comment in the 4 lines under// TODO: Comment in to see test working with old version.
Minimal yet complete reproducer code (or URL to code)
https://github.com/runenielsen/netty-grpc-bug
Netty version
4.1.101.Final
JVM version (e.g.
java -version
)OS version (e.g.
uname -a
)The text was updated successfully, but these errors were encountered: