Mac install WebDriverAgent dependencies Failed

Hi,
I run the Katalon Studio on Mac, have rebuilt successfully on Xcode,
but when I tried the Katalon Studio>Tools>iOS>install WebDriverAgent, I got the error as below

Failed to run the installation step “Installing WebDriverAgent dependencies…”
Command: “sh ./Script/bootstrap.sh -d”

---------Related version-----------
Xcode Version: 13.0
Katalon Studio: 8.2.5
Appium Version: 1.22.2
iPhone OS Version: 15.1

Any suggestion will be very appreciated.

You don’t need to run this step for Appium 1.20 and later. Please go straight forward for next steps.

@duyluong
Thanks for your quickly response.
But when I try to connect the iPhone to Katalon Studio, I got this error, so I guess if it’s related WDA install.
----------appium log---------
e[35m[WebDriverAgent]e[39m Using WDA path: ‘/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent’
e[35m[WebDriverAgent]e[39m Using WDA agent: ‘/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj’
e[35m[XCUITest]e[39m Continuing without capturing device logs: Failed to receive any data within the timeout: 5000
e[35m[XCUITest]e[39m Setting up real device
e[35m[DevCon Factory]e[39m Releasing connections for {udidxxxxxx} device on any port number
e[35m[DevCon Factory]e[39m No cached connections have been found
e[35m[HTTP]e[39m e[37m<-- POST /wd/hub/session e[39me[31m500e[39m e[90m10883 ms - 599e[39m

@xin.xin

What is the Appium, XCode version you are using?

There was a similar discussion in Appium forum but it’s not resolved: https://discuss.appium.io/t/an-unknown-server-side-error-occurred-while-processing-the-command-original-error-failed-to-receive-any-data-within-the-timeout-5000/35773

@duyluong
Here is the related information, it’s very strange that I have already built successfully in Xcode, but when I try to run the Katalon Studio I got this WDA error

@xin.xin

Do you face the issue with the simulator?

1 Like

@duyluong
I can launch the Calendar App in Simulator by Katalon, so does it means it is the Real Device issue of Appium? Do you have some suggestions?

Hi,
I have updated my Xcode to up-to-date 13.2.1, and i can launch the App by Appium directly,
but cannot launch it by Katalon, it seems the Katalon’s issue, could you give me some suggestions?

@xin.xin

Do you mean Appium desktop?
Please share the desired capabilities which you use to start the app with Appium Desktop.

@duyluong
Hi, here is my desired capabilities using by Appium Desktop
{
“platformName”: “iOS”,
“appium:platformVersion”: “15.3.1”,
“appium:deviceName”: “iPhone X”,
“appium:automationName”: “XCUITest”,
“appium:bundleId”: “com.apple.weather”,
“appium:udid”: “xxxxx”
}

@duyluong
Hi, do you have any updates? very appreciate if I can get some feedback, thanks.

@xin.xin

We will investigate the issue soon. In meantime, you can spy/record and run the test by using Appium Server via Remote execution:


1 Like

@duyluong
Thanks for your suggestion, unfortunately, it doesn’t work for me by Remote Execution for iOS.
I encountered this error as below, please refer to the attachment about my remote setting.

Now I cannot proceed with the iOS testing, if you have any updates please let me know, many many thanks.

---------error alert for katalon studio------------
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: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
xcodebuild error message:
. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’
System info: host: ‘X0825’, ip: ‘fe80:0:0:0:ee:a2a2:87d3:54d0%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.16’, java.version: ‘1.8.0_275’
Driver info: driver.version: IOSDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
xcodebuild error message:
. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
at getResponseForW3CError (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)
at asyncHandler (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:380:37)
at runNextTicks (internal/process/task_queues.js:58:5)
at processImmediate (internal/timers.js:412:9)
Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’
System info: host: ‘X0825’, ip: ‘fe80:0:0:0:ee:a2a2:87d3:54d0%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.16’, java.version: ‘1.8.0_275’
Driver info: driver.version: IOSDriver
at com.kms.katalon.composer.components.impl.dialogs.ProgressMonitorDialogWithThread.runAndWait(ProgressMonitorDialogWithThread.java:49)
at com.kms.katalon.composer.mobile.objectspy.components.RemoteAppComposite$1.run(RemoteAppComposite.java:112)
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: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
xcodebuild error message:
. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’
System info: host: ‘X0825’, ip: ‘fe80:0:0:0:ee:a2a2:87d3:54d0%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.16’, java.version: ‘1.8.0_275’
Driver info: driver.version: IOSDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
xcodebuild error message:
. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
at getResponseForW3CError (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)
at asyncHandler (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:380:37)
at runNextTicks (internal/process/task_queues.js:58:5)
at processImmediate (internal/timers.js:412:9)
Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’
System info: host: ‘X0825’, ip: ‘fe80:0:0:0:ee:a2a2:87d3:54d0%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.16’, java.version: ‘1.8.0_275’
Driver info: driver.version: IOSDriver
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.ios.IOSDriver.execute(IOSDriver.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.ios.IOSDriver.(IOSDriver.java:85)
at com.kms.katalon.core.appium.driver.AppiumDriverManager.createMobileDriver(AppiumDriverManager.java:496)
at com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory.startRemoteMobileDriver(MobileDriverFactory.java:546)
at com.kms.katalon.composer.mobile.objectspy.dialog.MobileInspectorController.startMobileAppOnCloudDevices(MobileInspectorController.java:239)
at com.kms.katalon.composer.mobile.objectspy.components.RemoteAppComposite$1$1.call(RemoteAppComposite.java:115)
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 io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186)
… 19 more
Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
xcodebuild error message:
. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’
System info: host: ‘X0825’, ip: ‘fe80:0:0:0:ee:a2a2:87d3:54d0%en0’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.16’, java.version: ‘1.8.0_275’
Driver info: driver.version: IOSDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
xcodebuild error message:
. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
at getResponseForW3CError (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)
at asyncHandler (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:380:37)
at runNextTicks (internal/process/task_queues.js:58:5)
at processImmediate (internal/timers.js:412:9)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62)
at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)
… 20 more

@xin.xin

Your .ipa application and/or WebDriverAgent is not signed correctly.

Please refer to our troubleshooting common error: https://docs.katalon.com/katalon-studio/docs/troubleshooting-automated-mobile-testing.html
Solutions:

  • Sign and rebuild the WebDriverAgent XCode project with your developer certificate.
  • Uncheck ‘Automatically Signing’ option from WebDriverAgentRunner and select valid provisioning profile (profile displayed as Eligible from the list).

Did you start the session with real device successfully with Appium Desktop?

@duyluong
Hi, thanks so much for your continued support.

  1. Yes, I have started the app with a real device successfully with Appium Desktop, please see the attachment.

  2. And about you mentioned, if I uncheck “Automatically Signing” option, i could not find any useful profile from the selection list.


    even I select “Download profile…”, the No Eligible Profile popup displays.

  3. I tried to rebuild successfully again, but still cannot launch the App from target real device by remote way.

I can launch the app on iOS after upgrade Katalon to V 8.3.0, and only launch by Remote(launch appium in terminal) can be success, still cannot launch on real iOS by Katalon iOS.

Really very happy that Katalon can run the real iOS by setting and running Remote way.