Runtime exception when trying to run the kotlin-coroutines-gRPC template
christophschnabl opened this issue · comments
I'm running kotlin version 1.3.31-release-197
on JVM 12
Task :run FAILED Unary Response: Hello there, John! Bidi Response: Hello there, person #0! Bidi Response: Hello there, person #1! Bidi Response: Hello there, person #2! Bidi Response: Hello there, person #3! Bidi Response: Hello there, person #4! Exception in thread "main" io.grpc.StatusRuntimeException: UNKNOWN: Receiver class com.github.marcoferrer.krotoplus.coroutines.server.ServerRequestStreamChannel does not define or inherit an implementation of the resolved method abstract cancel(Ljava/util/concurrent/CancellationException;)V of interface kotlinx.coroutines.channels.ReceiveChannel.
Thanks for reporting this.
It looks like a dependency mismatch. ReceiveChannel.cancel(CancellationException;)
was introduced in coroutines 1.2.0
. Looking at the template project now, it looks like its a little out of date. I just pushed a few updates to the repo. Could you verify if you are still seeing the issue when using the following dependency versions
krotoplus_version=0.5.0-RC // or 0.4.0 if do not want to use the RC
protobuf_version=3.9.0
coroutines_version=1.3.0
grpc_version=1.23.0
fails with:
> Task :api:extractIncludeProto FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':api:compileClasspath'.
> Could not find com.github.marcoferrer.krotoplus:kroto-plus-coroutines:0.5.0-RC // or 0.4.0 if do not want to use the RC.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/com/github/marcoferrer/krotoplus/kroto-plus-coroutines/0.5.0-RC / or 0.4.0 if do not want to use the RC/kroto-plus-coroutines-0.5.0-RC / or 0.4.0 if do not want to use the RC.pom
- https://repo.maven.apache.org/maven2/com/github/marcoferrer/krotoplus/kroto-plus-coroutines/0.5.0-RC / or 0.4.0 if do not want to use the RC/kroto-plus-coroutines-0.5.0-RC / or 0.4.0 if do not want to use the RC.jar
Required by:
project :api
Sorry about that. Youll need to remove the comment at the end of the string // or 0.4.0 if do not want to use the RC
thanks!