w3c / automotive-viss2

MIT License
9 stars 15 forks source link

vissv2server crashes while using gRPC Subscribe API for attribute #67

Closed RenjithRajagopal89 closed 1 year ago

RenjithRajagopal89 commented 1 year ago

Description:

Steps to Reproduce: Checkout branch rl-integration. In this branch feeder uses dataprovider as remotivelabs broker interface towards virtual cloud

  1. Launch docker using docker-compose up -d
  2. Launch grpc client & try to Subscribe for attribute commandList[1] ={"action":"subscribe","path":"Vehicle/VehicleIdentification/VIN","requestId":"258"}``
  3. Start remotivelabs virtual dataplayback

Expected Behavior:

  1. Docker shall launch vissv2server, feeder & redis running
  2. Grpc client shall receive successful response
  3. Grpc client shall receive successful event with VIN data

Actual Behavior:

  1. OK
  2. VISSv2Server crashes due to "panic: interface conversion: interface {} is nil, not string"

Additional Information: Does Subscribe make sense for getting value update of an attribute ? Assume attribute has a default value which will be override during bootup.

Stack Trace:

Attaching the server log. Issue seems like while creating response back to client. Vissv2server.LOG

petervolvowinz commented 1 year ago

From the log it looks like an error claiming that a filter needs to be set: {"action":"subscribe","path":"Vehicle/VehicleIdentification/VIN","requestId":"258"}`. However, in the 5.2.2.3 Subscribe section . Adding a filter is optional according to 5.2.2.3 in the spec.

Br Peter Winzell

renjithrajagopal-sudo commented 1 year ago

Thanks @petervolvowinz for update. Yes I see filter was not given which is mandatory. Possibly server shall respond with bad request over a crash?

petervolvowinz commented 1 year ago

https://www.w3.org/TR/viss2-transport/#wss-search-read 5.2.2.3 Subscribe section

It says filter is optional. So, we have a contradiction here...I guess.

petervolvowinz commented 1 year ago

5.2.2.3 Subscribe section for websockets https://www.w3.org/TR/viss2-transport/#wss-search-read

From: Renjith Rajagopal @.> Date: Thursday, October 26, 2023 at 4:53 PM To: w3c/automotive-viss2 @.> Cc: Winzell, Peter @.>, Mention @.> Subject: Re: [w3c/automotive-viss2] vissv2server crashes while using gRPC Subscribe API for attribute (Issue #67)

Could you @petervolvowinzhttps://github.com/petervolvowinz please share the spec you are referring ? https://www.w3.org/TR/viss2-core/#subscribe says "Arguments, of which path and filter are mandatory"

— Reply to this email directly, view it on GitHubhttps://github.com/w3c/automotive-viss2/issues/67#issuecomment-1781291652, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANIH3SR5JJNNGKPC2CBTU7DYBJ2OVAVCNFSM6AAAAAA6P7TSE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBRGI4TCNRVGI. You are receiving this because you were mentioned.Message ID: @.***>

UlfBj commented 1 year ago

@RenjithRajagopal89 Please check if PR#69 solves it. If so, please close this

petervolvowinz commented 1 year ago

@RenjithRajagopal89 Did you test this ?

renjithrajagopal-sudo commented 1 year ago

@petervolvowinz @UlfBj I will test with Volvo dataset(VIN, Model etc) & will let you know

renjithrajagopal-sudo commented 1 year ago

Server crash still there. Note : Subscribe API is called without filter even though it's mandatory. Client shall expects input error as response in such case ? [logs_VISS_crash_VIN_Subscribe.LOG](https://github.com/w3c/automotive-viss2/files/13239190/logs_VISS_crash_VIN_Subscribe.LOG)

UlfBj commented 1 year ago

There is a PR waiting to be reviewed by Peter that should fix the crash.

petervolvowinz commented 1 year ago

should be good to merge now.

UlfBj commented 1 year ago

Fixed by PR#77