PB協議報錯 it is missing required fields: (cannot determine missing fields for lite message)
在測試PB協議的過程中出現,it is missing required fields: (cannot determine missing fields for lite message)。
查詢資料說:required 型別的欄位,必須設定值,否則,在解析的時候,會有這個提示。
pb協議在傳送的時候,會根據結構中定義的欄位,把設定值的欄位打包到資料包中,然後傳送出去。在接收方,接收到資料,然後去解析,這樣對於required型別的欄位,如果沒有設定值,那資料包裡肯定是沒有的,那麼,就會報錯。
為了驗證,覺得還是抓包一下比較靠譜。
抓包資料顯示,如果沒有設定值的required型別,確實沒有,但是在解析的時候就報此錯誤。
然後,在傳送的時候,加上值,再測試,就不報錯了。
在開始的時候,給出的資料也是有問題,是一串超過正常包長度的資料,這個可能是接收資料快取沒有清空,或者收到了別的資料,這是另外一個問題了,同樣需要解決的。
相關文章
- 安裝sql server managerment studio報錯"The instance id is required but it is missing"SQLServerUI
- shell指令碼報錯:[: missing `]‘指令碼
- FIELDS TERMINATED BY WHITESPACE & FIELDS TERMINATED BY x'09'
- FIELDS TERMINATED BY WHITESPACE & FIELDS TERMINATED BY x'09' 區別
- Java報錯:Missing ServletWebServerFactory bean,如何解決JavaServletWebServerBean
- elasticsearch中使用runtime fieldsElasticsearch
- LeetCode:Missing Number And First Missing PositiveLeetCode
- Request Headers 的其它 fields 值Header
- git clone 報錯 “URL using bad/illegal format or missing URL“GitORM
- SAP對物料做上架報錯 :Definition of totals level is missing for storage type
- 報錯:Missing type map configuration or unsupported mappingAPP
- SAP AET fields的自定義行為
- Missing Subsequence Sum
- ntldr is missing怎麼解決? ntldr is missing怎麼回事?
- Python成功解決TypeError: __init__() missing 1 required positional argument: ‘comment‘PythonErrorUI
- Patch 8430622: Required component(s) missing : [ oracle.sysman.top.omsUIOracle
- First Missing Positive【hard】
- 報錯:npm ERR! missing script: serve npm ERR! A complete log of this run can be found in:NPM
- 在elasticsearch中簡單的使用script_fieldsElasticsearch
- gerrit "missing Change-Id"
- your Android sdk is missingAndroid
- NILDR is Missing解決方案
- B. Missing Subsequence Sum
- Missing required icon file. The bundle does not contain an app icon for iPhone / iPod Touch of ex...UIAIAPPiPhone
- Double-check idiom for lazy initialization of instance fields
- Reference Pivot Fields and Pivot Items in an Excel Pivot Table, using VBAExcel
- 修改sys密碼報錯:ORA-01994: Password file missing or disabled密碼
- Leetcode First Missing PositiveLeetCode
- Leetcode-Missing RangesLeetCode
- 【Python】 Missing parentheses in call to 'print'Python
- 過濾器攔截器攔截了request後,controller的@RequestBody 無法獲取request內容,報錯 Required request body is missing 的根源過濾器ControllerUI
- odoo ORM研究3 - odoo fields常用的欄位屬性OdooORM
- POJ 3254 Corn Fields:網格密鋪類 狀壓dp
- Spark 異常:Trying to write more fields than contained in rowSparkAI
- [Cexpert-002] How to assign default values to fields/members of a struct?Struct
- Laravel 8 路由模組新增 missing 方法Laravel路由
- Leetcode 41 First Missing PositiveLeetCode
- Leetcode-First Missing PositiveLeetCode