Table of contents
1.
Introduction
2.
Common Issues in Mobile Testing in Katalon Studio
2.1.
An unknown server-side error occurred while processing the command
2.2.
Appium directory is not set
2.3.
Carthage is not found
2.4.
Connected device not Displayed in 'Device Name' list
2.5.
Encounter xcodebuild exited with Code '65' and signal 'null'
2.6.
Fail to start Appium server in 30 seconds
2.7.
Fail to Start Appium server in 60 seconds
2.8.
Katalon Mobile Recorder and SetText keyword cannot perform on an EditText element of the Flutter-based application
2.9.
Unable to Start Application on this device: Appium directory is invalid
2.10.
Unable to start application while running Android tests on a Windows machine
2.11.
Unable to start application
2.12.
Xcode fails to create a provisioning profile for the WebDriverAgentRunner target
3.
Frequently Asked Questions
3.1.
What is Katalon Studio?
3.2.
What is an Appium Server?
3.3.
What is Carthage?
3.4.
What is WebDriverAgent?
3.5.
What is an API?
4.
Conclusion
Last Updated: Mar 27, 2024
Medium

Troubleshoot Mobile Automated Testing in Katalon Studio

Author Rajat Agrawal
0 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

If you are a testing engineer, you must have worked with various testing platforms and heard of a testing platform known as Katalon Studio. Katalon Studio is an open-source automation testing software tool for web and mobile applications developed by Katalon Inc. in 2015. It is designed to create and reuse automated test scripts for User Interfaces (UIs) without coding.

katalon

In this blog, we will discuss some common issues found while executing mobile testing in Katalon studio.

Common Issues in Mobile Testing in Katalon Studio

Some of the common issues that are found while executing mobile testing are:-

  • An unknown server-side error occurred while processing the command.
     
  • Appium directory is not set.
     
  • Carthage is not found.
     
  • Connected device not displayed in 'Device Name' list.
     
  • Encounter xcodebuild exited with code '65' and signal 'null'.
     
  • Fail to start Appium server in 30 seconds.
     
  • Fail to start the Appium server in 60 seconds.
     
  • Katalon Mobile Recorder and SetText keyword cannot perform on an EditText element of the Flutter-based application.
     
  • Unable to Start Application on this device: Appium directory is invalid.
     
  • Unable to Start Application while running Android tests on a Windows machine.
     
  • Unable to start application.
     
  • Xcode fails to create a provisioning profile for the WebDriverAgentRunner target.
     

Let’s briefly discuss the above issues and their solutions.

An unknown server-side error occurred while processing the command

When you encounter the following error:-

java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command


Cause of Error:

The major causes for the above error are:- 

  • Unable to proxy command to the remote server.
     
  • Timeout of 240000ms exceeded.
     

Solution:

To solve the above issue, follow the below steps:-

  • You have to install the Webdriveragent.
     
  • You have to kill all the running appium processes using the command:- 
killall -9 node
  •  Again, start the AUT.

Appium directory is not set

When you encounter the following error:-

com.kms.katalon.core.appium.exception.AppiumStartException: Appium directory is not set


Cause of Error: 

When we run a test using Katalon Runtime Engine, by default Katalon checks the Appium directory at the APPIUM_HOME environment variable. If the directory is not set, it will throw an error.

Solution:

To solve the above issue, you have to set the appium location by using APPIUM_HOME environment variable.

For Windows: 

C:\Users\AppData\Roaming\npm\node_modules\appium

For Linux/macOS: 

export APPIUM_HOME=/usr/local/lib/node_modules/appium

Carthage is not found

When you encounter the following error:-

Carthage is not found


Cause of Error: 

This is a well-known error of Appium 1.7 with Xcode 9. This error generally occurs correct Carthage package is not installed and available in the PATH environment variable but not visible to the Appium process.

Solution:

To solve the issue, use Katalon Studio 5.1.0.2+.

Connected device not Displayed in 'Device Name' list

When you encounter the error where the device name is not listed in the Device Name list.

Cause of Error: 

The cause of the error is different for iOS and Android devices.

  • For iOS: It may be possible that the UI Automation tool is disabled in the device.
     
  • For Android: It may be possible that the Developer mode is off on the device.
     

Solution:

The solutions for iOS and Android devices are different.

Solution for iOS

If you do testing with iOS devices, make sure that the UI Automation tool is enabled. To enable the UI Automation tool, follow these steps:-

  • Connect the device with Xcode.
     
  • Go to Settings > Developer and turn on UIAutomation.
     
  • To check whether the device is recognized, run the following command on the terminal:-
cd /Applications/Katalon\ Studio.app/Contents/Eclipse/configuration/resources/tools/imobiledevice  idevice_id -l


Solution for Android

If you do testing with Android devices, make sure that the Developer mode is turned on. To turn on the Developer mode, follow these steps:-

  • Connect the phone to a computer via a USB cable.
     
  • Go to Settings > Developer options, and turn on the developer mode by granting permissions to the required settings.
     
  • Ensure a trusted connection is established by tapping on Trust in this computer dialog.
     
  • Check if the device is listed using the adb command.

Encounter xcodebuild exited with Code '65' and signal 'null'

When you encounter the error where the xcodebuild exited with code '65' and signal 'null'.

Cause of Error: 

