[GH-ISSUE #1239] Protobuf not working properly #1234

Open
opened 2026-03-03 19:49:30 +03:00 by kerem · 16 comments
Owner

Originally created by @kobe24u on GitHub (May 18, 2022).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1239

Originally assigned to: @NghiaTranUIT on GitHub.

Proxyman version? (Ex. Proxyman 1.4.3)

3.5.0

macOS Version? (Ex. mac 10.14)

Mac 12.3.1

Steps to reproduce

Hey I imported all the necessary .proto files but the response still contains a lot of numbers, and looks like it lacks some message types compared to Charles, my company advises us to use Charles with the protobuf descriptor file imported, just wondering do we have any plan to support protobuf descriptor file some day in the future? thanks

Expected behavior

Screenshots (optional)

Originally created by @kobe24u on GitHub (May 18, 2022). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1239 Originally assigned to: @NghiaTranUIT on GitHub. ### Proxyman version? (Ex. Proxyman 1.4.3) 3.5.0 ### macOS Version? (Ex. mac 10.14) Mac 12.3.1 ### Steps to reproduce Hey I imported all the necessary .proto files but the response still contains a lot of numbers, and looks like it lacks some message types compared to Charles, my company advises us to use Charles with the protobuf descriptor file imported, just wondering do we have any plan to support protobuf descriptor file some day in the future? thanks ### Expected behavior ### Screenshots (optional)
Author
Owner

@NghiaTranUIT commented on GitHub (May 20, 2022):

Thanks for the report @kobe24u.

Currently, Proxyman did support all common Google Protobuf types. It seems to be a bug if it didn't resolve the protobuf message properly. I guess using the protobuf descriptor file as Charles does might fix the problem (Currently, Proxyman imports .proto files).

I will open this ticket and soon implement it 👍

<!-- gh-comment-id:1133024745 --> @NghiaTranUIT commented on GitHub (May 20, 2022): Thanks for the report @kobe24u. Currently, Proxyman did support all common Google Protobuf types. It seems to be a bug if it didn't resolve the protobuf message properly. I guess using the protobuf descriptor file as Charles does might fix the problem (Currently, Proxyman imports .proto files). I will open this ticket and soon implement it 👍
Author
Owner

@kobe24u commented on GitHub (May 21, 2022):

thanks @NghiaTranUIT , that's great news!

<!-- gh-comment-id:1133523732 --> @kobe24u commented on GitHub (May 21, 2022): thanks @NghiaTranUIT , that's great news!
Author
Owner

@kobe24u commented on GitHub (Jun 18, 2022):

Hello @NghiaTranUIT hope you are doing well, just want to check is this still on your radar? My company is seriously considering buying a team license and widely adopt it, in our case, the only thing Proxyman lacks is this Protobuf descriptor file support, so we are really looking forward to a new version that supports this, just keen to know if there is any ETA of this feature? Or is there any difficulty adding this and currently no ETA?
Thank you and hope you are having a good day :)

<!-- gh-comment-id:1159355323 --> @kobe24u commented on GitHub (Jun 18, 2022): Hello @NghiaTranUIT hope you are doing well, just want to check is this still on your radar? My company is seriously considering buying a team license and widely adopt it, in our case, the only thing Proxyman lacks is this Protobuf descriptor file support, so we are really looking forward to a new version that supports this, just keen to know if there is any ETA of this feature? Or is there any difficulty adding this and currently no ETA? Thank you and hope you are having a good day :)
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 19, 2022):

Thanks for letting me know your situation. I did a quick fix and turn out the problem is how Proxyman implemented the Protobufs.

  • Proxyman uses Schema file
  • Charles Proxy uses FileDescriptorSet.

Using the schema file might have some problems, which you already mentioned (missing some column fields). To fix it, we have to drop the Schema file and support FileDescriptorSet.


The ETA is not set yet, since we have different high-priority tasks : <

<!-- gh-comment-id:1159756286 --> @NghiaTranUIT commented on GitHub (Jun 19, 2022): Thanks for letting me know your situation. I did a quick fix and turn out the problem is how Proxyman implemented the Protobufs. - Proxyman uses Schema file - Charles Proxy uses FileDescriptorSet. Using the schema file might have some problems, which you already mentioned (missing some column fields). To fix it, we have to drop the Schema file and support FileDescriptorSet. ---------- The ETA is not set yet, since we have different high-priority tasks : <
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 19, 2022):

