Arduino + Dragino Shield v1.4 in Chirpstack v4.0

I had this issue when I had problems with my decoder, which resulted in the error that you mention in the other thread (Cannot see the decoder result in "Events"

To be more specific - the decoder was working in general, but when there was mesage without data (data: null) the decoder failed without showing an error in UI, but the chirpstack::api::internal: Reading event-log returned error: Cannot serialize NaN as google.protobuf.Value.number_value error appeared in journal and kept repeating in 1s intervals.

So I added a check which only started decoder if there was actual data:

// v3 to v4 compatibility wrapper
function decodeUplink(input) {
    // Check if bytes array is not empty:
    if ( input.bytes.length > 0 ) {	
        return { 
            data: Decode(input.fPort, input.bytes, input.variables)
        };   
    }
}