Why am I not able to use Windows Record to launch a windows applications to record to create test cases

Katalon Version: 9.0.2
WinAppDriver Installed
Developer Mode Enabled

When using the windows recorder I’m not able to launch any application and I receive the error shown below. I have developer mode enabled on the machine Katalon is running on and I also have WinAppDriver. I have tried base windows applications, notepad ++, and custom java applications and all of them provide the same error shown below. The specific machine names and IP’s have been stripped.

java.util.concurrent.ExecutionException: org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: Unable to parse remote response:

window.onload = function() { //const queryString = window.location.search;
                // const urlParams = new URLSearchParams(queryString); for when we move off of IE11

              //  sessionStorage.setItem('url', urlParams.get('url') );
                
              //  sessionStorage.setItem('reason', urlParams.get('reason') );

              //  sessionStorage.setItem('reasoncode', urlParams.get('reasoncode') );

              //  sessionStorage.setItem('user', urlParams.get('user') ); 

              urlParam = function(name){
                    var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
                    if (results == null){
                       return null;
                    }
                    else {
                       return decodeURIComponent(results[1]) || 0;
                    }
              }
              sessionStorage.setItem('url', urlParam('url') );
              sessionStorage.setItem('reason', urlParam('reason') );
              sessionStorage.setItem('reasoncode', urlParam('reasoncode') );
              sessionStorage.setItem('user', urlParam('user') );
              
              
             



              window.location.replace('url_block.html');
            }
    
    
    
    </script>
</head>

Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’
System info: host: ‘testingmachine’, ip: ‘myip’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.7’
Driver info: driver.version: WindowsDriver
at com.kms.katalon.composer.components.impl.dialogs.ProgressMonitorDialogWithThread.runAndWait(ProgressMonitorDialogWithThread.java:49)
at com.kms.katalon.composer.windows.dialog.WindowsAppComposite$5.run(WindowsAppComposite.java:238)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: Unable to parse remote response:

window.onload = function() { //const queryString = window.location.search;
                // const urlParams = new URLSearchParams(queryString); for when we move off of IE11

              //  sessionStorage.setItem('url', urlParams.get('url') );
                
              //  sessionStorage.setItem('reason', urlParams.get('reason') );

              //  sessionStorage.setItem('reasoncode', urlParams.get('reasoncode') );

              //  sessionStorage.setItem('user', urlParams.get('user') ); 

              urlParam = function(name){
                    var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
                    if (results == null){
                       return null;
                    }
                    else {
                       return decodeURIComponent(results[1]) || 0;
                    }
              }
              sessionStorage.setItem('url', urlParam('url') );
              sessionStorage.setItem('reason', urlParam('reason') );
              sessionStorage.setItem('reasoncode', urlParam('reasoncode') );
              sessionStorage.setItem('user', urlParam('user') );
              
              
             



              window.location.replace('url_block.html');
            }
    
    
    
    </script>
</head>

Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’
System info: host: ‘testingmachine’, ip: ‘myip’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.7’
Driver info: driver.version: WindowsDriver
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:208)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:217)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.windows.WindowsDriver.execute(WindowsDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:84)
at io.appium.java_client.windows.WindowsDriver.(WindowsDriver.java:38)
at com.kms.katalon.core.windows.driver.WindowsDriverFactory.newWindowsDriver(WindowsDriverFactory.java:194)
at com.kms.katalon.core.windows.driver.WindowsDriverFactory.startApplication(WindowsDriverFactory.java:112)
at com.kms.katalon.composer.windows.spy.WindowsInspectorController.startApplication(WindowsInspectorController.java:147)
at com.kms.katalon.composer.windows.dialog.WindowsAppComposite$5$1.call(WindowsAppComposite.java:241)
at com.kms.katalon.composer.components.impl.dialogs.ProgressMonitorDialogWithThread.startThreadAndWait(ProgressMonitorDialogWithThread.java:36)
at com.kms.katalon.composer.components.impl.dialogs.ProgressMonitorDialogWithThread.runAndWait(ProgressMonitorDialogWithThread.java:48)
… 2 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186)
… 19 more
Caused by: org.openqa.selenium.WebDriverException: Unable to parse remote response:

window.onload = function() { //const queryString = window.location.search;
                // const urlParams = new URLSearchParams(queryString); for when we move off of IE11

              //  sessionStorage.setItem('url', urlParams.get('url') );
                
              //  sessionStorage.setItem('reason', urlParams.get('reason') );

              //  sessionStorage.setItem('reasoncode', urlParams.get('reasoncode') );

              //  sessionStorage.setItem('user', urlParams.get('user') ); 

              urlParam = function(name){
                    var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
                    if (results == null){
                       return null;
                    }
                    else {
                       return decodeURIComponent(results[1]) || 0;
                    }
              }
              sessionStorage.setItem('url', urlParam('url') );
              sessionStorage.setItem('reason', urlParam('reason') );
              sessionStorage.setItem('reasoncode', urlParam('reasoncode') );
              sessionStorage.setItem('user', urlParam('user') );
              
              
             



              window.location.replace('url_block.html');
            }
    
    
    
    </script>
</head>
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:115)
... 23 more

Caused by: org.openqa.selenium.json.JsonException: Unable to determine type from: <. Last 1 characters read: <
Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’
System info: host: ‘testingmachine’, ip: ‘myip’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘17.0.7’
Driver info: driver.version: WindowsDriver
at org.openqa.selenium.json.JsonInput.peek(JsonInput.java:122)
at org.openqa.selenium.json.JsonTypeCoercer.lambda$null$6(JsonTypeCoercer.java:140)
at org.openqa.selenium.json.JsonTypeCoercer.coerce(JsonTypeCoercer.java:126)
at org.openqa.selenium.json.Json.toType(Json.java:69)
at org.openqa.selenium.json.Json.toType(Json.java:55)
at org.openqa.selenium.json.Json.toType(Json.java:50)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:112)
… 23 more

  • Give as much context as possible (screenshots, videos, links, code blocks, etc.) - this help the community help you
  • Use the katalon-studio tag followed by other appropriate tags for better visibility and searchability.
  • Make sure to remove this pre-filled content before posting. :smiley:
1 Like

Hi there,

Thank you very much for your topic. Please note that it may take a little while before a member of our community or from Katalon team responds to you.

Thanks!

Hi @kyle.marsh,

Welcome to our forum.
The error Unable to parse remote response indicates that the response from the Appium server is not what KS expects, possibly due to some HTML content being returned instead of a valid JSON response.

I would like to suggest the following steps to diagnose and troubleshoot:

Check Appium Server

  1. Ensure Appium Server is Running:
    Make sure that the Appium server is running and listening on the expected port.

  2. Check Appium Server Logs:
    Review the Appium server logs for any errors or warnings.

Verify Desired Capabilities

  1. Verify Desired Capabilities:
    Ensure that the desired capabilities used to create the session are correct. Here’s an example configuration:
    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability("app", "C:\\Path\\To\\YourApp.exe");
    capabilities.setCapability("platformName", "Windows");
    capabilities.setCapability("deviceName", "WindowsPC");
    WindowsDriver<WindowsElement> driver = new WindowsDriver<WindowsElement>(new URL("http://127.0.0.1:4723"), capabilities);
    

Network Issues

  1. Network Configuration:
    Ensure that no network issues or firewalls are blocking the connection between your test script and the Appium server.

Appium and WebDriver Versions

  1. Check Compatibility:
    Ensure that the Appium, Appium Java client and WebDriver versions are compatible.

Update KS version if needed. Thank you