I will reschedule it later after 2 release versions. See if I can support the FileDescriptorSet 👍

ETA ~ 2-3 months

<!-- gh-comment-id:1159756494 --> @NghiaTranUIT commented on GitHub (Jun 19, 2022): I will reschedule it later after 2 release versions. See if I can support the FileDescriptorSet 👍 ETA ~ 2-3 months
Author
Owner

@kobe24u commented on GitHub (Jun 20, 2022):

Thank you very much @NghiaTranUIT , really appreciate for the update and can't wait to try the new app 👍 😄

<!-- gh-comment-id:1160381982 --> @kobe24u commented on GitHub (Jun 20, 2022): Thank you very much @NghiaTranUIT , really appreciate for the update and can't wait to try the new app 👍 😄
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 22, 2022):

Hey @kobe24u let try this Beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.5.2_Support_Desc_file_for_Protobuf.dmg

I finally support the Protobuf descriptor file (*.desc) 👍

It's better than *.proto since you can import the desc with any order. You can also merge them all into a single desc file too.

Here is the script to generate a desc file (if you don't have one): https://docs.proxyman.io/advanced-features/protobuf#2.-protobuf-file-descriptor-.desc


Make sure you import your desc file into the Schema List without any error. If there is any error, please report to me 😄

<!-- gh-comment-id:1163048668 --> @NghiaTranUIT commented on GitHub (Jun 22, 2022): Hey @kobe24u let try this Beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.5.2_Support_Desc_file_for_Protobuf.dmg I finally support the Protobuf descriptor file (*.desc) 👍 It's better than *.proto since you can import the desc with any order. You can also merge them all into a single desc file too. Here is the script to generate a desc file (if you don't have one): https://docs.proxyman.io/advanced-features/protobuf#2.-protobuf-file-descriptor-.desc ------------------- Make sure you import your `desc` file into the Schema List without any error. If there is any error, please report to me 😄
Author
Owner

@kobe24u commented on GitHub (Jun 22, 2022):

Hi Nghia, thanks so much for this update, I just gave it a crack, and for
some reason it doesn't work as expected, I imported the .desc file and I
can see some console log,and when I try to view the response I can see the
message type has been filled in in the drop down menu which is great, I
selected the message type and press done, but got an error message saying
[ERROR] Invalid configuration. Could not find the type: type.googleapis.com/google.protobuf.Any, which is something I don't get
while using Charles, I've provided some screenshots for your reference.

Regards
[image: 2022-06-22_22-57-08.png][image: Screen Shot 2022-06-22 at
22.55.46.png][image: Screen Shot 2022-06-22 at 22.56.21.png]

On Wed, 22 Jun 2022 at 22:41, Nghia Tran @.***> wrote:

Hey @kobe24u https://github.com/kobe24u let try this Beta build:
https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.5.2_Support_Desc_file_for_Protobuf.dmg

I finally support the Protobuf descriptor file (*.desc) 👍

It's better than *.proto since you can import the desc with any order. You
can also merge them all into a single desc file too.

Here is the script to generate a desc file (if you don't have one):
https://docs.proxyman.io/advanced-features/protobuf#2.-protobuf-file-descriptor-.desc

Make sure you import your desc file into the Schema List without any
error. If there is any error, please report to me 😄


Reply to this email directly, view it on GitHub
https://github.com/ProxymanApp/Proxyman/issues/1239#issuecomment-1163048668,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AENFARFJHOQ2LUMOSCKNJHTVQMCXLANCNFSM5WIJ5ATA
.
You are receiving this because you were mentioned.Message ID:
@.***>

<!-- gh-comment-id:1163069211 --> @kobe24u commented on GitHub (Jun 22, 2022): Hi Nghia, thanks so much for this update, I just gave it a crack, and for some reason it doesn't work as expected, I imported the .desc file and I can see some console log,and when I try to view the response I can see the message type has been filled in in the drop down menu which is great, I selected the message type and press done, but got an error message saying `[ERROR] Invalid configuration. Could not find the type: type.googleapis.com/google.protobuf.Any`, which is something I don't get while using Charles, I've provided some screenshots for your reference. Regards [image: 2022-06-22_22-57-08.png][image: Screen Shot 2022-06-22 at 22.55.46.png][image: Screen Shot 2022-06-22 at 22.56.21.png] On Wed, 22 Jun 2022 at 22:41, Nghia Tran ***@***.***> wrote: > Hey @kobe24u <https://github.com/kobe24u> let try this Beta build: > https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.5.2_Support_Desc_file_for_Protobuf.dmg > > I finally support the Protobuf descriptor file (*.desc) 👍 > > It's better than *.proto since you can import the desc with any order. You > can also merge them all into a single desc file too. > > Here is the script to generate a desc file (if you don't have one): > https://docs.proxyman.io/advanced-features/protobuf#2.-protobuf-file-descriptor-.desc > ------------------------------ > > Make sure you import your desc file into the Schema List without any > error. If there is any error, please report to me 😄 > > — > Reply to this email directly, view it on GitHub > <https://github.com/ProxymanApp/Proxyman/issues/1239#issuecomment-1163048668>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AENFARFJHOQ2LUMOSCKNJHTVQMCXLANCNFSM5WIJ5ATA> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> >
Author
Owner

@kobe24u commented on GitHub (Jun 22, 2022):

Just attached the screenshots for your reference. thanks

<!-- gh-comment-id:1163077870 --> @kobe24u commented on GitHub (Jun 22, 2022): Just attached the screenshots for your reference. thanks
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 22, 2022):

Thanks for quick response @kobe24u . If you don't mind, please export the Protobuf request as a ProxymanLog, and the universallist.desc file to support@proxyman.io (Your data is protected and doesn't share to any 3rd-party)

