Protobuf encode/decode into JSON

Hello guys,
I am trying to convert Proto format into JSON using the protobuf node. However, I am getting the error Illegal wire format, protobuf file not ready, Wire format is invalid: Error: illegal buffer.
Any idea on how to solve the issue? I have even tried using the proto file from the node red home folder.

Can you share the protobuf file & provide more details please...

What versions of...

  • node js
  • node-red
  • contrib-node version (and a link to the node in the flows library please)
[
    {
        "id": "9ad6c55526025b16",
        "type": "tab",
        "label": "Flow 2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "1a96b43a34113a0b",
        "type": "decode",
        "z": "9ad6c55526025b16",
        "name": "",
        "protofile": "358ad92b53a6f5b8",
        "protoType": "CallOutput",
        "x": 510,
        "y": 250,
        "wires": [
            [
                "35b44bf2933d36b3"
            ]
        ]
    },
    {
        "id": "9b39862e1abf6a4d",
        "type": "amqp-in",
        "z": "9ad6c55526025b16",
        "name": "",
        "broker": "ac29e6db094b44c5",
        "prefetch": 0,
        "noAck": true,
        "exchangeName": "Televic.Contracts.NurseCalls.CallInput",
        "exchangeType": "headers",
        "exchangeRoutingKey": "",
        "exchangeDurable": true,
        "queueName": "CareCom.CallManager_CallOutput_Object",
        "queueExclusive": false,
        "queueDurable": true,
        "queueAutoDelete": false,
        "headers": "{}",
        "x": 225,
        "y": 225,
        "wires": [
            [
                "1a96b43a34113a0b"
            ]
        ]
    },
    {
        "id": "35b44bf2933d36b3",
        "type": "debug",
        "z": "9ad6c55526025b16",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 720,
        "y": 275,
        "wires": []
    },
    {
        "id": "358ad92b53a6f5b8",
        "type": "protobuf-file",
        "protopath": "C:/Televic.AQURA/Televic.AQURA.Contracts/NurseCall/call",
        "watchFile": true
    },
    {
        "id": "ac29e6db094b44c5",
        "type": "amqp-broker",
        "name": "",
        "host": "localhost",
        "port": "5672",
        "vhost": "",
        "tls": false,
        "credsFromSettings": false,
        "credentials": {}
    }
]

Here's my code and I'm using Nodered v2.1.1 and the contrib node version is protobuf fixed 1.0.3. For the protobuf file I provide the path C:\Users\S_SB.node-red\call.proto

If you don't provide this proto file I cannot test it.

Similarly if you don't provide some sample data I cannot test it (I don't use amqp)

To provide some sample data with your flow simply use the copy value button on any debug message then paste the copied value into an inject node. This creates a stand-alone demo flow for people who do not use the same nodes as you you and do not have access to your amqp data / devices


P.s.: if you don't press the reply button attach to my post, I don't get a notification. Pressing the reply at the end of the thread does not notify me.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.