[GH-ISSUE #1479] [Bug Report] Protobuf boolean field appears as number in protobuf parsed view #1472

Open
opened 2026-03-03 19:51:47 +03:00 by kerem · 5 comments
Owner

Originally created by @jjmean2 on GitHub (Dec 29, 2022).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1479

Originally assigned to: @NghiaTranUIT on GitHub.

Description

I'm not sure, if it's only for me or not, but in my case, every boolean field of protobuf message appears as number.
So if the value is true, it shows as 1 (in JSON form of protobuf parsed value), and if the value is false, it is not shown entirely (because it is default value which doesn't include an actual value in packet?)

Steps to Reproduce

  1. Set Any protobuf message that has a boolean field in Protobuf Rules.
  2. Check that field value in protobuf parsed view in request or response tab.

Current Behavior

Boolean field value appears as number. (1 or nothing)

Expected Behavior

Boolean field value appears as boolean. (true or nothing)

Environment

  • App version: Proxyman 3.15.0
  • macOS version: macOS Ventura 13.1
Originally created by @jjmean2 on GitHub (Dec 29, 2022). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1479 Originally assigned to: @NghiaTranUIT on GitHub. ## Description I'm not sure, if it's only for me or not, but in my case, every boolean field of protobuf message appears as number. So if the value is `true`, it shows as `1` (in JSON form of protobuf parsed value), and if the value is `false`, it is not shown entirely (because it is default value which doesn't include an actual value in packet?) ## Steps to Reproduce 1. Set Any protobuf message that has a boolean field in Protobuf Rules. 2. Check that field value in protobuf parsed view in request or response tab. ## Current Behavior Boolean field value appears as number. (1 or nothing) ## Expected Behavior Boolean field value appears as boolean. (true or nothing) ## Environment - App version: Proxyman 3.15.0 - macOS version: macOS Ventura 13.1
Author
Owner

@NghiaTranUIT commented on GitHub (Dec 29, 2022):

Just wondering: What is the field type (described in protoc/desc file)? Is it Int or Boolean?

<!-- gh-comment-id:1367090243 --> @NghiaTranUIT commented on GitHub (Dec 29, 2022): Just wondering: What is the field type (described in protoc/desc file)? Is it Int or Boolean?
Author
Owner

@jjmean2 commented on GitHub (Dec 29, 2022):

@NghiaTranUIT

I'm not familiar with proto.desc file format, so I'm not sure if I check correctly. But when I check, I find it is 'bool'. (the value of field.type is 8)

I refer to code of following link.

to read desc file.
https://gist.github.com/justinfx/c2b1458ea2ddab8faf635cacd140ad2d

to find which type has value 8.
https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.descriptor#FieldDescriptor

<!-- gh-comment-id:1367188437 --> @jjmean2 commented on GitHub (Dec 29, 2022): @NghiaTranUIT I'm not familiar with proto.desc file format, so I'm not sure if I check correctly. But when I check, I find it is 'bool'. (the value of field.type is 8) I refer to code of following link. to read desc file. https://gist.github.com/justinfx/c2b1458ea2ddab8faf635cacd140ad2d to find which type has value 8. https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.descriptor#FieldDescriptor
Author
Owner

@siddarthkalra commented on GitHub (Nov 17, 2024):

@NghiaTranUIT any word on this bug fix or a possible workaround? I am seeing the same issue on Proxyman Version 5.10.0 (51000) | macOS: Version 14.5 (Build 23F79) when inspecting protobuf responses. In particular, this is quite limiting when trying to use the map local tool as all bools are being converted to integers.

For me bools are shown as:

"blockingInterstitials": {
    "bool_1": 0,
    "bool_2": 0
},

when they should be shown as:

"blockingInterstitials": {
    "bool_1": false,
    "bool_2": false
},
<!-- gh-comment-id:2481514764 --> @siddarthkalra commented on GitHub (Nov 17, 2024): @NghiaTranUIT any word on this bug fix or a possible workaround? I am seeing the same issue on `Proxyman Version 5.10.0 (51000) | macOS: Version 14.5 (Build 23F79)` when inspecting protobuf responses. In particular, this is quite limiting when trying to use the map local tool as all bools are being converted to integers. For me bools are shown as: ``` "blockingInterstitials": { "bool_1": 0, "bool_2": 0 }, ``` when they should be shown as: ``` "blockingInterstitials": { "bool_1": false, "bool_2": false }, ``` ```
Author
Owner

@NghiaTranUIT commented on GitHub (Nov 18, 2024):

not yet, but I will include it in the next 2 release 👍

<!-- gh-comment-id:2481733977 --> @NghiaTranUIT commented on GitHub (Nov 18, 2024): not yet, but I will include it in the next 2 release 👍
Author
Owner

@jjmean2 commented on GitHub (Nov 19, 2024):

Exciting news! Thanks for your concern

<!-- gh-comment-id:2485421966 --> @jjmean2 commented on GitHub (Nov 19, 2024): Exciting news! Thanks for your concern
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#1472
No description provided.