Weekly Katalon FAQs (11) - Mobile Testing (Common issue with iOS real device)

:pushpin: FAQs under this topic:
38. Could not find a pair record for iOS device and how to troubleshoot?
39. Unable to create a new remote session with iOS real device and how to troubleshoot?
40. Failed to launch process with bundle identifier ‘com.luis262.WebDriverAgentRunner.xctrunner’ on IOS device and how to troubleshoot?
41. “Unable to start the application. Original error: socket hang up” on IOS 15.5 and how to solve?


:point_right: See also Weekly Katalon FAQs

38. Could not find a pair record for iOS device and how to troubleshoot?

If you encounter the situation of being unable to find a pair record for your real IOS device.

Please refer to the solution below:

Step 1: You are required to install WebDriverAgentRunner on your IOS device with the command:

cd /usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent

xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=aae26f02b527948a92da47b5f116b5f51e2ef7a5 -allowProvisioningUpdates test

Step 2: Installing idevicepair (it comes bundled within libimobiledevice). Besides, it required you to brew install libimobiledevice

Step 3: Verifying that idevicepair is correctly installed and it sees your connected iPhone with: idevicepair list

Step 4: After everything is good you can pair your device with idevicepair --udid [here goes UDID of your iPhone] pair

39. Unable to create a new remote session with iOS real device and how to troubleshoot?

If you encounter the error:

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

Please follow the solution:

  • Remove the current WebDriverAgentRunner from your phone.
  • On your iPhone, go to Settings > General > Device Management, trust your Apple ID.
  • Run this command again to install the WebDriverAgentRunner:
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=your_device_id' test

If this step runs successfully should have messages as below:

inline543803995.png

40. Failed to launch process with bundle identifier ‘com.luis262.WebDriverAgentRunner.xctrunner’ on IOS device and how to troubleshoot?

If your test was failed to launch process with bundle identifier such as:

'com.luis262.WebDriverAgentRunner.xctrunner'. (Underlying Error: The operation couldn’t be completed. Unable to launch com.luis262.WebDriverAgentRunner.xctrunner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user.

Please follow this solution:

  • Go to device, Settings > General > Device Management
  • Trust the Apple Developement: abc@gmail.com

41. “Unable to start the application. Original error: socket hang up” on IOS 15.5 and how to solve?

After updating to IOS 15.5 then trying to record with real mobile device, the following attached error display:
Unable to start the application. Original error: socket hang up

d6d452c5-b407-4abd-85c8-a02db123bf2a.png

Please follow the below instruction to fix the issue:

  • Update Appium version with the latest version 1.22.3 by command npm install appium -g
  • Recheck again to make sure the correct appium version installed by command

1e344b68-9642-4f49-b576-30bf2bb5df91.png

3 Likes

Hi @chen.lee!
Is the solution listed in point 38 still valid for problem “Original error: Could not find a pair record for device ‘udid’. Please first pair with the device”? I’ve been trying the steps described here but still no luck even though xcode does recognize the device and, according to idevicepair command, my device is paired to my computer.
Is there any other troubleshoot I can try to solve this problem? I’ll appreaciate any update from you. Thanks in advance!

Hi there Kimberly,

I found a post in one of our topics about iOS error codes which also mentioned about Katalon Studio not being able to recognize real iOS devices even though it is connected …

I hope this helps :+1:

1 Like

Hi @albert.vu! Thanks for your answer.
I just tried that workaround and still no luck yet. Yesterday I found out that using “idevicepair validate” after pairing the devices worked ensuring the device was paired, but the next error I found was a timeout problem when trying to initialize the Katalon Mobile Inspector. I found in another post in github [iOS-RealDevice] Uncaught Error: Failed to receive any data within the timeout: 5000 error in some environment · Issue #16399 · appium/appium · GitHub that for some people using node 16 solved the timeout problem, so I tried that too and now I’m stuck again in the device recognition problem.