smartdevicelink / sdl_core

SmartDeviceLink In-Vehicle Software and Sample HMI
BSD 3-Clause "New" or "Revised" License
240 stars 245 forks source link

WSS Re-connection infinite loop #3889

Closed ShobhitAd closed 2 years ago

ShobhitAd commented 2 years ago

Bug Report

Currently, if a WSS Cloud App with a valid endpoint and invalid certificate is activated, core keeps attempting to re-connect to the cloud app.

Reproduction Steps
  1. Setup test suite appJava with SSL enabled. Change the following params in Config.java
    public static final TransportType TRANSPORT_TYPE = TransportType.WEB_SOCKET_SERVER;
    public static final String APP_ID = "123e4567-e89b-12d3-a456-426655440000";
    public static final String APP_NAME = "Test Suite SE";
    ...
    public static final boolean ENABLE_SSL = true;
    public static final String CERTIFICATE_PEM = "<server_certificate_string>";
    public static final String KEY_PEM = "<server_key_string>";
  2. Add cloud app entry for the cloud (with transport type WSS) in sdl_preloaded_pt.json. Replace <client_certificate_string> with an invalid certificate
    "123e4567-e89b-12d3-a456-426655440000": {
                "keep_context": false,
                "steal_focus": false,
                "priority": "NONE",
                "default_hmi": "NONE",
                "groups": ["Base-4", "CloudAppStore"],
                "RequestType": [],
                "RequestSubType": [],
                "nicknames": ["Test Suite SE"],
                "hybrid_app_preference": "CLOUD",
                "endpoint": "wss://<core_ip>:4355",
                "auth_token": "none",
                "cloud_transport_type": "WSS",
                "enabled": true,
                "certificate": "<client_certificate_string>"
            },
  3. Start Core and HMI
  4. Click on cloud app entry in app list
Expected Behavior
Observed Behavior

NOTE: Core seems to sometimes send some invalid data to the HMI in the UpdateDeviceList request during this reconnection loop, such as "transportType":-1 and "cloudConnectionStatus":-1

OS & Version Information
ShobhitAd commented 2 years ago

Closed via https://github.com/smartdevicelink/sdl_core/pull/3891