gRPC Error - Application Create


#1

gRPC Application API Create (Error)

GitHub Issue: https://github.com/brocaar/lora-app-server/issues/304

Creating a new Application via gRPC fails with Unknown UUID on Client and Server.

Proto: https://github.com/brocaar/lora-app-server/blob/master/api/service-profile.proto

List Service Profiles (Get the serviceProfileID from id below)

 { id: '39ebfc1a-ab0a-4f46-9a58-a3d433c7a2ca',
       name: 'EU868-Service-Profile',
       organization_id: '1',
       network_server_id: '1',
       created_at: [Object],
       updated_at: [Object] }

Proto: https://github.com/brocaar/lora-app-server/blob/master/api/application.proto

Create Application

{ application:
   { name: 'test-1-0',
     description: 'Autogenerated Application - test-1-0',
     organizationID: '1',
     serviceProfileID: '39ebfc1a-ab0a-4f46-9a58-a3d433c7a2ca' } }

Error (grpc):

{ Error: uuid: incorrect UUID length:
    at Http2CallStream.call.on (/Volumes/Sync/Sync/CEM/git/CLD-ADMIN-NJS/node_modules/@grpc/grpc-js/build/src/client.js:88:45)
    at Http2CallStream.emit (events.js:187:15)
    at Http2CallStream.endCall (/Volumes/Sync/Sync/CEM/git/CLD-ADMIN-NJS/node_modules/@grpc/grpc-js/build/src/call-stream.js:58:18)
    at handlingTrailers (/Volumes/Sync/Sync/CEM/git/CLD-ADMIN-NJS/node_modules/@grpc/grpc-js/build/src/call-stream.js:147:18)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  code: 2,
  details: 'uuid: incorrect UUID length:',
  metadata: Metadata { internalRepr: Map {} } }

Log (Lora-App-Server):

Mar 14 23:12:00 loraserver lora-app-server[3560]: time="2019-03-14T23:12:00Z" level=error msg="finished unary call with code Unknown" error="rpc error: code = Unknown desc = uuid: incorrect UUID length: " grpc.code=Unknown grpc.method=Create grpc.service=api.ApplicationService grpc.start_time="2019-03-14T23:12:00Z" grpc.time_ms=4.757 peer.address="192.168.0.5:54390" span.kind=server system=grpc
Mar 14 23:17:48 loraserver lora-app-server[3560]: time="2019-03-14T23:17:48Z" level=error msg="finished unary call with code Unknown" error="rpc error: code = Unknown desc = uuid: incorrect UUID length: " grpc.code=Unknown grpc.method=Create grpc.service=api.ApplicationService grpc.start_time="2019-03-14T23:17:48Z" grpc.time_ms=4.809 peer.address="192.168.0.5:54494" span.kind=server system=grpc
Mar 14 23:17:48 loraserver lora-app-server[3560]: time="2019-03-14T23:17:48Z" level=error msg="finished unary call with code Unknown" error="rpc error: code = Unknown desc = uuid: incorrect UUID length: " grpc.code=Unknown grpc.method=Create grpc.service=api.ApplicationService grpc.start_time="2019-03-14T23:17:48Z" grpc.time_ms=4.243 peer.address="192.168.0.5:54496" span.kind=server system=grpc
Mar 14 23:17:48 loraserver lora-app-server[3560]: time="2019-03-14T23:17:48Z" level=error msg="finished unary call with code Unknown" error="rpc error: code = Unknown desc = uuid: incorrect UUID length: " grpc.code=Unknown grpc.method=Create grpc.service=api.ApplicationService grpc.start_time="2019-03-14T23:17:48Z" grpc.time_ms=4.158 peer.address="192.168.0.5:54498" span.kind=server system=grpc
Mar 14 23:17:48 loraserver lora-app-server[3560]: time="2019-03-14T23:17:48Z" level=error msg="finished unary call with code Unknown" error="rpc error: code = Unknown desc = uuid: incorrect UUID length: " grpc.code=Unknown grpc.method=Create grpc.service=api.ApplicationService grpc.start_time="2019-03-14T23:17:48Z" grpc.time_ms=4.584 peer.address="192.168.0.5:54500" span.kind=server system=grpc

However, it works when using the API (/api#!/ApplicationService/Create)


#2

If you think this is a bug, please create an issue here: https://github.com/brocaar/lora-app-server. The forum is not a good place for tracking bugs.


closed #3