Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect behavior during processing of erroneous Slider responsive with sliderPosition parameter #3676

Closed
GetmanetsIrina opened this issue Mar 25, 2021 · 2 comments

Comments

@GetmanetsIrina
Copy link

GetmanetsIrina commented Mar 25, 2021

Bug Report

Incorrect behavior during processing of erroneous Slider responsive with sliderPosition parameter

Precondition
  1. HMI and SDL are started
  2. Mobile app is registered and activated
Reproduction Steps
  1. Mobile app requests Slider with default params and values
  2. Press Back button or wait until a timeout is expired
Expected Behavior

Mobile API says

<param name="sliderPosition" type="Integer" minvalue="1" maxvalue="26" mandatory="false">
    <description>
        Current slider value returned when saved or canceled (aborted)
        This value is only returned for resultCodes "SAVED" or "ABORTED"
    </description>
</param>

HMI API says

<param name="sliderPosition" type="Integer" minvalue="1" maxvalue="26" mandatory="false">
  <description>Current slider position. Must be returned when the user has clicked the ‘Save’ or ‘Canceled’ button or by the timeout </description>
</param>

According to the information above HMI should send sliderPosition parameter also in erroneous response, but according to HMI specification, HMI can not provide custom parameters in the erroneous response. All faced custom parameters will be treated as fake parameters and will be removed from the message.
So we were thinking that the summary in API's should be updated and should say that sliderPosition parameter should be provided only in a successful response.
SDL should not provide sliderPosition parameter in erroneous response.

Note:
HMI issue should be created to remove sliderPosition parameter from the erroneous responses in case this solution will be applied.

Observed Behavior
  1. HMI sends sliderPosition parameter with actual value in erroneous responses(ABORTED and TIMED_OUT)
  2. SDL sends sliderPosition=0 in the response to the mobile side because can not process the sliderPosition received in erroneous response from HMI
OS & Version Information
Logs

slider_sdl_log.zip

@jacobkeeler
Copy link
Contributor

jacobkeeler commented May 10, 2021

@GetmanetsIrina It seems to me that this is at least partially an HMI issue as well. The HMI can send an ABORTED or TIMED_OUT response with the sliderPosition parameter, but it needs to use the normal response format rather than the error one.

        {
          'jsonrpc': '2.0',
          'id': sliderRequestID,
          'result': {
            'code': 5,
            'method': 'UI.Slider',
            'sliderPosition': 8
          }
        }

Unfortunately when using this format, the HMI is not able send a message field, but sending sliderPosition is possible.

The main issue on Core's end is that it sends a sliderPosition of 0 if the HMI doesn't send this value properly, which is not valid in the Mobile API since minvalue="1". I don't believe that the Mobile API description needs to be changed in this case.

@jacobkeeler
Copy link
Contributor

Closing with the merge of #3697

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants