question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for content-type: application/grpc-web-text

See original GitHub issue

So I was trying to use the in-process proxy to wrap my grpc-server to receive grpc-web requests. I formerly used envoy and it worked with the same client javascript code, however I am running into an issue with the grpc-web-text content-type. Is that content-type actually supported? I saw that there is some string replaced inside the wrapper :

https://github.com/improbable-eng/grpc-web/blob/b89ec6300fb9ce3f604ff02c22e1c106fe29a3b9/go/grpcweb/wrapper.go#L198

Effectively this converts the context header from application/grpc-web-text to application/grpc-text, which GRPC does not like ( it returns invalid gRPC request content-type ). After replacing that with application/grpc+json, via a wrapper, the grpc handler is successfully continuing, just to later fail with the message: “grpc: received message larger than max (1094795585 vs. 4194304)”

I suspect that grpc-web-text is just not supported at this point and so the necessary steps to transform it aren’t happening thus?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
johanbrandhorstcommented, Oct 18, 2018

@mier85 This might help: https://github.com/envoyproxy/envoy/blob/10dcbb13d04768cf3e9bbca55ccefc2be0e704ef/source/extensions/filters/http/grpc_web/grpc_web_filter.cc#L78. It’s the source for the C++ proxy that grpc/grpc-web uses, which supports the base64 text content type.

1reaction
johanbrandhorstcommented, Oct 12, 2018

@JBetser, forgive me, but have you tried simply using the binary encoding option? Or using the client in this repo? Both should work with the proxy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Asp.net: 'application/grpc-web' is not supported - Stack Overflow
I was looking for more diagnostics that would point to the problem. Like listing supported content-types, etc... Anyway, I found the problem: I ......
Read more >
Use gRPC in browser apps | Microsoft Learn
NET Core gRPC services callable from browser apps. ... Allows an app to support both gRPC and JSON web APIs without duplicating the...
Read more >
gRPC over HTTP2
Service -Name → {IDL-specific service name}; Authority → “:authority” {virtual ... If Content-Type does not begin with “application/grpc”, gRPC servers ...
Read more >
The gRPC-web Specification - Springer Link
standard gRPC-web, which supports the following: ... Two different Content-type header values: ... application/grpc-web-text, which handles text payload.
Read more >
Use gRPC in the Browser With gRPC-Web and .NET5 - Medium
In this article, we will explore Microsoft's gRPC-Web and how it can ... see your gRPC call with content-type 'application/grpc-web-text':.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found