We'd like to investigate what the problem is and get back to you soon/

<!-- gh-comment-id:1163172297 --> @NghiaTranUIT commented on GitHub (Jun 22, 2022): Thanks for quick response @kobe24u . If you don't mind, please export the Protobuf request as a ProxymanLog, and the universallist.desc file to support@proxyman.io (Your data is protected and doesn't share to any 3rd-party) We'd like to investigate what the problem is and get back to you soon/
Author
Owner

@kobe24u commented on GitHub (Jun 22, 2022):

Ok @NghiaTranUIT I think I fixed the issue myself, if we open Charles, we can it has already imported google.protobuf.desc for us, and I think that's something Proxyman lacks, I've seen the description saying Proxyman automatically imports all common types from Google Protobuf, such as Timestamp, Struct, Value, Enum, Method, etc.
But I think it does not work properly,
2022-06-23_08-39-41

I initially got the error saying [ERROR] Invalid configuration. Could not find the type: type.googleapis.com/google.protobuf.Any, so I Downaded the Protobuf Buffers V21.1 source code from here, it does not include the descriptor file, so I have to generate one myself, and for some reason, the command you provided does not work, see screenshot attached below, I have to generate one by one, glad in my case, I only need any.proto and wrappers.proto,
2022-06-23_08-41-20

but finally I got it working, I would be very happy if the google common types can be supported properly so we don't have to import ourselves, also worth checking if the descriptor file generator command is working on your side

Cheers

<!-- gh-comment-id:1163726027 --> @kobe24u commented on GitHub (Jun 22, 2022): Ok @NghiaTranUIT I think I fixed the issue myself, if we open Charles, we can it has already imported `google.protobuf.desc` for us, and I think that's something Proxyman lacks, I've seen the description saying `Proxyman automatically imports all common types from Google Protobuf, such as Timestamp, Struct, Value, Enum, Method, etc.` But I think it does not work properly, <img width="540" alt="2022-06-23_08-39-41" src="https://user-images.githubusercontent.com/18501700/175166394-ab09fb38-ea4d-4d8c-ae0c-8c3b598779e4.png"> I initially got the error saying `[ERROR] Invalid configuration. Could not find the type: type.googleapis.com/google.protobuf.Any`, so I Downaded the `Protobuf Buffers V21.1` source code from [here](https://github.com/protocolbuffers/protobuf/releases/tag/v21.1), it does not include the descriptor file, so I have to generate one myself, and for some reason, the command you provided does not work, see screenshot attached below, I have to generate one by one, glad in my case, I only need `any.proto` and `wrappers.proto`, <img width="1380" alt="2022-06-23_08-41-20" src="https://user-images.githubusercontent.com/18501700/175167087-e3e2185d-97a6-4c90-a0c8-5a9eed112984.png"> but finally I got it working, I would be very happy if the google common types can be supported properly so we don't have to import ourselves, also worth checking if the descriptor file generator command is working on your side Cheers
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 23, 2022):

Thanks for your investigation. I help me a lot 🙌

Speaking of *.proto, it looks like the current directory must be at /Users/vinnie.liu/Desktop/input. To fix it, it's:

