[KShare] iOS Error Codes - Definitions & Solutions

Hi all, :wave:

From time to time, we at Katalon Product Support team often receive questions from our users regarding iOS issues and error code, with each new error code taking us quite a bit of time to research for the appropriate solutions.

Hence, in this thread, we will be compiling some of the most common iOS error codes, what they mean, their root causes, and their corresponding solutions.

Each error code will be presented in a separated post in this thread, which you can navigate to using the link below: :point_down:

:information_source: The iOS error codes covered in this thread include:

1. Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65

2. Unable to start application on this device. An unknown server-side error occurred while processing the command. Error occurred while starting app. Original error ‘com.xxxx.MainActivity’ never started’

3. While Building the WebDriver Agent. Error Cannot link directly with dylib/framework, your binary is not an allowed

4. Fail to start Appium server in 60 seconds

5. IOS simulators not showing up in Katalon

6. Unable to create a new remote session. Original error: socket hang up

7. Appium directory is invalid: Cannot find appium executable file

8. Simulator architecture is unsupported by the ‘…app’ application

9. The file “project.xcworkspace” could not be unlocked

10. IOS real devices not showing up or unrecognized in Katalon

11. Could not find a pair record for device ‘00008101-000A49412292001E’. Please first pair with the device"

12. (1) Failed to register bundle identifier & (2) No profiles for ‘com.facebook.IntegrationApp’ were found

13. No Identity found

14. “An unknown server-side error occurred while processing the command. Original error: Failed to receive any data within the timeout: 5000”

15. Original error: /Users/joshua/Downloads/adiraku.ipa did not have any matching .app or .ipa bundles. Please make sure the provided package is valid and contains at least one matching application bundle which is not nested


We also have a series of Git error code for anyone who are having issue with Git when using the Katalon Platform:

  1. Git Error Codes - Definitions & Solutions (Part 1)
  2. Git Error Codes - Definitions & Solutions (Part 2)
  3. Git Error Codes - Definitions & Solutions (Part 3)
  4. Git Error Codes - Definitions & Solutions (Part 4)
2 Likes

Error code #1

Original error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65

Definition

Your Webdriver Agent was not built correctly.

Root cause

  1. The Webdriver Agent is not signed correctly because it was not built under a valid Apple Developer Account. It was noted in our document that you have to enroll in the Apple Developer Program. See Enrollment.

  2. The Webdriver Agent or the application file (.ipa for real device and .app for simulator devices) was built with the wrong IOS version of the devices.

For example: The devices chosen were iPhone 13 Promax, IOS 16.1. But the Webdriver Agent was build for IOS 12 → It cannot load the Webdriver Agents on the devices to run the application

Solution

We have a detailed workthrough for you to download and follow along below:
Xcodebuild failed with code 65.pdf (6.0 MB)

Important note

  • We can test to see if the WebDriver Agent (WDA) is built successfully by recording an existing application on the device like ‘com.apple.MobileAddressBook’. If the application is loaded successfully on the device then we are successfully build the WDA
  • Every Xcode version will have an IOS version supported. For example, Xcode 14.2 will support maximum IOS 16.2 and Xcode 14.3 will support maximum IOS 16.4 (including 16.3),…etc.

You need to make sure to download the correct Xcode version to build the Webdriver Agent that supports the IOS version of the device. Otherwise, you will build the wrong IOS version of the Webdriver Agent.

Please refer to the website below:


:point_up: Back to top :point_up:

Error code #2

Unable to start application on this device. An unknown server-side error occurred while processing the command. Error occurred while starting app. Original error ‘com.xxxx.MainActivity’ never started’

image

Definition

Exception usually indicates, that the first application activity is not the same package/activity, as it is set (or auto detected) by appWaitPackage /appWaitActivity . Such error normally happens in applications having multiple activities.

Root cause

By default, Appium tries to start the appPackage /appActivity combination and then waits until the appWaitPackage /appWaitActivity is focused. But the appWaitDuration got timeout expires.

Solution

In your Project → Settings → Execution → Default → Mobile → Android/IOS

Add new entries for appWaitActivity and appWaitDuration.

Please refer to the link below for more infomation:
https://appium.readthedocs.io/en/latest/en/writing-running-appium/android/activity-startup/


:point_up: Back to top :point_up:

Error code #3

While Building the WebDriver Agent. Error: Cannot link directly with dylib/framework, your binary is not an allowed

Definition

Cannot build Webdriver Agent due to incompatibility between the Xcode and Appium version.

Root cause

The incompatibility between the Xcode14 and appium 1.x version

Solution

Downgrade Xcode to 13.x version or install and set up appium 2 beta.

Please refer to the link below for more information:


:point_up: Back to top :point_up:

Error code #4

Fail to start Appium server in 60 seconds

image

Definition

Katalon cannot detect appium to start

Root cause

Installing iOS dependencies by homebrew is not recommended as it will cause some issues that lead to Katalon cannot detect the dependencies.

Reference:

Solution

Uninstall Node and Appium

  • Uninstall Node: Following this article. Make sure Node is completely removed using command Node -v

  • Uninstall the current Appium that is installed by node: npm uninstall -g appium. Make sure Node is completely removed using command Appium -v

Reinstall Node

  • Simply go to this site to download the latest Node manually: Download | Node.js
  • After downloading Node, continue to install appium 2.0 using npm install -g appium@next
    Check to see if drivers are still installed using appium driver list
  • Install IOS driver using appium driver install xcuitest
  • Install UIAutomator Drive using appium driver install uiautomator2

Install Katalon 8.5.4. Katalon.Studio.dmg

