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.

Debug Form doesn't show for RPC in DocService

See original GitHub issue

The DocService doesn’t show any Debug Form options under the endpoint definitions:

image

I have tried the following:

    private val grpcServiceBuilder: GrpcServiceBuilder = GrpcService.builder()
        .supportedSerializationFormats(GrpcSerializationFormats.PROTO)
        .supportedSerializationFormats(GrpcSerializationFormats.PROTO_WEB)
        .supportedSerializationFormats(GrpcSerializationFormats.PROTO_WEB_TEXT)
        .supportedSerializationFormats(GrpcSerializationFormats.JSON)
        .supportedSerializationFormats(GrpcSerializationFormats.JSON_WEB)
        .enableUnframedRequests(true)

Also I have seen this issue: https://github.com/line/armeria/issues/1134

But no luck. Does anyone know what is happening and maybe we can improve the documentation for future users?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
Dogacelcommented, Jun 7, 2022

because JSON serialization does not run with proto3 optional fields.

As far as I know, protobuf-jackson supports optional since 2.0.0 curioswitch/protobuf-jackson#7 You can also set Gson as a json marshaller.

https://github.com/line/armeria/blob/8df42aa225af877ef13781ec1b27c1fe0ce37883/grpc/src/main/java/com/linecorp/armeria/common/grpc/GrpcJsonMarshaller.java#L71

If you encounter another issues except what we have known, please let us know.

I am not 100% sure but the comment might be outdated because this bug has been resolved recently (relatively). I will double check that and write back.

Oops, I didn’t know about it. 😄 bloomRPC does render it by default? Anyway, it would be nice if we support those fields as well. 😄

Yeah, BloomRPC just dumps every possible field as an example. There is no difference between a oneof field and optional field tho but I the current implementation is good enough.

Oops, I didn’t know about it. Could you give us a link to it or provide a simple reproducible example so we can take a look at it?

We have been using the library in the company’s private project so I need some time to reproduce this in a sample project and come back to you.

1reaction
minwooxcommented, Jun 7, 2022

Hey! Could you just try with this?

GrpcService.builder()
           .enableUnframedRequests(true)
           .addService(...)
           .build()

builder.supportedSerializationFormats(...) overwrites the values previously set, so I think only GrpcSerializationFormats.JSON_WEB is set by the code you pasted. Also, all serialization formats are set by default so you don’t need to set them explicitly. 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

GrpcService with default serialization formats does not show a ...
Unlike THttpService, a user has to enable more serialization formats to make DocService show the debug form for a GrpcService.
Read more >
Browsing and invoking services with DocService
Debug form. Now, scroll down the right pane. You'll find a 'debug form' which enables you to send an RPC request in human-friendly...
Read more >
Overview of RPC Debugging - Windows drivers | Microsoft Learn
Debugging Tools for Windows contains a tool called DbgRpc, as well as RPC-related debugger extensions. These can be used to analyze a variety...
Read more >
Services overview | Android Developers
A Service is an application component that can perform long-running operations in the background. It does not provide a user interface.
Read more >
Visual Studio debug instance not showing form anymore
If you are running Winforms there is an issue with the Form_Load EventHandler that if there is an error, it won't be thrown....
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