Comments (4)
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.
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.
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.
For future, are you able to provide the line number with the error?
from grpc-tools.
Related Issues (20)
- I DO NOT KNOW THAT
- Replaying requests without proto definitions HOT 4
- how to use with docker HOT 3
- Only the first packet was intercepted
- grpc-replay: use the timestamp during replay
- grpc-replay: print response received HOT 4
- proxy error: runtime error: index out of range [6] with length 6 HOT 1
- grpc-dump: Use with iOS HOT 2
- ResourceExhausted on large payload HOT 1
- grpc-dump feature: dump the raw bytes when response can not be unmarshalled
- Cannot load proto files HOT 5
- Listen to different interfaces capability HOT 3
- grpc-proxy HOT 17
- grpc-dump prints warning if nested message is null (not set)
- grpc-dump outputs nothing if message contains google.protobuf.Any
- grpc-dump prints warning if message definition contains a map
- grpc-dump doesn't show error/status details
- grpc-go metadata example hangs when running though grpc-dump
- grpc-dump fails to JSON encode google.protobuf.Any fields embedding proto messages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grpc-tools.