protoc --descriptor_set_out=output.desc --include_imports -I=/Users/<your_name>/Desktop/input /Users/<your_name>/Desktop/input/*.proto

Ref: https://stackoverflow.com/a/24965532/3127477


I will try to reproduce the Unknown issue 👍

<!-- gh-comment-id:1163824868 --> @NghiaTranUIT commented on GitHub (Jun 23, 2022): Thanks for your investigation. I help me a lot 🙌 Speaking of `*.proto`, it looks like the current directory must be at `/Users/vinnie.liu/Desktop/input`. To fix it, it's: ``` protoc --descriptor_set_out=output.desc --include_imports -I=/Users/<your_name>/Desktop/input /Users/<your_name>/Desktop/input/*.proto ``` Ref: https://stackoverflow.com/a/24965532/3127477 ----------- I will try to reproduce the Unknown issue 👍
Author
Owner

@kobe24u commented on GitHub (Jun 23, 2022):

➜  input protoc --descriptor_set_out=google_protobuf.desc --include_imports -I=/Users/vinnie.liu/Desktop/input /Users/vinnie.liu/Desktop/input/*.proto
google/protobuf/any.proto:154:10: "google.protobuf.Any.type_url" is already defined in file "any.proto".
google/protobuf/any.proto:157:9: "google.protobuf.Any.value" is already defined in file "any.proto".
google/protobuf/any.proto:125:9: "google.protobuf.Any" is already defined in file "any.proto".
google/protobuf/type.proto:35:1: Import "google/protobuf/any.proto" was not found or had errors.
google/protobuf/type.proto:178:3: "google.protobuf.Any" seems to be defined in "any.proto", which is not imported by "google/protobuf/type.proto".  To use it here, please add the necessary import.
api.proto:36:1: Import "google/protobuf/type.proto" was not found or had errors.
api.proto:63:12: "Option" is not defined.
api.proto:96:3: "Syntax" is not defined.
api.proto:117:12: "Option" is not defined.
api.proto:120:3: "Syntax" is not defined.

hmmmm, still not working properly, but yes it will be good if the google common types are already there. :semi

<!-- gh-comment-id:1163829429 --> @kobe24u commented on GitHub (Jun 23, 2022): ``` ➜ input protoc --descriptor_set_out=google_protobuf.desc --include_imports -I=/Users/vinnie.liu/Desktop/input /Users/vinnie.liu/Desktop/input/*.proto google/protobuf/any.proto:154:10: "google.protobuf.Any.type_url" is already defined in file "any.proto". google/protobuf/any.proto:157:9: "google.protobuf.Any.value" is already defined in file "any.proto". google/protobuf/any.proto:125:9: "google.protobuf.Any" is already defined in file "any.proto". google/protobuf/type.proto:35:1: Import "google/protobuf/any.proto" was not found or had errors. google/protobuf/type.proto:178:3: "google.protobuf.Any" seems to be defined in "any.proto", which is not imported by "google/protobuf/type.proto". To use it here, please add the necessary import. api.proto:36:1: Import "google/protobuf/type.proto" was not found or had errors. api.proto:63:12: "Option" is not defined. api.proto:96:3: "Syntax" is not defined. api.proto:117:12: "Option" is not defined. api.proto:120:3: "Syntax" is not defined. ``` hmmmm, still not working properly, but yes it will be good if the google common types are already there. :semi
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 23, 2022):

@kobe24u let try this build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.5.2_Update_new_google_desc.dmg

I've updated all google pro files again. Hopefully, it fixes your case.

<!-- gh-comment-id:1163995200 --> @NghiaTranUIT commented on GitHub (Jun 23, 2022): @kobe24u let try this build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.5.2_Update_new_google_desc.dmg I've updated all google pro files again. Hopefully, it fixes your case.
Author
Owner

@kobe24u commented on GitHub (Jun 23, 2022):

@NghiaTranUIT You are a legend! It's working now! Thanks so much for getting this fixed so quickly!

<!-- gh-comment-id:1164007614 --> @kobe24u commented on GitHub (Jun 23, 2022): @NghiaTranUIT You are a legend! It's working now! Thanks so much for getting this fixed so quickly!
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 23, 2022):

Awesome. I will wrap up and ship it in the next release soon 👍

<!-- gh-comment-id:1164044153 --> @NghiaTranUIT commented on GitHub (Jun 23, 2022): Awesome. I will wrap up and ship it in the next release soon 👍
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#1234
No description provided.