ERROR: empty protobuf packet

ERROR: empty protobuf packet

by Sacha Adrien Bartholmé -
Number of replies: 1


When my binary sends an UDP packet to the provided test binary via the Gossip Port, the test binary prints "ERROR: empty protobuf packet".

Here are the steps to reproduce the error:

  1. Start the test binary with  ./hw0 -UIPort=10000 -gossipAddr= -name=nodeA
  2. In a new shell, start netcat with nc -u 5000
  3. In the netcat subshell, type {"originPeerName":"sacha", "relayPeerAddr":"", "contents":"salut"} where 44825 is the port of the client
  4. The test binary outputs 

    ERROR: empty protobuf packet PEERS

    When I do the same with my own binary I do not have this problem.

In reply to Sacha Adrien Bartholmé

Re: ERROR: empty protobuf packet

by Aaron Joos Lippeveldts -

You're sending a bare SimpleMessage, instead of one wrapped in a SimplePacket (see packets.go).

It works if you instead do

nc -u 5000