smartdevicelink / sdl_hmi

BSD 3-Clause "New" or "Revised" License
14 stars 43 forks source link

HMI aborts active PerformInteraction(BOTH) in case the second PI request is requested #647

Closed GetmanetsIrina closed 2 years ago

GetmanetsIrina commented 2 years ago

Precondition:

  1. SDL and HMI are started
  2. Mobile app is registered and activated
  3. CreateInteractionChoiceSet is added

Steps to reproduce:

  1. Mobile app requests PerformInteraction(BOTH) with the added choice set
  2. Mobile app requests PerformInteraction(BOTH) one more time while the first one is in progress

Expected result:

HMI rejects the second PerformInteraction(BOTH) request with result code 4 and continues with processing the first PerformInteraction(BOTH)

App→SDL: PerformInteraction ( interactionMode:"BOTH", params )

SDL→HMI: UI.PerformInteraction ( params )

SDL→HMI: VR.PerformInteraction ( params )

App→SDL: PerformInteraction2 ( interactionMode:"BOTH", params )

SDL→HMI: UI.PerformInteraction2 ( params )

SDL→HMI: VR.PerformInteraction2 ( params )

HMI→SDL: UI.PerformInteraction2 ( "code": 4 )

HMI→SDL: VR.PerformInteraction2 ( "code": 4 )

HMI continues the timers counting and showing of pop-ups for the first request without interruption.
HMI sends responses when the timers are expired

HMI→SDL: VR.PerformInteraction ( "code": 10 )

HMI→SDL: UI.PerformInteraction ( "code": 10 )

SDL→App: PerformInteraction ( success = false, resultCode = "TIMED_OUT" )

Actual result:

HMI rejects the second request and aborts the first one

SDL -> HMI [14:58:55:589]: {"id":527,"jsonrpc":"2.0","method":"VR.PerformInteraction","params":{"appID":1675107234,"cancelID":0,"grammarID":[658020310,1982296165],"helpPrompt":[{"text":"Help prompt","type":"TEXT"}],"timeout":10000,"timeoutPrompt":[{"text":"Timeout prompt","type":"TEXT"}]}}

VRRPC.js:141 FFW.VR.onRPCRequest
VRRPC.js:421 FFW.VR.Started
RPCClient.js:323 HMI -> SDL [14:58:55:637]: {"jsonrpc":"2.0","method":"VR.Started"}
UIRPC.js:1562 FFW.UI.OnSystemContext
RPCClient.js:323 HMI -> SDL [14:58:55:652]: {"jsonrpc":"2.0","method":"UI.OnSystemContext","params":{"systemContext":"VRSESSION","appID":1675107234}}
RPCClient.js:137 SDL -> HMI [14:58:55:659]: {"id":528,"jsonrpc":"2.0","method":"UI.PerformInteraction","params":{"appID":1675107234,"cancelID":0,"choiceSet":[{"choiceID":1,"menuName":"Choice1"},{"choiceID":2,"menuName":"Choice2"}],"initialText":{"fieldName":"initialInteractionText","fieldText":"Pick number:"},"interactionLayout":"ICON_ONLY","timeout":10000,"vrHelp":[{"position":1,"text":"ChoiceVR1"},{"position":2,"text":"ChoiceVR2"}],"vrHelpTitle":"Pick number:"}}

UIRPC.js:160 FFW.UI.onRPCRequest
UIRPC.js:1562 FFW.UI.OnSystemContext
RPCClient.js:323 HMI -> SDL [14:58:55:693]: {"jsonrpc":"2.0","method":"UI.OnSystemContext","params":{"systemContext":"VRSESSION","appID":1675107234}}
RPCClient.js:137 SDL -> HMI [14:58:57:741]: {"id":529,"jsonrpc":"2.0","method":"VR.PerformInteraction","params":{"appID":1675107234,"cancelID":0,"grammarID":[658020310,1982296165],"helpPrompt":[{"text":"Help prompt","type":"TEXT"}],"timeout":10000,"timeoutPrompt":[{"text":"Timeout prompt","type":"TEXT"}]}}

VRRPC.js:141 FFW.VR.onRPCRequest
VRRPC.js:292 FFW.VR.PerformInteractionResponse
RPCClient.js:323 HMI -> SDL [14:58:57:744]: {"jsonrpc":"2.0","id":529,"error":{"code":4,"message":"VR.PerformInteraction is already in progress","data":{"method":"VR.PerformInteraction"}}}
RPCClient.js:137 SDL -> HMI [14:58:57:748]: {"id":530,"jsonrpc":"2.0","method":"UI.PerformInteraction","params":{"appID":1675107234,"cancelID":0,"choiceSet":[{"choiceID":1,"menuName":"Choice1"},{"choiceID":2,"menuName":"Choice2"}],"initialText":{"fieldName":"initialInteractionText","fieldText":"Pick number:"},"interactionLayout":"ICON_ONLY","timeout":10000,"vrHelp":[{"position":1,"text":"ChoiceVR1"},{"position":2,"text":"ChoiceVR2"}],"vrHelpTitle":"Pick number:"}}

UIRPC.js:160 FFW.UI.onRPCRequest
UIRPC.js:1235 FFW.UI.PerformInteractionResponse
RPCClient.js:323 HMI -> SDL [14:58:57:750]: {"jsonrpc":"2.0","id":530,"error":{"code":4,"message":"UI PerformInterection REJECTED on HMI","data":{"method":"UI.PerformInteraction"}}}
RPCClient.js:137 SDL -> HMI [14:58:57:756]: {"id":531,"jsonrpc":"2.0","method":"UI.ClosePopUp","params":{"methodName":"UI.PerformInteraction"}}

UIRPC.js:160 FFW.UI.onRPCRequest
UIRPC.js:1300 FFW.UI.UI.PerformInteractionResponse
UIRPC.js:1235 FFW.UI.PerformInteractionResponse
RPCClient.js:323 HMI -> SDL [14:58:57:766]: {"jsonrpc":"2.0","id":528,"error":{"code":5,"message":"UI.PerformInteraction has been aborted","data":{"method":"UI.PerformInteraction"}}}
VRRPC.js:382 FFW.VR.VR.PerformInteractionResponse
VRRPC.js:292 FFW.VR.PerformInteractionResponse
RPCClient.js:323 HMI -> SDL [14:58:57:776]: {"jsonrpc":"2.0","id":527,"error":{"code":5,"message":"VR Perform Interaction error response.","data":{"method":"VR.PerformInteraction"}}}

OS & Version Information:

jordynmackool commented 2 years ago

@LitvinenkoIra please advise if Luxoft plans a PR for this issue. Thanks!

LitvinenkoIra commented 2 years ago

Hi @jordynmackool! Yes, we are planning to fix this issue.

ShobhitAd commented 2 years ago

Closed via https://github.com/smartdevicelink/sdl_hmi/pull/656