Rebuild you WebdriverAgent

Rebuild your WebDriverAgent again with the new node and try to start the iOS on Katalon Studio to see how it works.


:point_up: Back to top :point_up:

Error code #5

IOS simulators not showing up in Katalon

image

Definition

IOS simulators not showing up in Katalon.

Root cause

Xcode was not not defined correctly under Application folder

Solution

From Terminal, type below command:

xcode-select -p

If you don’t see anything from the xcode-select command, you’ll need to make sure you set a default Xcode version:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer


:point_up: Back to top :point_up:

Error code #6

Unable to create a new remote session. Original error: socket hang up

Definition

Katalon runs out of time to connect to the simulator or real device.

Root cause:

Reason 1: Webdriver Agent didn’t install correctly in the device.

Reason 2: the user doesn’t use Apple Developer account (paid account)

Solution

Solution 1: Re-install the Webdriver Agent manually:

https://katalonsupport.force.com/katalonhelpcenter/s/article/How-to-setup-IOS-Mobile-Testing

Solution 2: Enroll in the Apple Developer Account:


:point_up: Back to top :point_up:

Error code #7

Appium directory is invalid: Cannot find appium executable file

Definition

Katalon Studio cannot locate the provided Appium directory.

Root cause

The Appium directory is not set correctly in Katalon setting.

Solution

Double check your Appium directory via this documentation:


:point_up: Back to top :point_up:

Error code #8

Simulator architecture is unsupported by the '.....app' application

Definition & Root cause

The application wasn’t compiled with support for the architecture of the simulator/ real devices.

Solution

Ask the developer to compile the application with the build target as a simulator by following the official docs to prepare the iOS application file and Sample iOS project.

https://katalonsupport.force.com/katalonhelpcenter/s/article/How-to-resolve-the-warning-message-Simulator-architecture-is-unsupported-by-the-app-application-Make-sure-the-correct-deployment-target-has-been-selected-for-its-compilation-in-Xcode


:point_up: Back to top :point_up:

Error code #9

The file “project.xcworkspace” could not be unlocked.

Definition

The file “project.xcworkspace” could not be unlocked to access.

Root cause

The xcodeproj file is locked due to no permissions.

Solution

Please refer to the links below for solution:


:point_up: Back to top :point_up:

Error code #10

IOS real devices not showing up or unrecognized in Katalon

Definition

Katalon Studio cannot recognize real devices even already plugged and connected.

Root cause

Missing or no permission to install libimobiledevice library. It is a cross-platform software library that talks the protocols to interact with iOS devices.

Solution

Uninstall and reinstall libimobiledevice library by running below command

brew uninstall libimobiledevice

brew install --HEAD libimobiledevice


:point_up: Back to top :point_up:

Error code #11

Could not find a pair record for device '00008101-000A49412292001E'. Please first pair with the device"

Definition

Katalon is unable to find a pair record for your real IOS device.

image

Root cause

The connection between the device and the computer is unstable.

Solution

Make sure the cable is connected properly and tap “Trust ” on the device to establish the connection and try to record again

If that does not work, you can follow the guideline below:
https://katalonsupport.force.com/katalonhelpcenter/s/article/I-am-unable-to-find-a-pair-record-for-your-real-device-and-how-to-troubleshoot


:point_up: Back to top :point_up:

Error code #12

(1) Failed to register bundle identifier

and

(2) No profiles for 'com.facebook.IntegrationApp' were found

Definition

  1. Identifier com.facebook.IntegrationApp cannot be registered to your development team

  2. Xcode couldn’t find any iOS App Development provisioning profiles matching com.facebook.IntegrationApp.

Root cause

  1. The Identifier com.facebook.IntegrationApp is not available. because your team is probably not Facebook, you can’t sign an app with a bundle identifier of com.facebook. Change your bundle identifier to a unique string.

  2. The iOS App Development provisioning profiles is not correct. It must be an Apple Developer account instead of personal account.

Solution

  • First make sure to select the correct Apple Developer Account. If you don’t have an Apple Developer signing certificate, you’ll have to sign up for one at developer.apple.com or ask someone in your company to set you up with one.

  • Change com.facebook.Integration to something with your company’s ID, like com.mycompany.Integration.


:point_up: Back to top :point_up:

Error code #13

No Identity found

Definition

Can’t find a valid Apple Developer Account to install Dependencies.

Root cause

The issue occurs when there is no available certificate on the list.

Solution

Please follow the instructions in the video below:


:point_up: Back to top :point_up:

Error code #14

Unable to start application

An unknown server-side error occurred while processing the command. Original error: Failed to receive any data within the timeout: 5000

Root cause

User config:

  • iOS 15.5 - iPhone 12
  • Mac Monterey 12.6.3
  • Appium Version 1.22.3
  • Katalon Studio Version 8.6.0
  • Node Version v18.15.0

Node version is not compatible

Solution

Change Node Version from v18 to v16 solved the issue.

References:


:point_up: Back to top :point_up:

Error code #15

Original error:

/Users/Joshua/Downloads/adiraku.ipa did not have any matching .app or .ipa bundles. Please make sure the provided package is valid and contains at least one matching application bundle which is not nested

Definition

The error indicates that Katalon Studio could not find any matching .app or .ipa bundle within the provided ipa package.

Root cause & solution

Incorrect used file:

.app is used for simulators

.ipa is used for real devices

Make sure that the application file installed in the device is the same as in Katalon (one source)

If they want to install it in KS, please uninstall in from the device first.


:point_up: Back to top :point_up:

3 Likes