grpc-swift
grpc-swift copied to clipboard
deadlineExceeded (UnableToParseFrame(file: "NIOHTTP2/HTTP2ChannelHandler.swift", line: 490))
What are you trying to achieve?
I want to get data using UnaryCall.But it returns this error.
deadlineExceeded (UnableToParseFrame(file: "NIOHTTP2/HTTP2ChannelHandler.swift", line: 490))
This error is occured in HTTP2FrameDecoder.process(maxFrameSize:, maxHeaderListSize:) Line: 91
It's because the header.length is too large, but I have no idea why.
I used Charles, but could not find the target network log.
func getData() async throws {
let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
let channel = try GRPCChannelPool.with(
target: .host("myhost.com", port: 443),
transportSecurity: .tls(.makeClientDefault(for: .best)),
eventLoopGroup: group
)
let client = MyClient(channel: channel)
let request = SomeRequest.with {
$0.condition = "hoge"
}
try await client.hogeData(request)
}
Environment Apple Swift version 5.9.2
dependencies: [
.package(url: "https://github.com/apple/swift-protobuf", from: "1.25.2"),
.package(url: "https://github.com/grpc/grpc-swift.git", from: "1.23.0"),
What have you tried so far?
It works fine in grpcurl. grpcurl ’ -d ‘{ “param”: “hoge”, }’ myhost.com:443 hoge/Data