There is a strong possibility that the .ipa application and/or WebDriverAgent are not signed correctly.

Solution:

To solve the above issue, follow the below steps:-

  • With the help of your developer certificate, sign and rebuild the WebDriverAgent XCode project.
     
  • Uncheck the automatic signing option from WebDriverAgentRunner and select the valid provisioning profile.

Fail to start Appium server in 30 seconds

When you encounter the error where the system fails to start the Appium server in 30 seconds.

Cause of Error: 

The Katalon Studio is unable to start the Appium server within 30 seconds (default timeout).

Solution:

To solve the above issue, you may increase this timeout value from these settings: Project > Settings > Execution > default > Default wait for element timeout (in seconds).

Fail to Start Appium server in 60 seconds

When you encounter one of the following errors:-

  • Fail to start Appium server in 60 seconds.
     
  • Original error: 'x.x.SplashActivity' never started.
     

Cause of Error: 

The root cause of the error can be found by going to Windows > Katalon Studio Preferences > Katalon > Mobile, then setting the Appium Log Level to Debug.

Solution:

The Katalon Studio won’t be able to start the application due to incorrect package and activity by default, so you need to add additional settings:-

  • Navigate to the Mobile settings (Project > Settings > Execution > default > Mobile > Android).
     
  • Add the following key:-
    • Name: appWaitActivity.
       
    • Value: com.* (based on the prefix of 'Found package' log).

Katalon Mobile Recorder and SetText keyword cannot perform on an EditText element of the Flutter-based application

When you encounter the error where the Mobile Recorder and SetText keyword cannot perform on an EditText element of the Flutter-based application.

Cause of Error: 

This type of error can happen with Flutter-based applications.

Solution: 

To solve the above issue, follow the below steps:-

  • Create a SetText Custom keyword.
     
  • Run the test again in script mode.

Unable to Start Application on this device: Appium directory is invalid

When you encounter the following error:-

Unable to Start Application on this device: Appium directory is invalid

Cause of Error: 

Katalon Studio is unable to locate the provided Appium directory.

Solution: 

Check your appium directory twice/thrice and ensure it should be as shown below:-

For Linux/macOS(Katalon Studio > Preferences > Mobile > Appium Directory)

/usr/local/lib/node_modules/appium


For Windows(Windows > Katalon Studio Preferences > Mobile > Appium Directory)

C:\Users\<Username>\AppData\Roaming\npm\node_modules\appium

Unable to start application while running Android tests on a Windows machine

When you encounter the error where the Katalon studio is unable to Start the Application while running Android tests on a Windows machine. 

Cause of Error: 

The Appium version is not updated, and some desired capabilities are not available.

Solution: 

To solve the above issue, follow the below steps:-

  • Upgrade the latest version of Appium.
     
  • In Katalon Studio, go to Project Settings > Desired Capabilities > Mobile > Android and add these desired capabilities:-
    • Name: appWaitActivity.
       
    • Type: String.
       
    • Value: *
android project
  • Click on Apply to save the changes and then run the test again.

Unable to start application

When you encounter the error where the Katalon studio is unable to Start the Application.

Cause of Error: 

There could be multiple causes for the above error, some of them are as follow:-

  • One or more dependencies are missing.
     
  • Dependencies are outdated or incompatible.
     
  • The order of installation of dependencies is wrong.
     
  • Broken WebDriverAgent build package.
     

Solution: 

To solve the above issue, follow the below steps:-

  • Try reinstalling the dependencies.
     
  • Try to rebuild the WebDriverAgent

Xcode fails to create a provisioning profile for the WebDriverAgentRunner target

When you encounter the error where Xcode fails to create a provisioning profile for the WebDriverAgentRunner target.

Cause of Error: 

Xcode is not accepting some identifiers.

Solution: 

To solve the above issue, try manually changing the bundle id for the target by going into the Build Settings tab, and changing the Product Bundle Identifier from com.facebook.WebDriverAgentRunner to something that the Xcode accepts.

Frequently Asked Questions

What is Katalon Studio?

Katalon Studio is an open-source automation testing software tool for web and mobile applications developed by Katalon Inc. in the year 2015. It is designed to create and reuse automated test scripts for User Interfaces (UIs) without coding.

What is an Appium Server?

Appium is an open-source tool for automating mobile web, native, and hybrid applications on  Android mobile, iOS mobile, and Windows desktop platforms. 

What is Carthage?

Carthage is a dependency manager for macOS and iOS developed by a group of GitHub developers.

What is WebDriverAgent?

WebDriverAgent is a WebDriver server that is used to control iOS devices remotely.

What is an API?

API stands for Application Programming Interface, which allows two or more computer applications to communicate with one another.

Conclusion

In this article, we have extensively discussed some common issues found while executing mobile testing in Katalon studio. I hope you enjoyed reading this article on Troubleshoot Mobile Automated Testing in Katalon Studio.

If you want to learn more, check out our articles on Request History and Draft Request in KatalonIntroduction to Desktop App Testing and test objects in KatalonHow to group elements into a unique block with katalon studio, and Using Web Services in a Test Case in Katalon.

Also, check out these exciting courses from coding ninjas to expand your knowledge, Coding CourseCode StudioInterview ExperienceGuided PathInterview ProblemsTest SeriesLibrary, and Resources

Happy Coding!

Live masterclass