Closed Xyzcancer closed 3 years ago
Without actual runnable reproduction steps or a very detailed description we can't really help you.
The response comes from the server, so there must be something that you are not doing as server expects. Hard to know what exactly without knowing what you are doing and what server expects.
I/flutter (10265): gRPC Error (code: 15, codeName: DATA_LOSS, message: Error parsing response, details: null, rawResponse: null) #0 _FieldSet._meta (package:protobuf/src/protobuf/field_set.dart:80:36)
I/flutter (10265): #1 _FieldSet._nonExtensionInfoByIndex (package:protobuf/src/protobuf/field_set.dart:155:52)
I/flutter (10265): #2 FieldSet.$get (package:protobuf/src/protobuf/field_set.dart:423:24)
I/flutter (10265): #3 PbMap._mergeEntry (package:protobuf/src/protobuf/pb_map.dart:105:31)
I/flutter (10265): #4 _mergeFromCodedBufferReader (package:protobuf/src/protobuf/coded_buffer.dart:189:14)
I/flutter (10265): #5 GeneratedMessage.mergeFromCodedBufferReader (package:protobuf/src/protobuf/generated_message.dart:179:5)
I/flutter (10265): #6 CodedBufferReader.readMessage (package:protobuf/src/protobuf/coded_buffer_reader.dart:101:13)
I/flutter (10265): #7 _mergeFromCodedBufferReader (package:protobuf/src/protobuf/coded_buffer.dart:181:15)
I/flutter (10265): #8 GeneratedMessage.mergeFromCodedBufferReader (package:protobuf/src/protobuf/generated_message.dart:179:5)
I/flutter (10265): #9 CodedBufferReader.readMessage (package:protobuf/src/protobuf/coded_buffer_reader.dart:101:13)
I/flutter (10265): #10 _mergeFromCodedBufferReader (package:protobuf/src/protobuf/coded_buffer.dart:122:15)
I/flutter (10265): #11 GeneratedMessage.mergeFromBuffer (package:protobuf/src/protobuf/generatedmessage.dart:194:5)
I/flutter (10265): #12 new InitResult.fromBuffer (package:vzaimno/api/grpc/GatewayService.pb.dart:411:128)
I/flutter (10265): #13 GatewayServiceClient.$init.
this is messages
message PollValue{ string windowId = 1; map<string, string> form = 2; }
message PersonPollValues{ int64 coBorrowerId = 1; repeated PollValue dbValues = 2; }
"Poll": { "CoBorrowerId": 0, "DbValues": [ { "WindowId": "personalData", "Form": { "lastName": "РЇРЅ", "firstName": "РҐС…", "middleName": "", "email": "cccc@xxx.me", "birthDate": "1622083842", "gender": "male", "childrensCount": "15", "married": "yes", "oldLastName": "РҐ" } }, { "WindowId": "pasportData", "Form": { "issueDate": "-1028732400", "serial": "9885", "number": "884258", "policeDepartmentCode": "998-558", "policeDepartment": "Р“РРњР РџРџРџ Р РћР Р Р Рњ", "birthPlace": "Р–РѕРїР°", "passportAddress": "Р РјРїРїРјР°", "factAddressMatch": "yes", "city": "РћС‚ Прмсапс" } }, { "WindowId": "contacts", "Form": { "contact_1": "{\"contactName\":\"РЇРЅ Го\",\"contactPhone\":\"+7(955)888-85-88\",\"contactType\":\"acquaintance\"}", "contact_2": "{\"contactPhone\":\"+7(900)455-58-76\",\"contactName\":\"Аркадий Р¤\",\"contactType\":\"daughter\"}", "contact_3": "{\"contactPhone\":\"+7(953)542-23-51\",\"contactName\":\"Алексей Р‘\",\"contactType\":\"daughter\",\"isLiveTogether\":\"true\"}" } }, { "WindowId": "privateProperty", "Form": { "flat": "true", "square": "2228", "address": "РћС‚ РњРёРјРјРјРј", "car": "true", "carVin": "РћРёРїРїРїРјРїvucyyc", "carNumber": "РћРћРћ РРїСЂРјРјРј", "carYear": "1996", "carProducer": "РњСЂРєР°", "carModel": "Мммпролоо" } }, { "WindowId": "incomeSources", "Form": { "incomeSource": "[{\"type\":\"salary\",\"position\":\"Моляр\",\"organizationName\":\"РћРћРћ молярия\",\"organizationType\":\"production\",\"organizationAddress\":\"Зуева кукуева\",\"organizationPhone\":\"+7(228)228-22-82\",\"organizationManagerName\":\"Р’.Рђ.Снеебет\",\"organizationManagerPhone\":\"+7(398)525-88-55\",\"experience\":\"99\",\"officialIncomeValue\":\"228\",\"hasSalaryProof\":\"true\"}]" } }, { "WindowId": "pastLoans", "Form": { "lastTwoYearsLoans": "yes", "sum": "66", "currentLoans": "yes", "wasOverdue": "no" } }, { "WindowId": "cardDetails", "Form": { "cardNumber": "8605 0238 6060 6683", "dueTo": "12/45", "ownerName": "Y T" } }, { "WindowId": "uploadDocuments", "Form": { "vzaimnodocmain": "47dea20d-73e0-4f23-aadd-fbc411947859", "vzaimnodocregistration": "2c92ca07-63ee-42d7-9537-80707a8614aa", "vzaimnoselfi": "34894ada-e2c4-48f7-8d4b-84ab6d9fe95c", "vzaimnodebitcard": "93b5cc33-1c93-48dc-85f1-2374f9194712" } } ] },
as you can see value of field "middleName" is empty string, that is cause of exception
@mraleph take another look, please
@Xyzcancer can you give me the version of the protobuf
package that you are using from pubspec.lock
?
@mraleph
protobuf: dependency: "direct main" description: name: protobuf url: "https://pub.dartlang.org" source: hosted version: "2.0.0"
It's a bug in the protobuf
package from what I can see. empty string is special because it is a default value for string type - which means it is not serialized into the message, but this case (when entry has a missing key or value) is not handled correctly: PbMap._mergeEntry
creates a fake _FieldSet
to deserialize an entry and things break when entryFieldSet.meta
is called to compute default value.
I see that somebody already filed a similar issue: https://github.com/dart-lang/protobuf/issues/508 against the package.
Unfortunately protobuf
package does not have an active maintainer at the moment, which means it is unlikely that the issue will be resolved very timely :( /cc @mit-mit
I'm getting gRPC Error (code: 15, codeName: DATA_LOSS, message: Error parsing response, details: null, rawResponse: null)
version 3.0.0
Repro steps
Expected result: Response parsed without errors
Actual result: error code 15 DATA_LOSS
Details