Appium: custom android app keeps crashing on launch - java

Have a problem where all of a sudden a previously working appium based android app selenium test has stopped working as it did (consistently successful).
The issue is specifically to do with the launch of the app by appium (the app always launches when opened with physical user input..). Basically the app launches, the loading screen appears and then it crashes. This happens most of the time but not always. I've found it usually works fine initially after restarting the phone. However, it'll crash on subsequent runs.
Any assistance would be much appreciated. Tried many things/searching online already but it's all been to of no avail..
Here's the appium output:
[AndroidDriver] Parsed pid: '27608' pkg: 'com.dedsert.betbright.uat' from
[AndroidDriver] USER PID PPID VSIZE RSS WCHAN PC NAME
[AndroidDriver] u0_a236 27608 4736 3621124 393160 0 0000000000 R com.dedsert.betbright.uat
[AndroidDriver] Returning process name: 'com.dedsert.betbright.uat'
[AndroidDriver] Found webviews: ["WEBVIEW_com.dedsert.betbright.uat"]
[AndroidDriver] Available contexts: ["NATIVE_APP","WEBVIEW_com.dedsert.betbright.uat"]
[MJSONWP] Responding to client with driver.setContext() result: null
[HTTP] <-- POST /wd/hub/session/a9457315-d657-4fd1-bdf0-36fe5d76b3c5/context 200 245 ms - 76
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_RESULT: shortMsg=java.lang.StackOverflowError
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_RESULT: longMsg=stack size 1037KB
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_CODE: 0
[UiAutomator] UiAutomator exited unexpectedly with code 4294967295, signal null
[UiAutomator] Moving to state 'stopped'
[AndroidDriver] Shutting down Android driver
[Appium] Closing session, cause was 'UiAUtomator shut down unexpectedly'
[Appium] Removing session a9457315-d657-4fd1-bdf0-36fe5d76b3c5 from our master session list
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\kroring\AppData\Local\Android\Sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","ce051715c336451002","shell","am","force-stop","com.dedsert.betbright.uat"]
[ADB] Pressing the HOME button
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\kroring\AppData\Local\Android\Sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","ce051715c336451002","shell","input","keyevent",3]
[AndroidBootstrap] Cannot shut down Android bootstrap; it has already shut down
[Logcat] Stopping logcat capture
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\kroring\AppData\Local\Android\Sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","ce051715c336451002","shell","am","force-stop","io.appium.unlock"]
[AndroidDriver] Not cleaning generated files. Add `clearSystemFiles` capability if wanted.
[HTTP] --> POST /wd/hub/session/a9457315-d657-4fd1-bdf0-36fe5d76b3c5/context {"name":"WEBVIEW_com.dedsert.betbright.uat"}
[HTTP] <-- POST /wd/hub/session/a9457315-d657-4fd1-bdf0-36fe5d76b3c5/context 404 1 ms - 131
Not a whole lot to be seen on the IntelliJ side - did spot this in the stacktrace given:
org.openqa.selenium.remote.SessionNotFoundException: A session is either terminated or not started (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 5 milliseconds

Uninstall appium and reinstall appium and it will work for you.
From command line.
npm uninstall -g appium
Reinstall the appium.
npm install -g appium

Looks like your phone is out of memory. It could be worthwhile to clear the cache of your testing phone :
Power off your device. This method is different for different
manufacturers, and you should look it up on the internet before
proceeding further.
Load into your bootloader screen by holding down
a combination of keys. In some devices, you have to press the Power
button with Volume down key simultaneously. In other devices, Power
button with both the Volume keys have to pressed simultaneously.
Touchscreen might not work, and you have to navigate using Volume
keys.
Go to Recovery and select it with a tap on the Power button.
Go to Wipe cache partition and tap the Power button to select it.
After the cache gets cleared, select Reboot system now.
Information from (step 4): https://fossbytes.com/clear-android-cache-data-quick-methods/

Related

Appium error packageAndLaunchActivityFromManifest failed

I'm currently learning how to use Appium.
My workspace looks as following:
I'm using Windows 10 Pro
Android Studio 3.6.1 as my IDE
The AVD-Manager from Android Studio
Adb as a Bridge
Desktop-Appium 1.15
And Java jdk-14
After quite some time I got everything to work. I think my PATH variables are set correctly, I can call Java and adb in cmd.
So I wanted to start some test cases, where I want to automate the login of a mail app.
Here I run into the error.
#
# Log Appium Server
#
[UiAutomator2] Unable to remove port forward 'Error executing adbExec. Original error: 'Command 'C:\\Users\\Yggdrasil\\AppData\\Local\\Android\\Sdk\\platform-tools\\adb.exe -P 5037 -s emulator-5554 forward --remove tcp\:8200' exited with code 1'; Stderr: 'adb.exe: error: listener 'tcp:8200' not found'; Code: '1''
[UiAutomator2] Restoring hidden api policy to the device default configuration
[ADB] Running 'C:\Users\Yggdrasil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell settings delete global hidden_api_policy_pre_p_apps'
[ADB] Running 'C:\Users\Yggdrasil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell settings delete global hidden_api_policy_p_apps'
[ADB] Running 'C:\Users\Yggdrasil\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell settings delete global hidden_api_policy'
[BaseDriver] Event 'newSessionStarted' logged at 1585093850179 (00:50:50 GMT+0100 (Mitteleuropäische Zeit))
[MJSONWP] Encountered internal error running command: Error: packageAndLaunchActivityFromManifest failed. Original error: Command 'java -jar C:\\Users\\Yggdrasil\\AppData\\Local\\Programs\\Appium\\resources\\app\\node_modules\\appium\\node_modules\\appium-adb\\jars\\appium_apk_tools.jar printLaunchActivity C:\\Users\\Yggdrasil\\Downloads\\gmx-6.5.7.apk C:\\Users\\YGGDRA~1\\AppData\\Local\\Temp\\de.gmx.mobile.android.mail' exited with code 1; StdErr: Exception in thread "main" java.lang.NoSuchFieldException: modifiers
[MJSONWP] at java.base/java.lang.Class.getDeclaredField(Class.java:2489)
[MJSONWP] at io.appium.apktools.StringsXML.silenceLogger(StringsXML.java:120)
[MJSONWP] at io.appium.apktools.Main.main(Main.java:25)
[MJSONWP]
[MJSONWP] at ADB.packageAndLaunchActivityFromManifest (C:\Users\Yggdrasil\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\android-manifest.js:136:9)
[HTTP] <-- POST /wd/hub/session 500 1350 ms - 844
[HTTP]
[HTTP] --> DELETE /wd/hub/session
[HTTP] {}
[HTTP] No route found. Setting content type to 'text/plain'
[HTTP] <-- DELETE /wd/hub/session 404 3 ms - 57
[HTTP]
Here are the Appium Desired Capabilities:
{
"platformName": "Android",
"deviceName": "Android Emulator",
"appPackage": "de.gmx.mobile.android.mail",
"appWaitActivity": "com.unitedinternet.portal.ui.login.LoginActivity",
"app": "C:\\Users\\Yggdrasil\\Downloads\\gmx-6.5.7.apk"
}
I googled about Error: packageAndLaunchActivityFromManifest but didn't found a way to solve this for me. Hit me up if you need any more information! Thank you for your time. I greatly appreciate your help!
NOTE:
Instead of adb shell "dumpsys window windows | grep -E 'mCurrentFocus'" I have to use adb shell "dumpsys window windows | grep -E 'mObscuringWindow'" to get the appPackage for Appium Desired Capabilities
Is this from the new Version of adb or AVD?
I found the mistake.
Apparently Appium and Android Studio 3.6 don't go together very well.
Appium is using the SDK tools, you had to edit to the PATH viable. But Android Studio 3.6 is using a new version of SDK tools, so Appium wasn't able to find them properly.
I found this mistake with AppiumDoctor.
After Downgrading Android Studio to version 3.3 all works properly.

Can't start appium inspector session: exited with code 255

I am trying to start an appium inspector session, however I keep having problems with apkanalyzer.bat, now I received the following message:
Using 'apkanalyzer.bat' from 'C:\Users\ayla_\AppData\Local\Android\Sdk\tools\bin\apkanalyzer.bat'
[ADB] Starting 'C:\Users\ayla_\AppData\Local\Android\Sdk\tools\bin\apkanalyzer.bat' with args ["-h","manifest","print","C:\\Users\\ayla_\\Documents\\Documentos_Ayla\\Treinamentos\\Automacao Mobile\\File Manager by Astro File Browser_v7.4.0_apkpure.com.apk"]
[ADB] Using the alternative activity name detection method because of: Command 'C\:\\Users\\ayla_\\AppData\\Local\\Android\\Sdk\\tools\\bin\\apkanalyzer.bat -h manifest print 'C:\\Users\\ayla_\\Documents\\Documentos_Ayla\\Treinamentos\\Automacao Mobile\\File Manager by Astro File Browser_v7.4.0_apkpure.com.apk'' exited with code 255
[ADB] Extracting package and launch activity from manifest
[AndroidDriver] Shutting down Android driver
[AndroidDriver] Called deleteSession but bootstrap wasn't active
[Logcat] Stopping logcat capture
[ADB] Running 'C:\Users\ayla_\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell am force-stop io.appium.unlock'
[AndroidDriver] Not cleaning generated files. Add `clearSystemFiles` capability if wanted.
[BaseDriver] Event 'newSessionStarted' logged at 1569549028506 (22:50:28 GMT-0300 (Hora oficial do Brasil))
[MJSONWP] Encountered internal error running command: Error: packageAndLaunchActivityFromManifest failed. Original error: Command 'java -jar C\:\\Users\\ayla_\\AppData\\Local\\Programs\\appium-desktop\\resources\\app\\node_modules\\appium\\node_modules\\appium-adb\\jars\\appium_apk_tools.jar printLaunchActivity 'C:\\Users\\ayla_\\Documents\\Documentos_Ayla\\Treinamentos\\Automacao Mobile\\File Manager by Astro File Browser_v7.4.0_apkpure.com.apk' C\:\\Users\\ayla_\\AppData\\Local\\Temp\\com.metago.astro' exited with code 1; StdErr: Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x7f060046 color/common_google_signin_btn_text_dark_default, config=[DEFAULT]
If someone knows the solution to this problem, please share with me.

Appium scripts are getting failed, after hitting url successful

Appium scripts are getting failed, after hitting url successful.
Selenium Oxygen 2
Appium version 1.2.7
Url hit the browser open the link, after some page gates refreshed and then again url reopened in new tab within the same chrome browser.
url " us.justdial.com" opeing in the chrome browser still scripts are getting failed. Have already updated chrome driver.
Below are the scripts
import java.net.MalformedURLException;
import java.net.URL;
//import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeUnit;
/*import org.openqa.selenium.Capabilities;
import org.openqa.selenium.Platform;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriver.Timeouts;
import org.openqa.selenium.chrome.ChromeDriver;*/
//import org.openqa.selenium.android.AndroidDriver;
//import org.openqa.selenium.remote.BrowserType;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
//import org.openqa.selenium.remote.RemoteWebDriver;
//import org.openqa.selenium.remote.RemoteWebDriver;
//import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.android.AndroidDriver;
//import io.appium.java_client.remote.MobileCapabilityType;
public class Appium_device {
//String driverPath = "F:/ChromeDriver/chromedriver.exe";
public AppiumDriver driver;
#Test
public void Appium_device() throws MalformedURLException, Exception {
{
// APPLICATION_LOG.info("Initializing project properties");
DesiredCapabilities capabilities = new DesiredCapabilities();
// Set android deviceName desired capability. Set your device name.
// capabilities.setCapability("deviceName", "5203a1bbea4a8385");
// capabilities.setCapability("deviceName", "4100df0accbd9f00");
// capabilities.setCapability("deviceName", "0123456789ABCDEF");
capabilities.setCapability("deviceName", "4d007af54ac04177");
// Set BROWSER_NAME desired capability. It's Android in our case here.
capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android");
// capabilities.setCapability("browsername", "chrome");
capabilities.setCapability("chromedriverExecutable", "C:/Users/vaibhavsi/Downloads/chromedriver_win32/chromedriver.exe");
// Set android VERSION desired capability. Set your mobile device's OS version.
// capabilities.setCapability(CapabilityType.VERSION, "4.2.2");
// capabilities.setCapability(CapabilityType.VERSION, "6.0.1");
capabilities.setCapability(CapabilityType.VERSION, "6.0.1");
// Set android platformName desired capability. It's Android in our case here.
capabilities.setCapability("platformName", "Android");
// Set android appPackage desired capability. It is
// com.android.calculator2 for calculator application.
// Set your application's appPackage if you are using any other app.
// capabilities.setCapability("appPackage", "org.mozilla.firefox");
capabilities.setCapability("appPackage", "com.android.chrome");
// Set android appActivity desired capability. It is
// com.android.calculator2.Calculator for calculator application.
// Set your application's appPackage if you are using any other app.
capabilities.setCapability("appActivity", "com.google.android.apps.chrome.Main");
// Created object of RemoteWebDriver will all set capabilities.
// Set appium server address and port number in URL string.
// It will launch calculator app in android device.
// webdriver.Chrome(executable_path='C:\Users\Ganeshkumarg\Downloads\chromedriver_win32\chromedriver.exe');
// RemoteWebDriver webDriver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
// webDriver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
try {
driver = new AppiumDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);
}catch(MalformedURLException e)
{
e.printStackTrace();
}
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
System.out.println("Step 9");
try {
driver.get("https://us.justdial.com");
System.out.println("site hit");
}
catch (Exception e) {
System.out.println("site not accessed");
throw (e);
// TODO: handle exception
}
}
}
}
Following are the appium error logs
[Appium] Welcome to Appium v1.7.1
[Appium] Non-default server args:
[Appium] address: 127.0.0.1
[Appium] Appium REST http interface listener started on 127.0.0.1:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"appActivity":"com.google.android.apps.chrome.Main","appPackage":"com.android.chrome","browserName":"Android","chromedriverExecutable":"C:/Users/vaibhavsi/Downloads/chromedriver_win32/chromedriver.exe","deviceName":"4d007af54ac04177","platformName":"Android","version":"6.0.1"},"capabilities":{"desiredCapabilities":{"appActivity":"com.google.android.apps.chrome.Main","appPackage":"com.android.chrome","browserName":"Android","chromedriverExecutable":"C:/Users/vaibhavsi/Downloads/chromedriver_win32/chromedriver.exe","deviceName":"4d007af54ac04177","platformName":"Android","version":"6.0.1"},"firstMatch":[{"browserName":"Android","platformName":"android"}]}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"appActivity":"com.google.android.apps.chrome.Main","appPackage":"com.android.chrome","browserName":"Android","chromedriverExecutable":"C:/Users/vaibhavsi/Downloads/chromedriver_win32/chromedriver.exe","deviceName":"4d007af54ac04177","platformName":"Android","version":"6.0.1"},null,{"desiredCapabilities":{"appActivity":"com.google.android.apps.chrome.Main","appPackage":"com.android.chrome","browserName":"Android","chromedriverExecutable":"C:/Users/vaibhavsi/Downloads/chromedriver_win32/chromedriver.exe","deviceName":"4d007af54ac04177","platformName":"Android","version":"6.0.1"},"firstMatch":[{"browserName":"Android","platformName":"android"}]}]
[BaseDriver] Event 'newSessionRequested' logged at 1515140901130 (13:58:21 GMT+0530 (India Standard Time))
[Appium] Creating new AndroidDriver (v1.28.1) session
[Appium] Capabilities:
[Appium] appActivity: 'com.google.android.apps.chrome.Main'
[Appium] appPackage: 'com.android.chrome'
[Appium] browserName: 'Android'
[Appium] chromedriverExecutable: 'C:/Users/vaibhavsi/Downloads/chromedriver_win32/chromedriver.exe'
[Appium] deviceName: '4d007af54ac04177'
[Appium] platformName: 'Android'
[Appium] version: '6.0.1'
[BaseDriver] The following capabilities were provided, but are not recognized by appium: version.
[BaseDriver] Session created with session id: b284c843-d3e4-4d13-94aa-a9f752377fe8
[AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_144
[ADB] Checking whether adb is present
[ADB] Using adb.exe from C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[AndroidDriver] Using device: 4d007af54ac04177
[ADB] Checking whether adb is present
[ADB] Using adb.exe from C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe
[ADB] Setting device id to 4d007af54ac04177
[AndroidDriver] App file was not listed, instead we're going to run com.android.chrome directly on the device
[AndroidDriver] Checking whether package is present on the device
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","pm","list","packages","com.android.chrome"]
[AndroidDriver] Starting Android session
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","wait-for-device"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","echo","ping"]
[Logcat] Starting logcat capture
[AndroidDriver] Pushing settings apk to device...
[ADB] Uninstalling and re-installing 'io.appium.settings'
[ADB] Uninstalling io.appium.settings
[ADB] Getting install status for io.appium.settings
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","pm","list","packages","io.appium.settings"]
[ADB] App is installed
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","am","force-stop","io.appium.settings"]
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","uninstall","io.appium.settings"]
[ADB] ADB command output: Success
[ADB] io.appium.settings was successfully uninstalled
[ADB] Getting install status for io.appium.settings
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","pm","list","packages","io.appium.settings"]
[ADB] App is not installed
[ADB] App 'C:\Users\vaibhavsi\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\io.appium.settings\app\build\outputs\apk\settings_apk-debug.apk' not installed. Installing
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","install","C:\\Users\\vaibhavsi\\AppData\\Local\\Programs\\appium-desktop\\resources\\app\\node_modules\\appium\\node_modules\\io.appium.settings\\app\\build\\outputs\\apk\\settings_apk-debug.apk"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","getprop","ro.build.version.sdk"]
[ADB] Current device property 'ro.build.version.sdk': 23
[ADB] Device API level: 23
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","dumpsys","package","io.appium.settings"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","pm","dump","io.appium.settings"]
[ADB] Got the following command chunks to execute: pm,grant,io.appium.settings,android.permission.INTERNET,;,pm,grant,io.appium.settings,android.permission.CHANGE_NETWORK_STATE,;,pm,grant,io.appium.settings,android.permission.ACCESS_NETWORK_STATE,;,pm,grant,io.appium.settings,android.permission.READ_PHONE_STATE,;,pm,grant,io.appium.settings,android.permission.WRITE_SETTINGS,;,pm,grant,io.appium.settings,android.permission.CHANGE_WIFI_STATE,;,pm,grant,io.appium.settings,android.permission.ACCESS_WIFI_STATE,;,pm,grant,io.appium.settings,android.permission.ACCESS_FINE_LOCATION,;,pm,grant,io.appium.settings,android.permission.ACCESS_COARSE_LOCATION,;,pm,grant,io.appium.settings,android.permission.ACCESS_MOCK_LOCATION,;,pm,grant,io.appium.settings,android.permission.SET_ANIMATION_SCALE,;
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","pm","grant","io.appium.settings","android.permission.INTERNET",";","pm","grant","io.appium.settings","android.permission.CHANGE_NETWORK_STATE",";","pm","grant","io.appium.settings","android.permission.ACCESS_NETWORK_STATE",";","pm","grant","io.appium.settings","android.permission.READ_PHONE_STATE",";","pm","grant","io.appium.settings","android.permission.WRITE_SETTINGS",";","pm","grant","io.appium.settings","android.permission.CHANGE_WIFI_STATE",";","pm","grant","io.appium.settings","android.permission.ACCESS_WIFI_STATE",";","pm","grant","io.appium.settings","android.permission.ACCESS_FINE_LOCATION",";","pm","grant","io.appium.settings","android.permission.ACCESS_COARSE_LOCATION",";","pm","grant","io.appium.settings","android.permission.ACCESS_MOCK_LOCATION",";","pm","grant","io.appium.settings","android.permission.SET_ANIMATION_SCALE",";"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","ps"]
[ADB] Device API level: 23
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","am","start","-W","-n","io.appium.settings/.Settings","-a","android.intent.action.MAIN","-c","android.intent.category.LAUNCHER","-f","0x10200000"]
[ADB] Device API level: 23
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","appops","set","io.appium.settings","android:mock_location","allow"]
[AndroidDriver] Pushing unlock helper app to device...
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","install","C:\\Users\\vaibhavsi\\AppData\\Local\\Programs\\appium-desktop\\resources\\app\\node_modules\\appium\\node_modules\\appium-unlock\\bin\\unlock_apk-debug.apk"]
[ADB] Getting device platform version
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","getprop","ro.build.version.release"]
[ADB] Current device property 'ro.build.version.release': 6.0.1
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","wm","size"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","getprop","ro.product.model"]
[ADB] Current device property 'ro.product.model': SM-G900H
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","getprop","ro.product.manufacturer"]
[ADB] Current device property 'ro.product.manufacturer': samsung
[AndroidDriver] No app sent in, not parsing package/activity
[AndroidDriver] No app capability. Assuming it is already on the device
[AndroidDriver] Running fast reset (stop and clear)
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","am","force-stop","com.android.chrome"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","pm","clear","com.android.chrome"]
[AndroidBootstrap] Watching for bootstrap disconnect
[ADB] Forwarding system: 4724 to device: 4724
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","forward","tcp:4724","tcp:4724"]
[UiAutomator] Starting UiAutomator
[UiAutomator] Moving to state 'starting'
[UiAutomator] Parsing uiautomator jar
[UiAutomator] Found jar name: 'AppiumBootstrap.jar'
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","push","C:\\Users\\vaibhavsi\\AppData\\Local\\Programs\\appium-desktop\\resources\\app\\node_modules\\appium\\node_modules\\appium-android-bootstrap\\bootstrap\\bin\\AppiumBootstrap.jar","/data/local/tmp/"]
[ADB] Attempting to kill all uiautomator processes
[ADB] Getting all processes with uiautomator
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","ps"]
[ADB] No uiautomator process found to kill, continuing...
[UiAutomator] Starting UIAutomator
[ADB] Creating ADB subprocess with args: ["-P",5037,"-s","4d007af54ac04177","shell","uiautomator","runtest","AppiumBootstrap.jar","-c","io.appium.android.bootstrap.Bootstrap","-e","pkg","com.android.chrome","-e","disableAndroidWatchers",false,"-e","acceptSslCerts",false]
[UiAutomator] Moving to state 'online'
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers.
[AndroidBootstrap] Android bootstrap socket is now connected
[ADB] Getting connected devices...
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","dumpsys","window"]
[AndroidDriver] Screen already unlocked, doing nothing
[ADB] Device API level: 23
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","am","start","-W","-n","com.android.chrome/com.google.android.apps.chrome.Main","-S"]
[Appium] New AndroidDriver session created successfully, session b284c843-d3e4-4d13-94aa-a9f752377fe8 added to master session list
[BaseDriver] Event 'newSessionStarted' logged at 1515140936767 (13:58:56 GMT+0530 (India Standard Time))
[MJSONWP] Responding to client with driver.createSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"appActivity":"com.google.android.apps.chrome.Main","appPackage":"com.android.chrome","browserName":"Android","chromedriverExecutable":"C:/Users/vaibhavsi/Downloads/chromedriver_win32/chromedriver.exe","deviceName":"4d007af54ac04177","platformName":"Android","version":"6.0.1"},"appActivity":"com.google.android.apps.chrome.Main","appPackage":"com.android.chrome","browserName":"Android","chromedriverExecutable":"C:/Users/vaibhavsi/Downloads/chromedriver_win32/chromedriver.exe","deviceName":"4d007af54ac04177","platformName":"Android","version":"6.0.1","deviceUDID":"4d007af54ac04177","platformVersion":"6.0.1","deviceScreenSize":"1080x1920","deviceModel":"SM-G900H","deviceManufacturer":"samsung"}
[HTTP] <-- POST /wd/hub/session 200 35735 ms - 978
[HTTP] --> POST /wd/hub/session/b284c843-d3e4-4d13-94aa-a9f752377fe8/timeouts {"type":"implicit","ms":10000}
[MJSONWP] Calling AppiumDriver.timeouts() with args: ["implicit",10000,"b284c843-d3e4-4d13-94aa-a9f752377fe8"]
[BaseDriver] Set implicit wait to 10000ms
[MJSONWP] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/b284c843-d3e4-4d13-94aa-a9f752377fe8/timeouts 200 5 ms - 76
[HTTP] --> POST /wd/hub/session/b284c843-d3e4-4d13-94aa-a9f752377fe8/url {"url":"https://us.justdial.com"}
[MJSONWP] Calling AppiumDriver.setUrl() with args: ["https://us.justdial.com","b284c843-d3e4-4d13-94aa-a9f752377fe8"]
[ADB] Getting connected devices...
[ADB] 1 device(s) connected
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","am","start","-W","-a","android.intent.action.VIEW","-d","https://us.justdial.com","com.android.chrome"]
[ADB] Running 'C:\Users\vaibhavsi\AppData\Local\Android\android-sdk\platform-tools\adb.exe' with args: ["-P",5037,"-s","4d007af54ac04177","shell","am","start","-W","-a","android.intent.action.VIEW","-d","https://us.justdial.com","com.android.chrome"]
[ADB] Error: Error attempting to start URI. Original error: Error: Error executing adbExec. Original error: 'Command 'C\:\\Users\\vaibhavsi\\AppData\\Local\\Android\\android-sdk\\platform-tools\\adb.exe -P 5037 -s 4d007af54ac04177 shell am start -W -a android.intent.action.VIEW -d https\://us.justdial.com com.android.chrome' timed out after 20000ms'; Stderr: ''; Code: 'null'
at Object.wrappedLogger.errorAndThrow (C:\Users\vaibhavsi\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-support\lib\logging.js:63:13)
at ADB.callee$0$0$ (C:\Users\vaibhavsi\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\apk-utils.js:47:9)
at tryCatch (C:\Users\vaibhavsi\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\vaibhavsi\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (C:\Users\vaibhavsi\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (C:\Users\vaibhavsi\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
Error: Error attempting to start URI. Original error: Error: Error executing adbExec. Original error: 'Command 'C\:\\Users\\vaibhavsi\\AppData\\Local\\Android\\android-sdk\\platform-tools\\adb.exe -P 5037 -s 4d007af54ac04177 shell am start -W -a android.intent.action.VIEW -d https\://us.justdial.com com.android.chrome' timed out after 20000ms'; Stderr: ''; Code: 'null'
at Object.wrappedLogger.errorAndThrow (C:\Users\vaibhavsi\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-support\lib\logging.js:63:13)
at ADB.callee$0$0$ (C:\Users\vaibhavsi\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\apk-utils.js:47:9)
at tryCatch (C:\Users\vaibhavsi\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\vaibhavsi\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (C:\Users\vaibhavsi\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (C:\Users\vaibhavsi\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
[MJSONWP] Encountered internal error running command: Error: Error attempting to start URI. Original error: Error: Error executing adbExec. Original error: 'Command 'C\:\\Users\\vaibhavsi\\AppData\\Local\\Android\\android-sdk\\platform-tools\\adb.exe -P 5037 -s 4d007af54ac04177 shell am start -W -a android.intent.action.VIEW -d https\://us.justdial.com com.android.chrome' timed out after 20000ms'; Stderr: ''; Code: 'null'
at Object.wrappedLogger.errorAndThrow (C:\Users\vaibhavsi\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-support\lib\logging.js:63:13)
at ADB.callee$0$0$ (C:\Users\vaibhavsi\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\apk-utils.js:47:9)
at tryCatch (C:\Users\vaibhavsi\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\vaibhavsi\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (C:\Users\vaibhavsi\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (C:\Users\vaibhavsi\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session/b284c843-d3e4-4d13-94aa-a9f752377fe8/url 500 40572 ms - 553
Frequent Error:
An unknown server-side error occurred while processing the command. Original error: Error attempting to start URI. Original error: Error: Error executing adbExec. Original error: 'Command 'C\:\\Users\\vaibhavsi\\AppData\\Local\\Android\\android-sdk\\platform-tools\\adb.exe -P 5037 -s 4d007af54ac04177 shell am start -W -a android.intent.action.VIEW -d https\://us.justdial.com com.android.chrome' timed out after 20000ms'; Stderr: ''; Code: 'null' (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Please look into same.
Since you are trying to test web app in browser, why not to do it this way:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "Android Emulator");
capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, MobileBrowserType.BROWSER);
// if chrome is installed, but not default one - use MobileBrowserType.CHROME
AppiumDriver<MobileElement> driver = new AndroidDriver<>(
new URL("http://127.0.0.1:4723/wd/hub"),
capabilities
);
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.get("https://us.justdial.com");
It works perfectly for me with Appium java client 5.0.4 / server 1.7.1
Removed "Unlock" and "Appium settings" apps from device - Appium installs those apps automatically.
Also, passed appium arguments in my scripts. Below are the changes:
import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import io.appium.java_client.AppiumDriver;
public class Appium_device {
//String driverPath = "F:/ChromeDriver/chromedriver.exe";
AppiumDriver<?> driver;
#BeforeTest
public void Appium_device() throws MalformedURLException, Exception {
{
// APPLICATION_LOG.info("Initializing project properties");
DesiredCapabilities capabilities = new DesiredCapabilities();
// Set android deviceName desired capability. Set your device name.
// capabilities.setCapability("deviceName", "5203a1bbea4a8385");
// capabilities.setCapability("deviceName", "4100df0accbd9f00");
// capabilities.setCapability("deviceName", "0123456789ABCDEF");
capabilities.setCapability("deviceName", "4d007af54ac04177");
// Set BROWSER_NAME desired capability. It's Android in our case here.
capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android");
// capabilities.setCapability("browsername", "chrome");
// capabilities.setCapability("chromedriverExecutable", "C:/Users/vaibhavsi/Downloads/chromedriver_win32/chromedriver.exe");
// Set android VERSION desired capability. Set your mobile device's OS version.
// capabilities.setCapability(CapabilityType.VERSION, "4.2.2");
// capabilities.setCapability(CapabilityType.VERSION, "6.0.1");
capabilities.setCapability(CapabilityType.VERSION, "6.0.1");
// Set android platformName desired capability. It's Android in our case here.
capabilities.setCapability("platformName", "Android");
// Set android appPackage desired capability. It is
// com.android.calculator2 for calculator application.
// Set your application's appPackage if you are using any other app.
// capabilities.setCapability("appPackage", "org.mozilla.firefox");
capabilities.setCapability("appPackage", "com.android.chrome");
// Set android appActivity desired capability. It is
// com.android.calculator2.Calculator for calculator application.
// Set your application's appPackage if you are using any other app.
capabilities.setCapability("appActivity", "com.google.android.apps.chrome.Main");
// capability.setCapability("binary", "C:\Program Files\Google\Chrome\Application");
// Created object of RemoteWebDriver will all set capabilities.
// Set appium server address and port number in URL string.
// It will launch calculator app in android device.
// webdriver.Chrome(executable_path='C:\Users\Ganeshkumarg\Downloads\chromedriver_win32\chromedriver.exe');
// RemoteWebDriver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
// webDriver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
// capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "Android Emulator");
// capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, MobileBrowserType.BROWSER);
driver = new AppiumDriver<WebElement>(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
}
}
#Test
public void launch() throws Exception {
try {
//driver.get("https://us.justdial.com");
driver.navigate().to("https://us.justdial.com");
System.out.println("site hit");
}
catch (Exception e) {
System.out.println("site not accessed");
throw (e);
// TODO: handle exception
}
}}
Thanks a ton to all for your helpful suggestions.

Android ADB detect emulator as offline

When I run my codes, the android ADB detect the emulator as offline, although I have turned on the emulator. I am using AMD processor. I'm running armebiv7 device image.
Here's the error that I get.
emulator: WARNING: Crash service did not start
emulator: WARNING: Classic qemu does not support SMP. The hw.cpu.ncore > option from your config file is ignored.
emulator: Listening for console connections on port: 5554
emulator: Serial number of this emulator (for ADB): emulator-5554
emulator: WARNING: UpdateCheck: Failure: Error
Thanks!

Appium: How do you run Java tests and devices on local machine against a remote appium server

Is it possible to have Appium running on a remote machine, while having a device connected to a local machine, and also run the tests from the local machine?
Currently, Appium continues to check adb for devices where Appium is running (which of course there is none) and fails after timing out. I have zero problems running Appium locally.
Here are my Capabilities running from the Local machine where the device is connected ( IP: 192.168.1.78 ) :
#Before
public void setUp() throws Exception
{
final DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
capabilities.setCapability("appium-version", "1.2");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("platformVersion", "4.4");
capabilities.setCapability("deviceName", "SCH-I545");
capabilities.setCapability("appPackage", "<appPackage_goes_here>");
capabilities.setCapability("appActivity", "<appActivity_goes_here>");
driver = new AppiumDriver(new URL("http://192.168.2.109:4723/wd/hub"), capabilities);
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
}
And here is the Appium Console Log from the Remote machine ( IP: 192.168.2.109 ):
QA1#QA1s-Mac-mini:3.2: ~/appium :$node .
info: Welcome to Appium v1.2.0 (REV 83e64a139b928fb1f6c06e50370f9f0140ecaa30)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: LogLevel: debug
info: --> POST /wd/hub/session {"desiredCapabilities":{"platformVersion":"4.4","platformName":"Android","deviceName":"SCH-I545","browserName":"","appActivity":"com.alldigital.android.cox.NewsActivity","appium-version":"1.2","appPackage":"com.cmgdigital.wsoctvhandset"}}
debug: The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : appium-version
debug: Didn't get app but did get Android package, will attempt to launch it on the device
debug: Creating new appium session b184a564-321d-4753-af63-9bd7fbf56b6e
info: Starting android appium
debug: Using fast reset? true
debug: Preparing device for session
debug: Not checking whether app is present since we are assuming it's already on the device
debug: Checking whether adb is present
debug: Using adb from /Users/QA1/android-sdk-macosx/sdk/platform-tools/adb
info: Retrieving device
debug: Trying to find a connected android device
debug: Getting connected devices...
debug: executing: "/Users/QA1/android-sdk-macosx/sdk/platform-tools/adb" devices
debug: 0 device(s) connected
debug: Could not find devices, restarting adb server...
debug: executing: "/Users/QA1/android-sdk-macosx/sdk/platform-tools/adb" kill-server
debug: Getting connected devices...
debug: executing: "/Users/QA1/android-sdk-macosx/sdk/platform-tools/adb" devices
debug: 0 device(s) connected
....... continues trying .......
debug: Sent shutdown command, waiting for UiAutomator to stop...
warn: UiAutomator did not shut down fast enough, calling it gone
debug: Cleaning up android objects
debug: Cleaning up appium session
error: Failed to start an Appium session, err was: Error: Could not find a connected Android device.
debug: Error: Could not find a connected Android device.
at ADB.getDevicesWithRetry (/Users/QA1/appium/node_modules/appium-adb/lib/adb.js:612:15)
at androidCommon.prepareActiveDevice (/Users/QA1/appium/lib/devices/android/android-common.js:354:12)
at null.<anonymous> (/Users/QA1/appium/lib/devices/android/android-common.js:294:26)
at /Users/QA1/appium/node_modules/async/lib/async.js:610:21
at /Users/QA1/appium/node_modules/async/lib/async.js:249:17
at iterate (/Users/QA1/appium/node_modules/async/lib/async.js:149:13)
at /Users/QA1/appium/node_modules/async/lib/async.js:160:25
at /Users/QA1/appium/node_modules/async/lib/async.js:251:21
at /Users/QA1/appium/node_modules/async/lib/async.js:615:34
at androidCommon.prepareEmulator (/Users/QA1/appium/lib/devices/android/android-common.js:344:5)
debug: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Could not find a connected Android device.)","origValue":"Could not find a connected Android device."},"sessionId":null}
info: <-- POST /wd/hub/session 500 30473.764 ms - 206
Try to use:
driver = new RemoteWebDriver(new URL("http://192.168.2.109:4723/wd/hub"), capabilities);

Categories

Resources