Troubleshooting Exceptions on Mobile - (Appium 1.8.1 is Recommended)


#1

Mobile Testing Exception Troubleshooting Tips

Here are some common troubleshooting steps to take when you encounter errors trying to spy, record, or execute a mobile test in Katalon Studio:

If you see one of the following exceptions, you should check your Appium installation:

  • Execution Exception
  • NullPointerException
  • java.util.HashMap cannot be cast to org.openqa.selenium.WebElement
  • Unable to parse remote response
  • Support for xcode 0.1 is not supported. please upgrade to version 7.3 or higher
  • The instrumentation process cannot be initialized

For Android testing:

For best compatibility, it is recommended that you install Appium Server 1.8.1. Please note that this is NOT the same as Appium Desktop. The compatible version of Appium Desktop is 1.6.3 (which includes Appium Server 1.8.1).

To install Appium Server from the command line, using npm:

npm install -g appium@1.8.1

To install Appium Desktop, download an installer from:

For iOS testing:

If you are building with Xcode 10 and/or testing on iOS 12 devices, it is recommended that you install Appium Server 1.8.2-beta. Please note that this is NOT the same as Appium Desktop. At this time, I do not think there is a compatible version of Appium Desktop for Xcode 10/iOS 12 and Katalon Studio.

To install Appium Server from the command line, using npm:

npm install -g appium@1.8.2-beta

SWTException or Web Driver Exception

This can often be seen on Android tests on login, credit card, or other sensitive data screens. Android allows developers to mark these screens as “secure” so that screenshots cannot be taken. This interferes with Katalon Studio’s Mobile Spy and Test Recorder previews, since they rely on screenshots.

Luckily, even after getting this error, you can still capture and export Test Objects on these screens as you normally would, you just won’t see a preview of the screen while you’re doing it.

Could not proxy command to remote server. Original error: Error connect ECONNREFUSED 127.0.0.1:54339

Clearing Appium Processes

Sometimes there are rogue appium processes that don’t exit when there are Katalon errors. These can interview with new tests and causes them to be unresponsive. To try to clear these out, the most straightforward way is to quit Katalon, close the simulators, and restart your computer.

Alternatively, you can check to see if there are running appium processes in the Terminal using ps -ef | grep appium. You might see something like this:

  501 48742     1   0 Fri02PM ??         0:04.12 /usr/local/Cellar/node/9.11.1/bin/node /Users/chris/.nvm/versions/node/v9.2.0/lib/node_modules/appium/build/lib/main.js --tmp /var/folders/90/26pjk1q50wd9xfn9q3q6tkyc0000gn/T//Katalon/Appium/Temp1551470186488 -p 55334 --chromedriver-port 55335 --log-level info --webkit-debug-proxy-port 0
  501 60974     1   0 Sat11PM ??         0:40.81 /usr/local/Cellar/node/9.11.1/bin/node /Users/chris/.nvm/versions/node/v9.2.0/lib/node_modules/appium/build/lib/main.js --tmp /var/folders/90/26pjk1q50wd9xfn9q3q6tkyc0000gn/T//Katalon/Appium/Temp1551587426507 -p 51192 --chromedriver-port 51193 --log-level info --webkit-debug-proxy-port 0

In these cases, the 2nd column is the process id, e.g. 48742 and 60974. To kill those processes, you can use kill <processid> in the Terminal where <processid> is the id from the listing. If they don’t seem to close, you can be more forceful with kill -9 <processid>.

Try re-running your tests after the processes have been cleared up.

No mobile device with name <device_name> available

This can often be caused by not calling the MobileBuiltInKeywords.startApplication() function at the beginning of a test or calling the function with a non-existent app file.


unable to start application on this device : An unknown server-side error occured while processing the command. Original error : the instrumentation process cannot be initialized
I can't spy or record on android mobile
Recorder fails to install apk on mobile devcie
Unable to start app at the desired location-Android Mobile
Mobile testing - error occurred while starting application
java.lang.NullPointerException
'No Driver Found' is causing scripts failure
Cannot launch application on real iOS device - Original error : "null" cannot be coerced
Unable to start application on this device: : An unknown server-side error occurred while processing the command. Original error: Could not install app: 'Command 'ios-deploy --id
Error executing adbExec
Xcode 10 Not Supported in Katalon 5.7.1
Katalon run on iOS 12
I don't know why,please help me!
Common code for Android and IOS
Fail to start the Appium server in 60 seconds?
Cannot use recorder on android
IOS test shows Error 2
Can't start iOS app with katalon
Unable to set Android device "Online" and getting below error
Can't run mobile recorder
Katalon mobile stuck when running on simulator
Unable to start application on this device,: Unable to parse remote response: Parameters were incorr
#2

#3

Nice move @Chris_Trevarthen

I feel bad for seeing you regularly recommending users to install Appium 1.8.1.

Now you can just bookmark this and quote it. :rofl:

Regards !