[GH-ISSUE #706] Cannot set *Message Type* when using protobuf #703

Open
opened 2026-03-03 19:21:08 +03:00 by kerem · 6 comments
Owner

Originally created by @ihomway on GitHub (Nov 25, 2020).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/706

Proxyman version?

Version 2.13.0 (21300)

macOS Version?

Version 11.0.1 (20B29)

Steps to reproduce

I have a photo file like this:

syntax = "proto3";

package example.api.feeds.v2
import "google/protobuf/any.proto";
option go_package = "git.example.com/api/feeds/v2;v2";
option java_multiple_files = true;
option java_package = "com.exaple.api.feeds.v2";
option objc_class_prefix = "FeedsV2";

service Feed {
    rpc list(Req) returns (Reply);
}

message Req {
    int32 page = 1;
}

message Reply {
    repeated ListItem items = 1;
}

message ListItem {
    string content = 1;
}

And then I'm trying to parse the response which is encoded as protobuf. Here is the settings:

  1. I add the photo file:
    Screen Shot 2020-11-25 at 11 56 06 AM

  2. I cannot set the message type:
    Screen Shot 2020-11-25 at 11 58 49 AM

All I can find in the drop-down list of Message Type are like "google.protobuf.*".

Expected behavior

I can find the message type correctly.

Originally created by @ihomway on GitHub (Nov 25, 2020). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/706 ### Proxyman version? **Version 2.13.0 (21300)** ### macOS Version? **Version 11.0.1 (20B29)** ### Steps to reproduce I have a photo file like this: ```protobuf syntax = "proto3"; package example.api.feeds.v2 import "google/protobuf/any.proto"; option go_package = "git.example.com/api/feeds/v2;v2"; option java_multiple_files = true; option java_package = "com.exaple.api.feeds.v2"; option objc_class_prefix = "FeedsV2"; service Feed { rpc list(Req) returns (Reply); } message Req { int32 page = 1; } message Reply { repeated ListItem items = 1; } message ListItem { string content = 1; } ``` And then I'm trying to parse the response which is encoded as protobuf. Here is the settings: 1. I add the photo file: ![Screen Shot 2020-11-25 at 11 56 06 AM](https://user-images.githubusercontent.com/9472797/100181450-38e0b000-2f15-11eb-82b8-c3662b76efa4.png) 2. I cannot set the message type: ![Screen Shot 2020-11-25 at 11 58 49 AM](https://user-images.githubusercontent.com/9472797/100181675-c91ef500-2f15-11eb-9ff8-c06568e53656.png) All I can find in the drop-down list of **Message Type** are like "google.protobuf.*". ### Expected behavior I can find the message type correctly.
Author
Owner

@NghiaTranUIT commented on GitHub (Nov 25, 2020):

Hi @ihomway

Look like Proxyman Protobuf couldn't parse your proto file properly since it is generated by gRPC protobuf.

If you import this file (add ; in syntax line, remove import line)

syntax = "proto3";

package example.api.feeds.v2;

service Feed {
    rpc list(Req) returns (Reply);
}

message Req {
    int32 page = 1;
}

message Reply {
    repeated ListItem items = 1;
}

message ListItem {
    string content = 1;
}

You can select the package, but I'm not sure if you're able to see the gRPC content. Let give it a try.

Screen Shot 2020-11-25 at 11 17 26
<!-- gh-comment-id:733453968 --> @NghiaTranUIT commented on GitHub (Nov 25, 2020): Hi @ihomway Look like Proxyman Protobuf couldn't parse your proto file properly since it is generated by gRPC protobuf. If you import this file (add ; in syntax line, remove import line) ``` syntax = "proto3"; package example.api.feeds.v2; service Feed { rpc list(Req) returns (Reply); } message Req { int32 page = 1; } message Reply { repeated ListItem items = 1; } message ListItem { string content = 1; } ``` You can select the package, but I'm not sure if you're able to see the gRPC content. Let give it a try. <img width="839" alt="Screen Shot 2020-11-25 at 11 17 26" src="https://user-images.githubusercontent.com/5878421/100182838-21eb8f00-2f10-11eb-956d-6992e32abec5.png">
Author
Owner

@NghiaTranUIT commented on GitHub (Nov 25, 2020):

Alternatively, there is a easy way to see gRPC traffic by using Atlantis. You can follow this doc: https://github.com/ProxymanApp/atlantis#2-my-app-use-grpc

By using Atlantis, you don't need to add Protobuf file anymore. but you have to add extra code to initial the request/response and sending to Atlantis. Finally, you can see the traffic on Proxyman as usual 👍

<!-- gh-comment-id:733454416 --> @NghiaTranUIT commented on GitHub (Nov 25, 2020): Alternatively, there is a easy way to see gRPC traffic by using Atlantis. You can follow this doc: https://github.com/ProxymanApp/atlantis#2-my-app-use-grpc By using Atlantis, you don't need to add Protobuf file anymore. but you have to add extra code to initial the request/response and sending to Atlantis. Finally, you can see the traffic on Proxyman as usual 👍
Author
Owner

@ihomway commented on GitHub (Nov 25, 2020):

Thank you for your help, I will try Atlantis and will let you if it works or not.

<!-- gh-comment-id:733494096 --> @ihomway commented on GitHub (Nov 25, 2020): Thank you for your help, I will try Atlantis and will let you if it works or not.
Author
Owner

@NghiaTranUIT commented on GitHub (Nov 25, 2020):

Yes, please let me know two scenarios if it works. Basically, Proxyman might only supports "normal" Protobuf message, not gRPC protobuf

<!-- gh-comment-id:733496546 --> @NghiaTranUIT commented on GitHub (Nov 25, 2020): Yes, please let me know two scenarios if it works. Basically, Proxyman might only supports "normal" Protobuf message, not gRPC protobuf
Author
Owner

@ben-xD commented on GitHub (Jan 12, 2021):

I have the same issue, and i am not using gRPC protobuf. Unfortunately, my project is quite complicated with lots of imports. I tried adding the specific protobuf which contains the message I want to decode. I also tried removing the import lines from this file, but still, same issue, the protobuf message I want is not available in drop down menu.

It is also quite tedious to add all the files manually to Protobuf Schema List. This because A.proto might import B.proto, which might import C.proto. It would be great if I can just select the directory which contains all the protobufs I use. If you look at protoc, it calls this the PROTO_PATH.

<!-- gh-comment-id:758814258 --> @ben-xD commented on GitHub (Jan 12, 2021): I have the same issue, and i am not using gRPC protobuf. Unfortunately, my project is quite complicated with lots of imports. I tried adding the specific protobuf which contains the message I want to decode. I also tried removing the import lines from this file, but still, same issue, the protobuf message I want is not available in drop down menu. It is also quite tedious to add all the files manually to Protobuf Schema List. This because A.proto might import B.proto, which might import C.proto. It would be great if I can just select the directory which contains all the protobufs I use. If you look at `protoc`, it calls this the `PROTO_PATH`.
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 13, 2021):

@ben-xD it might have the issue when parsing Protobuf that imports different Protobuf files.

For simple solution, can you use Atlantis to inspect the traffic 🤔 Tutorial here: https://github.com/ProxymanApp/atlantis#2-my-app-use-grpc

One of drawback is that we could not use any debugging tools.

<!-- gh-comment-id:759153352 --> @NghiaTranUIT commented on GitHub (Jan 13, 2021): @ben-xD it might have the issue when parsing Protobuf that imports different Protobuf files. For simple solution, can you use Atlantis to inspect the traffic 🤔 Tutorial here: https://github.com/ProxymanApp/atlantis#2-my-app-use-grpc One of drawback is that we could not use any debugging tools.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#703
No description provided.