test-suite
2023.4
false
Test Suite User Guide
Automation CloudAutomation Cloud Public SectorAutomation SuiteStandalone
Last updated Aug 13, 2024

Troubleshooting scenarios

If you run into problems, consider the following troubleshooting scenarios:

Mobile device automation

The topics below describe the problems, and their corresponding remedies, for Mobile Device Automation.

Workflow and activities generating errors

Description: The workflow in Studio throws unexpected errors, and the activity packages don't display the versions installed.

Cause: Inside your project, the major version of the UI.Automation activity package doesn't match the major version of the Mobile.Automation activity package. For example, the major version of the UI.Automation package installed is 22.10.x, and the major version of the Mobile.Automation package installed is 22.4.x.

Remedy: Make sure that the major versions of the UI.Automation and Mobile.Automation activity packages, installed in your project, match. For example, pair UI.Automation.Activities version 22.10.x only with Mobile.Automation.Activities version 22.10.x.

Important: Always use the latest available patches for the UI.Automation and Mobile.Automation activity packages. For example, if you have UI.Automation or Mobile.Automation 22.10 installed, then download the latest available patches for 22.10.

No route found for wd/hub/ session

Condition: When using Appium 2.0.

Description: No route found for /wd/hub/session.
Remedy: Manually add the following parameter before starting the Appium session: --base-path /wd/hub.

Vendor prefix needed for all non-standard capabilities

Condition: When using Appium 2.0.

Description: All non-standard capabilities should have a vendor prefix.

Remedy: Manually add the appium: prefix for all capabilities, as follows:
  • In the command prompt or terminal, instead of --default-capabilities "{\"systemPort\": 8201}", input --default-capabilities "{\"appium:systemPort\": 8201}".
  • In the Add a device tab from Mobile Device Manager, manually add the appium: prefix before the name of any additional desired capability.

automationName can't be blank

Condition: When using Appium 2.0.

Description: The automationName capability can't be blank.
Remedy: Add appium: as a prefix. For example, appium:automationName.

Can't find the installed driver

Condition: When using Appium 2.0.

Description: Could not find the installed driver to support given caps.

Appium 2.0 doesn't automatically install the required drivers. You have to download them separately.

Remedy: Install the required driver for your platform.

  • For Android devices, install the uiautomator2 driver, using the appium driver install uiautomator2 command.
  • For iOS devices, install the xcuitest driver, using the appium driver install xcuitest command.

Android

The following topics describe the problems for Android devices, and their corresponding remedies.

Connection failure due to InvalidArgumentException for capabilities

Description: Connection between a local device and an application may fail due to an InvalidArgumentException coming from a discrepancy in the expected format of a capability. The issue arises when a capability is entered as a String, while Appium expects a Boolean value. An indicative error message includes:
Failed to create session. 
A new session could not be created. 
Details: io.appium.uiautomator2.common.exceptions.InvalidArgumentException: 
Invalid '<capability name>' setting value type. 
Got java.lang.String. Expected: java.lang.BooleanFailed to create session. 
A new session could not be created. 
Details: io.appium.uiautomator2.common.exceptions.InvalidArgumentException: 
Invalid '<capability name>' setting value type. 
Got java.lang.String. Expected: java.lang.Boolean

Remedy: Uninstall the following apps from the local device:

  • io.appium.uiautomator2.server
  • io.appium.uiautomator2.server.test

Activity failure due to a WebDriverException

Description: Running a mobile automation workflow that automates an Android device may result in a WebDriverException. This error typically displays as Parameters were incorrect. We wanted {\"required\":[\"text\"]} and you sent [\"value\"]", "FaultCode":"WebDriverException"}.

Remedy: Uninstall your current version of UiAutomator 2. Then install a newer version, using the following commands in the given order:

  1. appium driver uninstall uiautomator2
  2. appium driver install uiautomator2@2.29.0, where 2.29.0 is the version that you want to install. You can replace this with any available version.

Appium installation fails due to proxy

Description: Running the npm install -g appium (for Appium 1.x), or npm install -g appium@next (for Appium 2.0) command fails, because you're running behind a proxy. The error throws the following message:
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. 
See: 'npm help config'npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly. 
See: 'npm help config'

Remedy: Configure npm (Node Package Manager) to use your proxy. Follow the steps below:

  1. Fetch your proxy server address, and your port number:

    • Go to Internet Options.
    • Select the Connections tab.
    • Select LAN settings, and copy the content inside the Address, and Port fields.



  2. Return to the Node.js command prompt, and run a command that follows the format below:

    • For HTTP proxies: npm config set http://your_proxy_address:your_port_number.
    • For HTTPS proxies: npm config set https://your_proxy_address:your_port_number.
  3. Run the npm install -g appium (for Appium 1.x), or npm install -g appium@next (for Appium 2.0) command again.

Could not access the provided web context

Description: Could not access the provided web context. Ensure that the Android WebView is debuggable. Visit Remote debugging WebViews for more information about accessing web contexts.

Remedies:

Device not authorized

Description: Device not authorized.

Remedy: Take the following steps:

  1. Use the adb devices command to check the existent devices.
  2. Revoke Debugging on phone.
  3. Restart the ADB server, by using the following commands, in this order: adb kill-server, and then adb start-server.
  4. Reconnect the device, and confirm that you agree to the connection on that device.

Browser Automation while starting from the launch screen

Description: The Android device launches a browser automation instead of the given app, therefore causing errors.

Remedy: Start with a web browser instead.

Android app doesn't launch

Description: the Android app that you created doesn't launch in Mobile Device Manager.

Remedy:

  • Hover over the application and click Edit.
  • Add information about the app inside the App package and App activity fields.

iOS

The topics below describe the problems, and their corresponding remedies, for iOS devices.

Cannot click WebView elements on iOS 13

Description: When you click a WebView element the selector doesn't work, and you can't automate the element.

Remedy: Use simulators with the latest version of iOS and Appium 2.

iOS physical device fails to start

Description: iOS physical device fails to start.

Remedy: Take the following steps:

  • Make sure that your device is trusting the certificate. On your device, go to Settings > General > Profiles & Device Management, tap on the email entry (e.g. Apple Development: username@email.com), and then trust the certificate. If the device is using your corporate account, this would not be needed.
  • If you get an error that port 8100 is not accessible, close Appium (ctrl + c) and then restart it.
  • If you get a different error, consider looking through Appium XCUITest Driver Real Device.

iOS 16.0 device fails to start

Description: iOS 16.0 device fails to start or connect.

Remedy: Install and use Appium 2.0, instead of Appium 1. Check the Local iOS device prerequisites section for more information on installing and managing Appium 2.0.

iOS 12.4.5 malfunctions

Description: iOS 12.4.5 doesn't work as expected while paired with Appium 1.22.3.

Cause: This is caused by an issue with Appium.

Remedy: Choose one of the options below:

  • Use a lower version of Appium, such as 1.17.0.
Important: This may cause issues with the latest version of XCode, and may not work as expected on macOS Monterey.
  • Upgrade the device to versions equal to, or higher than iOS 14.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.