{"action":"closed","issue":{"url":"https://api.github.com/repos/appium/java-client/issues/169","repository_url":"https://api.github.com/repos/appium/java-client","labels_url":"https://api.github.com/repos/appium/java-client/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/appium/java-client/issues/169/comments","events_url":"https://api.github.com/repos/appium/java-client/issues/169/events","html_url":"https://github.com/appium/java-client/issues/169","id":62692674,"number":169,"title":"Error as response for driver.installApp on Android","user":{"login":"rogertestevnt","id":7512507,"avatar_url":"https://avatars.githubusercontent.com/u/7512507?v=3","gravatar_id":"","url":"https://api.github.com/users/rogertestevnt","html_url":"https://github.com/rogertestevnt","followers_url":"https://api.github.com/users/rogertestevnt/followers","following_url":"https://api.github.com/users/rogertestevnt/following{/other_user}","gists_url":"https://api.github.com/users/rogertestevnt/gists{/gist_id}","starred_url":"https://api.github.com/users/rogertestevnt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogertestevnt/subscriptions","organizations_url":"https://api.github.com/users/rogertestevnt/orgs","repos_url":"https://api.github.com/users/rogertestevnt/repos","events_url":"https://api.github.com/users/rogertestevnt/events{/privacy}","received_events_url":"https://api.github.com/users/rogertestevnt/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-18T13:21:57Z","updated_at":"2016-06-07T09:20:05Z","closed_at":"2016-06-07T09:20:04Z","body":"I have received the below error as a response for driver.installApp on Android:\r\n[TestNG] Running:\r\n  C:\\Users\\vntrool\\AppData\\Local\\Temp\\testng-eclipse--897090528\\testng-customsuite.xml\r\nFAILED: test\r\norg.openqa.selenium.WebDriverException: Unable to install [apps/com.rdio.oi.android.ui-1.apk] to device with id [null]. Error [Error: spawn OK] (WARNING: The server did not provide any stacktrace information)\r\nCommand duration or timeout: 31 milliseconds\r\nBuild info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:03:00'\r\nSystem info: host: 'VNTWKSW6277', ip: '172.21.110.53', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_25'\r\nDriver info: io.appium.java_client.android.AndroidDriver\r\nCapabilities [{appPackage=com.sonyericsson.music, networkConnectionEnabled=true, device-orientation=portrait, warnings={}, language=en, databaseEnabled=false, locale=en_US, deviceName=CB5A1X07H, platform=LINUX, appActivity=.MusicActivity, desired={appPackage=com.sonyericsson.music, appActivity=.MusicActivity, device-orientation=portrait, newCommandTimeout=120, language=en, platformName=Android, locale=en_US, deviceName=CB5A1X07H}, newCommandTimeout=120, platformVersion=4.1, webStorageEnabled=false, locationContextEnabled=false, browserName=Android, takesScreenshot=true, javascriptEnabled=true, platformName=Android}]\r\n\r\nI have update Appim Java client to release 2.2.0 but it didn't work. \r\nThis is the sample code I am using to test driver.installApp :\r\n******************************************************************************\r\npackage dashboard.pageobjects.principal;\r\n\r\nimport io.appium.java_client.AppiumDriver;\r\nimport io.appium.java_client.android.AndroidDriver;\r\nimport io.appium.java_client.remote.MobileCapabilityType;\r\nimport io.appium.java_client.remote.MobilePlatform;\r\n\r\nimport java.net.URL;\r\n\r\nimport org.openqa.selenium.By;\r\nimport org.openqa.selenium.remote.DesiredCapabilities;\r\nimport org.openqa.selenium.support.ui.ExpectedConditions;\r\nimport org.openqa.selenium.support.ui.WebDriverWait;\r\nimport org.testng.annotations.AfterClass;\r\nimport org.testng.annotations.BeforeClass;\r\nimport org.testng.annotations.Test;\r\n\r\n\r\npublic class MainFlow {\r\n\r\n\tAppiumDriver driver = null;\r\n\tDesiredCapabilities capabilities = null;\r\n\tWebDriverWait wait = null;\r\n\r\n\t@BeforeClass\r\n\tpublic void setUp() throws Exception {\r\n\r\n\t\tcapabilities = new DesiredCapabilities();\r\n\t\tcapabilities.setCapability(MobileCapabilityType.PLATFORM_NAME,\r\n\t\t\t\tMobilePlatform.ANDROID);\r\n\t\tcapabilities.setCapability(MobileCapabilityType.DEVICE_NAME,\r\n\t\t\t\t\"CB5A1X07H\");\r\n\t//\tcapabilities.setCapability(\"device\", \"CB5A1X07H\");\r\n\t\tcapabilities.setCapability(\"appPackage\", \"com.sonyericsson.music\");\r\n\t\tcapabilities.setCapability(\"appActivity\", \".MusicActivity\");\r\n\t\tcapabilities.setCapability(\"device-orientation\", \"portrait\");\r\n\t\tcapabilities.setCapability(\"locale\", \"en_US\");\r\n\t\tcapabilities.setCapability(\"language\", \"en\");\r\n\t\tcapabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT,\r\n\t\t\t\t120);\r\n\r\n\t\tdriver = new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"),\r\n\t\t\t\tcapabilities);\r\n\t}\r\n\r\n\t@AfterClass\r\n\tpublic void tearDown() throws Exception {\r\n\t\tdriver.quit();\r\n\t}\r\n\r\n\t@Test\r\n\tpublic void test() throws InterruptedException {\r\n\t\twait = new WebDriverWait(driver, 10);\r\n\t\t// By menu = By.className(\"android.widget.ImageButton\");\r\n\t\tBy disclaimer = By.id(\"com.sonyericsson.music:id/link\");\r\n\r\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(disclaimer));\r\n\t\tdriver.findElement(By.id(\"android:id/button1\")).click();\r\n\r\n\t\tdriver.swipe(20, 920, 890, 920, 0);\r\n\r\n\t\tif (driver.findElement(\r\n\t\t\t\tBy.xpath(\"//android.widget.TextView[@text='Other Services']\"))\r\n\t\t\t\t.isDisplayed())\r\n\t\t\t;\r\n\t\t{\r\n\t\t\t// Install another app\r\n\t\t\tif (!driver.isAppInstalled(\"com.rdio.oi.android.ui\"))\r\n\t\t\t\r\n\t\t\t\tdriver.installApp(\"apps/com.rdio.oi.android.ui-1.apk\");\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\tdriver.findElement(By.id(\"com.sonyericsson.music:id/artist2\"))\r\n\t\t\t\t\t.click();\r\n\r\n\t\t}\r\n\r\n\t}\r\n}\r\n*********************************************************************************\r\nHow this error can be fixed?"}}
{"actor":{"display_login":"SrinivasanTarget"}}