Skip to content

grpc 1.2.0 having issues with netty #579

@travisci-hrijp

Description

@travisci-hrijp
userpc:grpc username$ bin/speech-sample-async.sh --host=speech.googleapis.com --port=443 \
> --uri=resources/audio.raw --sampling=16000
Exception in thread "main" java.lang.NoSuchMethodError: io.grpc.netty.NettyChannelBuilder.maxInboundMessageSize()I
	at io.grpc.netty.NettyChannelBuilder.buildTransportFactory(NettyChannelBuilder.java:274)
	at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:239)
	at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:69)
	at com.examples.cloud.speech.AsyncRecognizeClient.createChannel(AsyncRecognizeClient.java:90)
	at com.examples.cloud.speech.AsyncRecognizeClient.main(AsyncRecognizeClient.java:229)

In which file did you encounter the issue?

git/java-docs-samples/speech/grpc/pom.xml

Did you change the file? If so, how?

userpc:grpc username$ git diff
diff --git a/speech/grpc/pom.xml b/speech/grpc/pom.xml
index 21b508a..70c1507 100644
--- a/speech/grpc/pom.xml
+++ b/speech/grpc/pom.xml
@@ -49,7 +49,7 @@ limitations under the License.
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <codehaus-versions-maven-plugin-version>2.3</codehaus-versions-maven-plugin-version>
-    <grpc-version>1.2.0</grpc-version> <!-- 1.1.2 doesn't work - DO NOT UPGRADE -->
+    <grpc-version>1.0.3</grpc-version> <!-- 1.1.2 doesn't work - DO NOT UPGRADE -->
     <maven-compiler-plugin-version>3.6.0</maven-compiler-plugin-version>
     <xolstice-protobuf-maven-plugin-version>0.5.0</xolstice-protobuf-maven-plugin-version>

Describe the issue

There are issues finding Netty in the latest grpc version bump.

Activity

changed the title [-]Roll back GRPC version in pom.xml[/-] [+]grpc 1.2.0 having issues with netty[/+] on Mar 24, 2017
lesv

lesv commented on Mar 24, 2017

@lesv
Contributor

I've rolled back to 1.0.3 for now.

added
type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
on Mar 24, 2017
lesv

lesv commented on Apr 22, 2017

@lesv
Contributor

@chrisgarry Is this still a problem for you?

travisci-hrijp

travisci-hrijp commented on Apr 23, 2017

@travisci-hrijp
Author

@lesv nope my local version change resolved it. I haven't pulled in any recent changes to verify if you guys resolved.

atejandro

atejandro commented on May 31, 2017

@atejandro

I have the same problem in a project I'm working on. This time however, it happens when I change from version 1.2.0 to version 1.3.0.

org.jini.rio.core.JSBInstantiationException: java.lang.NoSuchMethodError: io.grpc.netty.NettyChannelBuilder.maxInboundMessageSize()I at io.grpc.netty.NettyChannelBuilder.buildTransportFactory(NettyChannelBuilder.java:333) at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:239) at io.grpc.internal.AbstractManagedChannelImplBuilder.build(AbstractManagedChannelImplBuilder.java:69) at com.pagosonline.maf.channel.GrpcManagedChannel.<init>(GrpcManagedChannel.java:32) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at

Is rolling back to 1.2.0 the only solution? Are you still having the same problem with this new release?

travisci-hrijp

travisci-hrijp commented on May 31, 2017

@travisci-hrijp
Author

@atejandro This is the second version bump of GRPC that has had this issue. I wonder if the same change that broke this last time was reintroduced, or it wasn't patched in a sustainable way. I am no longer using this so I'm not sure. Good luck!

lesv

lesv commented on May 31, 2017

@lesv
Contributor

@gguuss PTAL

gguuss

gguuss commented on May 31, 2017

@gguuss
Contributor

I just was looking at the java/speech samples for forever trying to figure this out. I believe we removed the GRPC samples in favor of those using Cloud Client libraries. Can you point me to the code you're running?

Do the samples in this folder resolve your issue? I cannot reproduce the issue.

lesv

lesv commented on Mar 6, 2018

@lesv
Contributor
added a commit that references this issue on Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @lesv@gguuss@atejandro@puneith@travisci-hrijp

      Issue actions

        grpc 1.2.0 having issues with netty · Issue #579 · GoogleCloudPlatform/java-docs-samples