# Troubleshooting Guide

# System Configuration and Installation

# PowerShell Security Issue

Users may encounter the error PSSecurityException after executing appium or appium-doctor. Choose one of the methods below to bypass this problem. Execution Policy Issue

First method: Execution Policy configuration via the command line

Open PowerShell as an administrator and run this command Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine, then approve it by typing A or Y and pressing Enter after the confirmation message appears. Execution Policy Confirmation Message

Check this article for more information about PowerShell Script Execution Policy.

Second method: Execution Policy configuration in Settings apps (only Windows 10)

Open Settings then navigate to the For Developers tab under Update & Security. Unapplied settings to run ps script

Scroll down to the PowerShell section then click the Apply button. After that, this section will become blurred. Applied settings to run ps script

# Appium Doctor

Appium Doctor is a useful tool to check if your environment was properly configured. If you have one of the problems below, try re-configuring your environment variables by following this guide after checking that all the necessary components were installed. Environment error checklist with appium doctor If the solution above doesn't work, try to remove and re-install related component such as JDK and Android SDK tools then re-configure the variables. Check this guide for help.


If any Environment Variables changed, you'll need to re-open the command line windows to reload those variables.

# Create a new project

# Issue with "npm i"

When you've successfully created a new project, the default shell on your pc (e.g: Powershell, zsh) will start automatically and run npm i to install the necessary packages for the project. Users can also use npm i to re-install the Gondola Framework.

Sometimes, npm i will have an error after successfully creating a new project, such as this one: JSON Parse-npm i error

You should try to run npm cache clean --force and/or delete the node_modules folder in project's root folder, which contains all downloaded packages, then try running npm i again.

See the documention here for more on the npm cache.

# Running Tests

# Compatibility between Android SDK Platform-Tools and Appium

Appium (e.g: v1.15.1) is not compatible with some Android SDK Platform-Tools versions (e.g: v29.0.0-5611747). The error message will be displayed as below when user runs the test. SDK Tools incompatible error message

If so, you'll need to upgrade it to the latest Android SDK Platform-Tools version. Follow the steps below to complete this process:

  1. Open Android Studio.
  2. Open up the SDK Manager by selecting Tools > SDK Manager from the menu bar. Android SDK Manager
  3. Select Android SDK > SDK Tools. Android SDK Tools
  4. The Status of Android SDK Platform-Tools will be shown as Update Available. Click the checkbox then click Apply to update it. Outdated SDK Tools
  5. Click the OK button in the Confirm Change popup and wait for the installation to complete. SDK Tools update confirm box SDK Tools tools install completely

# The enter keyword is unable to clear a text field on iOS 12.x:

This method is used for entering a string into a text field. It clears the text field before filling it with characters. When using xCode 11 for testing on iOS versions 12.x, this method will not clear the text field, so the entered text will be in the text field along with the initial text. For example, if the field contains the text "username" and you use enter: john the result will be a text field that contains "usernamejohn"

This issue occurs with Appium and XCode 11. The temporary solution is to use xCode 10 for testing on iOS 12.x. For more information, see the issue report here.

Last Updated: 12/28/2020, 4:12:58 AM