Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INTERNAL: error in frame handler in Android #8164

Closed
papanmanna opened this issue May 11, 2021 · 5 comments
Closed

INTERNAL: error in frame handler in Android #8164

papanmanna opened this issue May 11, 2021 · 5 comments
Labels

Comments

@papanmanna
Copy link

Configuration:

implementation 'io.grpc:grpc-okhttp:1.37.0'
implementation ('io.grpc:grpc-protobuf:1.37.0') {
exclude group: 'com.google.api'
exclude group: 'com.google.protobuf.GoGoProtos', module: "protobuf-java"
exclude group: 'com.google.protobuf.AnyProto', module: "protobuf-java"
exclude group: 'com.google.protobuf.AnyOrBuilder', module: "protobuf-java"
}
implementation 'io.grpc:grpc-stub:1.37.0'
implementation 'javax.annotation:javax.annotation-api:1.3.2'

Stacktrace:

Status{code=INTERNAL, description=error in frame handler, cause=java.io.IOException: FRAME_SIZE_ERROR: 4740180
at io.grpc.okhttp.internal.framed.Http2.ioException(Http2.java:597)
at io.grpc.okhttp.internal.framed.Http2.access$200(Http2.java:48)
at io.grpc.okhttp.internal.framed.Http2$Reader.nextFrame(Http2.java:138)
at io.grpc.okhttp.OkHttpClientTransport$ClientFrameHandler.run(OkHttpClientTransport.java:1101)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
}

@dapengzhang0
Copy link
Member

This looks exactly like #2436:

That frame size error means that you are using HTTP/1.1. 4740180 in hex is 48 54 54, which is "H T T". I believe you are connecting to the wrong server, or your server is not using gRPC.

@papanmanna
Copy link
Author

papanmanna commented May 11, 2021

the grpc server is okay. It can be connected from web client. In Android I'm using

ManagedChannelBuilder.forAddress(GRPC_MAIN, PORT_MAIN)
                        .usePlaintext()
                        .build();

@ejona86
Copy link
Member

ejona86 commented May 11, 2021

Looks like this question was cross-posted to https://stackoverflow.com/questions/67493428/internal-error-in-frame-handler-in-android

@papanmanna
Copy link
Author

Looks like this question was cross-posted to https://stackoverflow.com/questions/67493428/internal-error-in-frame-handler-in-android

@ejona86 , can you help me out from this issue?

@dapengzhang0
Copy link
Member

@papanmanna A couple of questions:

the grpc server is okay. It can be connected from web client.

What is your web client that connected to the grpc server? Is it a grpc client on a PC device, or a grpc-web client or HTTP client?

Is there any proxy in the network between your grpc server and the android device? The android grpc client is receiving HTTP/1.1 frame. That's not HTTP/2 frame that grpc server should respond with.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants