Failed to find the metric name from alias

Please help me with my message. It worked fine in version 4.0.21. I’ve added timestamp to all metrics and removed alias for “Node Control/Rebirth” in the NBIRTH message.

The error appears after the first NDATA command.

SparkplugBPayloadHandler	28Nov2024 22:55:15	Failed to find the metric name from alias 0 for EdgeNode=Sparkplug Devices/TEST - requesting rebirth
SparkplugBPayloadHandler	28Nov2024 22:55:15	Failed to get the metric name from alias 0 for EdgeNode=Sparkplug Devices/TEST - requesting rebirth
SparkplugBPayloadHandler	28Nov2024 22:55:15	Failed to get the metric name for Sparkplug Devices/TEST: Metric [name=null, alias=0, timestamp=1732787715163, dataType=UInt8, isHistorical=null, isTransient=null, metaData=null, properties=null, value=15, isNull=false]

2024-11-28 22:55:10:183
Topic: spBv1.0/Sparkplug Devices/NBIRTH/TEST QoS: 0

{
    metrics: {
      0: {
        name: "Node Control/Current Second",
        alias: 0,
        timestamp: 1732787710138,
        datatype: 5,
        intValue: 0
},
      1: {
        name: "Node Control/Rebirth",
        timestamp: 1732787710138,
        datatype: 11,
        booleanValue: false
},
      2: {
        name: "bdSeq",
        timestamp: 1732787710170,
        datatype: 8,
        longValue: 0
}
},
    timestamp: 1732787710170,
    seq: 0
}

2024-11-28 22:55:15:182
Topic: spBv1.0/Sparkplug Devices/NDATA/TEST QoS: 0

{
    metrics: {
      0: {
        alias: 0,
        timestamp: 1732787715163,
        datatype: 5,
        intValue: 15
}
},
    timestamp: 1732787715163,
    seq: 1
}

2024-11-28 22:55:15:196
Topic: spBv1.0/Sparkplug Devices/NCMD/TEST QoS: 0

{
    metrics: {
      0: {
        name: "Node Control/Rebirth",
        timestamp: 1732787715166,
        datatype: 11,
        isNull: false,
        booleanValue: true
}
},
    timestamp: 1732787715166
}

Edit: it works if I rename the metric to “Current Second” instead of “Node Control/Current Second”. Seems like a bug.

This issue still happens in 4.0.25 (which is different to the behaviour in 4.0.21). Seems like any metric with name starts with “Node Control/” is not allowed in NDATA messages. Is this a bug or intended?

This sounds like it could be a regression. I suspect if you weren’t using aliasing, it would work. I’ve added an issue to our next sprint to investigate this further. I’ll get back to you with our results.