Troubleshooting
Below are some tips to help troubleshoot test automation execution
Cannot start a web automation session
New Appium Session is stuck on creating iOS or Android Driver step.
Sometimes, a new Appium Session is stuck on the code like new AndroidDriver….;
There are two main reasons could be for this issue:
1. Incorrect values for platformVersion, deviceName or udid capabilities. Please check that every item has a proper value according to the Device details.
2. Appropriate Device is present in the Mobitru, but it’s taken now by another user or autotest.
In this case, you can wait for “Available” status or select another device.
New Appium Session failed because of “No available device found” error.
Usually, it means that the Device is present, but the cleanup process is in progress and you need to wait for “Available” status.
Chrome is not started on Xiaomi or Redmi devices.
Some Xiaomi or Redmi devices operate with Android-based OS and have NO Apps like Chrome or Gmail.
According to this, running autotests in Chrome on such devices is impossible.
Error of Android/iOS app uploading
“required field” error.
This error means some API request header is missing (like x-File-Name).
Here is an example of a request for uploading an App file (apk or ipa):curl --location --request POST 'https://app.mobitru.com/billing/unit/<BILLING_UNIT>/automation/api/v1/spaces/artifacts' \ --header 'x-File-Name: AppDemo.apk' \ --header 'X-Content-Type: application/zip' \ --header 'Authorization: Bearer <ACCESS_KEY>' \ --form 'file=@"/path/to/app/file/app-debug.apk"' \ --form 'checksum="None"'
Please compare with your request and make sure that all required headers are present
Unauthorized error.
This error means your Access key is incorrect, corrupted, or invalid.
Please check it or generate a new one.
“No available device…” while finding a device
Irrelevant parameter values.
Sometimes, devices cannot be found, because irrelevant values are used for search criteria.
Here are examples of API requests with irrelevant platform versions or device names:curl --location --request GET 'https://app.mobitru.com/billing/unit/<BILLING_UNIT>/automation/api/device/android?model=Pixel 6 incorrect name' \ --header 'Authorization: Bearer <ACCESS_KEY>'
curl --location --request GET 'https://app.mobitru.com/billing/unit/<BILLING_UNIT>/automation/api/device/ios?version=16.99' \ --header 'Authorization: Bearer <ACCESS_KEY>'
So, please check the criteria in your API request and make sure that at least one available device is related to them.
Filter criteria are not related to any available device.
Sometimes, a combination of several criteria is unrelated to any available device.
Here are examples of an API request with such combination (model and very old version):
curl –location –request GET ‘https://app.mobitru.com/billing/unit/<BILLING_UNIT>/automation/api/device/android?model=Pixel 6&version=4’ \ –header ‘Authorization: Bearer <ACCESS_KEY>’
So, please make sure that your combination of criteria is related to some available device.
There are no devices, assigned to a particular owner.
The Error can be received if owner criteria are used in an API request and there are no assigned devices.
Here is an example of a request:
curl –location –request GET ‘https://app.mobitru.com/billing/unit/<BILLING_UNIT>/automation/api/device/android?owner=me’ \ –header ‘Authorization: Bearer <ACCESS_KEY>’
So, please ensure the device is taken before by the appropriate owner.
Cannot take found device
Device is not available.
This error usually means that the device is already taken by some other person or autotest.
So, please check the Device status and wait for “Available” if it’s busy.
Device not found.
Usually, it means that the Device’s UDID/Serial number is incorrect or related to a non-existent Device.
So, please compare your serial with the value from the Devices list or copy the Serial from the Device Info view.
Unauthorized error.
This error means your Access key is incorrect, corrupted, or invalid.
Please check it or generate a new one.
Cannot install an App to the device
Server error – Device is not taken.
It means, you are trying to install an App on the Device, which is not been taken before.
So, please take the Device via API or in the UI and try installing the App again.
Server error – The App is not uploaded or has an incorrect artifact id.
It means, the App is not uploaded before, or the artifact id is incorrect.
So, please ensure that your App is uploaded to our System via API or in the UI and you use the correct artifact id.
A list of artifacts can be received, also, by a separate API:curl --location --request GET 'https://app.mobitru.com/billing/unit/<BILLING_UNIT>/automation/api/v1/spaces/artifacts' \ --header 'Authorization: Bearer <ACCESS_KEY>'
Server error – Resign with profile is turned off.
Some iOS apps cannot be installed in case of resign with our profile being turned off.
In this case, please ensure the Resign is enabled or the App is adjusted to use without it.
Not allowed to install – an incorrect type of an App.
Usually, the App is built for other platform or device types.
For example, you are trying to install the App, which is prepared for an iOS simulator.
Not allowed to install – incorrect App file.
Looks like the uploaded .apk or .ipa file is corrupted or even empty.
Cannot start a native automation session
Missing required fields.
Please check that the required capabilities are specified before start on a session.
For iOS: deviceName or udid and the App bundleId.
For Android: deviceName or udid and the App appPackage and appActivity.
Incorrect device name or udid.
Please ensure that you use the correct deviceName or udid, which can be retrieved from our Devices List or a Device View.
Irrelevant bundle id or android app activity value.
Sometimes, a Session cannot be started due to an incorrect bundle id or android app activity.
In iOS, you can read this value in the Xcode IDE. More details can be found here.
In case of Android, you can read it in the appropriate configuration XML. More details can be found here.
The App is not installed.
Sometimes, you can receive the start Session error, because the App was not installed and missing on the Device.
In this case, please make sure that you install the App manually before or automatically via API.
More details can be found here Run sample native app test.
Device is not taken.
Sometimes, you can receive the start Session error, because a Device was not taken before via API or using the UI.
In this case, please ensure the Device is taken and the App is installed.
More details can be found here Run sample native app test.
Cannot run Espresso tests
Missing required fields.
Please check that the required information is specified:
For single shard: serial, app_artifact_id and test_artifact_id.
For multiple shards: device_spec, shard_number, app_artifact_id and test_artifact_id.
Access is not allowed error.
In case of a single shard, you can receive such Error, because a Device was not taken before via API or the UI.
In this case, please make sure that the Device is taken.
No devices for provided criteria (in case of multiple shards).
In case of multiple shards, you can receive an Error because no device is provided in device_spec OS version or name.
Please check that both values are correct and that appropriate devices are available on our Platform.
Unauthorized error.
This error means your Access key is incorrect, corrupted, or invalid.
Please check it or generate a new one.
No Tests executed.
Sometimes, test_filters criteria are not related to any tests in a Suite.
According to this, a Run will be created with all artifacts, but the Log will contain “(0 tests)” status.
In this case, please check all test_filters criteria and ensure that at least one test matches them.