GithubHelp home page GithubHelp logo

Comments (4)

bradleyjkemp avatar bradleyjkemp commented on May 13, 2024

Sounds like the JSON got corrupted somehow. Are you able to share a file that fails with this error?

If not, how are you saving the file to be replayed? Perhaps we can work out if some extra unexpected data is ending up in there

from grpc-tools.

MikaelFerland avatar MikaelFerland commented on May 13, 2024

I did that grpc-dump --port=8082 > start_core1.dump
I let the client doing is request and when it's done I ended the dump with Ctrl+c
All requests are starting with { and ending with }

I tried to replay only two lines of it and it blocked at the first request:
{"service":"gRPCService.Service_gRPC","method":"ExecuteCommand","messages":[{"message_origin":"client","raw_message":"ClB7IlNlcnZlclB1Ymxpc2hpbmdQb3J0Ijo1NjEwMCwiQnJvYWRjYXN0VHlwZSI6MSwiQ29tbWFuZFR5cGUiOiJSZWdpc3RlckNvbW1hbmQifQ==","message":{"1":"{"ServerPublishingPort":56100,"BroadcastType":1,"CommandType":"RegisterCommand"}"},"timestamp":"2020-11-26T11:30:33.298248-05:00"},{"message_origin":"server","raw_message":"CAEaBWVtcHR5IjIKKHR5cGUuZ29vZ2xlYXBpcy5jb20vZ1JQQ1NlcnZpY2UuVmFyaWFibGUSBgoEbnVsbA==","message":{"1":"1","3":"empty","4":{"1":"type.googleapis.com/gRPCService.Variable","2":{"1":"null"}}},"timestamp":"2020-11-26T11:30:35.7582456-05:00"}],"metadata":{":authority":["192.168.0.10:1234"],"accept-encoding":["identity,gzip"],"content-type":["application/grpc"],"grpc-accept-encoding":["identity,deflate,gzip"],"user-agent":["grpc-csharp/2.33.1 grpc-c/13.0.0 (windows; chttp2)"],"via":["HTTP/2.0 127.0.0.1:1234"]},"metadata_response_headers":{"content-type":["application/grpc"],"date":["Thu, 26 Nov 2020 16:30:35 GMT"],"server":["Kestrel"]},"metadata_response_trailers":{}}
{"service":"gRPCService.Service_gRPC","method":"ExecuteQuery","messages":[{"message_origin":"client","raw_message":"CiR7IlF1ZXJ5VHlwZSI6IkdldFNlcnZlcklvTGlzdFF1ZXJ5In0=","message":{"1":"{"QueryType":"GetServerIoListQuery"}"},"timestamp":"2020-11-26T11:30:36.2532521-05:00"},{"message_origin":"server","raw_message":"CAEiRwoodHlwZS5nb29nbGVhcGlzLmNvbS9nUlBDU2VydmljZS5WYXJpYWJsZRIbChl7IklvTGlzdCI6W10sIlZlcnNpb24iOjB9","message":{"1":"1","4":{"1":"type.googleapis.com/gRPCService.Variable","2":{"1":"{"IoList":[],"Version":0}"}}},"timestamp":"2020-11-26T11:30:36.3372486-05:00"}],"metadata":{":authority":["192.168.0.10:1234"],"accept-encoding":["identity,gzip"],"content-type":["application/grpc"],"grpc-accept-encoding":["identity,deflate,gzip"],"user-agent":["grpc-csharp/2.33.1 grpc-c/13.0.0 (windows; chttp2)"],"via":["HTTP/2.0 127.0.0.1:1234"]},"metadata_response_headers":{"content-type":["application/grpc"],"date":["Thu, 26 Nov 2020 16:30:36 GMT"],"server":["Kestrel"]},"metadata_response_trailers":{}}

from grpc-tools.

bradleyjkemp avatar bradleyjkemp commented on May 13, 2024

Ah I see the problem:

"message":{"1":"{"ServerPublishingPort":56100,"BroadcastType":1,"CommandType":"RegisterCommand"}"}

This isn't valid JSON because the quotes aren't being escaped inside the string. It should be more like:

"message":{"1":"{\"ServerPublishingPort\":56100,\"BroadcastType\":1,\"CommandType\":\"RegisterCommand\"}"}

Really weird that that's happened. I'll have a look at what could be causing it within grpc-dump

from grpc-tools.

MikaelFerland avatar MikaelFerland commented on May 13, 2024

For future, are you able to provide the line number with the error?

from grpc-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.