Scalapb: support grpc-java 0.13

Created on 23 Jan 2016  Â·  6Comments  Â·  Source: scalapb/ScalaPB

I'm trying grpc-java 0.12.0, but got some errors.

https://travis-ci.org/xuwei-k/ScalaPB/jobs/104204066#L944

SEVERE: Exception while executing runnable io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1@4bfe9fe4
io.grpc.StatusRuntimeException: INTERNAL: Invalid protobuf byte sequence
    at io.grpc.Status.asRuntimeException(Status.java:431)
    at io.grpc.protobuf.ProtoUtils$1.parse(ProtoUtils.java:83)
    at io.grpc.protobuf.ProtoUtils$1.parse(ProtoUtils.java:56)
    at io.grpc.MethodDescriptor.parseRequest(MethodDescriptor.java:204)
    at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.messageRead(ServerCallImpl.java:164)
    at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1.runInContext(ServerImpl.java:434)
    at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:54)
    at io.grpc.internal.SerializingExecutor$TaskRunner.run(SerializingExecutor.java:154)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.google.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).
    at com.google.protobuf.InvalidProtocolBufferException.invalidTag(InvalidProtocolBufferException.java:89)
    at com.google.protobuf.CodedInputStream.readTag(CodedInputStream.java:158)
    at com.trueaccord.proto.e2e.Service$Req4.<init>(Service.java:2252)
    at com.trueaccord.proto.e2e.Service$Req4.<init>(Service.java:2227)
    at com.trueaccord.proto.e2e.Service$Req4$1.parsePartialFrom(Service.java:2563)
    at com.trueaccord.proto.e2e.Service$Req4$1.parsePartialFrom(Service.java:2557)
    at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:90)
    at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:95)
    at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:49)
    at io.grpc.protobuf.ProtoUtils$1.parseFrom(ProtoUtils.java:93)
    at io.grpc.protobuf.ProtoUtils$1.parse(ProtoUtils.java:80)
    ... 9 more

https://travis-ci.org/xuwei-k/ScalaPB/jobs/104204066#L1032

[info] java server
[info] - unaryStringLength blockingStub
[info] - unaryStringLength stub
[info] - clientStreamingCount *** FAILED ***
[info]   1 was not equal to 7 (GrpcServiceJavaServerSpec.scala:40)
[info] - serverStreamingFan
[info] - bidiStreamingDoubler *** FAILED ***
[info]   java.util.concurrent.TimeoutException: Futures timed out after [2 seconds]
[info]   at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:219)
[info]   at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:223)
[info]   at scala.concurrent.Await$$anonfun$result$1.apply(package.scala:190)
[info]   at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53)
[info]   at scala.concurrent.Await$.result(package.scala:190)
[info]   at GrpcServiceJavaServerSpec$$anonfun$1$$anonfun$apply$mcV$sp$5$$anonfun$apply$mcV$sp$10.apply(GrpcServiceJavaServerSpec.scala:62)
[info]   at GrpcServiceJavaServerSpec$$anonfun$1$$anonfun$apply$mcV$sp$5$$anonfun$apply$mcV$sp$10.apply(GrpcServiceJavaServerSpec.scala:54)
[info]   at GrpcServiceSpecBase.withServer(GrpcServiceSpecBase.scala:30)
[info]   at GrpcServiceSpecBase.withJavaServer(GrpcServiceSpecBase.scala:21)
[info]   at GrpcServiceJavaServerSpec$$anonfun$1$$anonfun$apply$mcV$sp$5.apply$mcV$sp(GrpcServiceJavaServerSpec.scala:54)

Most helpful comment

Released as 0.5.22.

All 6 comments

We have been tackling this issue for these several days. Some facts we found are:

  • This issue could be reproduced with grpc-java 0.9.0 as well
  • 61ceba411f33368112d16cba6f9a3c1cd71a764f with grpc-java 0.13.1 worked well, but 59e9fd5393809cf6d5ad9739d949e287f8a74bfc did not

There might be a problem in ProtoInputStream or Marshaller. Any ideas?

@thesamet Could you please release new version with this fix?

Released as 0.5.22.

Released as 0.5.22.

There are "com.trueaccord.scalapb" %% "scalapb-runtime-grpc" % "0.5.22" and "com.trueaccord.scalapb" %% "compilerplugin" % "0.5.22",
but not available addSbtPlugin("com.trueaccord.scalapb" % "sbt-scalapb" % "0.5.22") ?

My bad, the sbt plugin should appear in maven shortly.

On Wed, Mar 16, 2016 at 4:29 PM, kenji yoshida [email protected]
wrote:

Released as 0.5.22.

There are "com.trueaccord.scalapb" %% "scalapb-runtime-grpc" % "0.5.22"
and "com.trueaccord.scalapb" %% "compilerplugin" % "0.5.22",
but not available addSbtPlugin("com.trueaccord.scalapb" % "sbt-scalapb" %
"0.5.22") ?

-
http://repo1.maven.org/maven2/com/trueaccord/scalapb/scalapb-runtime-grpc_2.11/0.5.22/
-
http://repo1.maven.org/maven2/com/trueaccord/scalapb/compilerplugin_2.11/0.5.22/
-
http://repo1.maven.org/maven2/com/trueaccord/scalapb/sbt-scalapb_2.10_0.13/0.5.22/

—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/trueaccord/ScalaPB/issues/81#issuecomment-197603715

-Nadav

It seems that it still doesn't show on maven. I'll look into it later. In
the meantime, you can use make a 0.5.21 sbt plugin use a 0.5.22 code
generator by following the instruction on
https://trueaccord.github.io/ScalaPB/sbt-settings.html "Pulling a newer
version of the Scala code generator"

On Wed, Mar 16, 2016 at 4:33 PM, Nadav Samet [email protected] wrote:

My bad, the sbt plugin should appear in maven shortly.

On Wed, Mar 16, 2016 at 4:29 PM, kenji yoshida [email protected]
wrote:

Released as 0.5.22.

There are "com.trueaccord.scalapb" %% "scalapb-runtime-grpc" % "0.5.22"
and "com.trueaccord.scalapb" %% "compilerplugin" % "0.5.22",
but not available addSbtPlugin("com.trueaccord.scalapb" % "sbt-scalapb"
% "0.5.22") ?

-
http://repo1.maven.org/maven2/com/trueaccord/scalapb/scalapb-runtime-grpc_2.11/0.5.22/
-
http://repo1.maven.org/maven2/com/trueaccord/scalapb/compilerplugin_2.11/0.5.22/
-
http://repo1.maven.org/maven2/com/trueaccord/scalapb/sbt-scalapb_2.10_0.13/0.5.22/

—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/trueaccord/ScalaPB/issues/81#issuecomment-197603715

-Nadav

-Nadav

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mroth picture mroth  Â·  10Comments

jvican picture jvican  Â·  9Comments

nykolaslima picture nykolaslima  Â·  9Comments

nmost picture nmost  Â·  3Comments

ejconlon picture ejconlon  Â·  9Comments