You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I discovered, that a buggy JSON encoder for enqueuing dowlinks brings down the complete application server. The RPC for encoding the base64 payload failes and crashes the server permanently.
Thanks for reporting. I've been able to reproduce this. The issue is not the codec VM itself but the error that is returned. A Go map is used to map internal errors to gRPC error codes (.e.g. map[error]codes.Code, where codes.Code is the gRPC error code).
This works for most errors, but the error returned in this case, parser.ErrorList is a slice and this type is not "hashable". I think the following check needs to be added:
...// Some error values can not be hashed and return a runtime error:// https://github.com/brocaar/chirpstack-application-server/issues/631k:=reflect.TypeOf(cause).Kind()
ifk==reflect.Slice {
returngrpc.Errorf(codes.Unknown, cause.Error())
}
...
I discovered, that a buggy JSON encoder for enqueuing dowlinks brings down the complete application server. The RPC for encoding the base64 payload failes and crashes the server permanently.
Here is the reqpective log entry:
After fixing the payload codec (in device-profile > codec) the call succeed and the server survived.
The text was updated successfully, but these errors were encountered: