{"action":"created","issue":{"url":"https://api.github.com/repos/appium/appium/issues/6705","repository_url":"https://api.github.com/repos/appium/appium","labels_url":"https://api.github.com/repos/appium/appium/issues/6705/labels{/name}","comments_url":"https://api.github.com/repos/appium/appium/issues/6705/comments","events_url":"https://api.github.com/repos/appium/appium/issues/6705/events","html_url":"https://github.com/appium/appium/issues/6705","id":168347986,"number":6705,"title":"Appium error - A new session could not be created","user":{"login":"Abhresh","id":20726902,"avatar_url":"https://avatars.githubusercontent.com/u/20726902?v=3","gravatar_id":"","url":"https://api.github.com/users/Abhresh","html_url":"https://github.com/Abhresh","followers_url":"https://api.github.com/users/Abhresh/followers","following_url":"https://api.github.com/users/Abhresh/following{/other_user}","gists_url":"https://api.github.com/users/Abhresh/gists{/gist_id}","starred_url":"https://api.github.com/users/Abhresh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abhresh/subscriptions","organizations_url":"https://api.github.com/users/Abhresh/orgs","repos_url":"https://api.github.com/users/Abhresh/repos","events_url":"https://api.github.com/users/Abhresh/events{/privacy}","received_events_url":"https://api.github.com/users/Abhresh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/appium/appium/labels/NeedsTriage","name":"NeedsTriage","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-29T15:15:48Z","updated_at":"2016-07-29T16:41:04Z","closed_at":null,"body":"## The problem\r\nI am trying to run my first program into Appium and it worked before but not working now.\r\nthe program is to install and run an app (bookmyshow app) on android emulator.\r\n\r\n\r\n##\r\nThe configuration is intact as it was when the same code run successfully but now its not working and showing this error,\r\nServer Running,\r\nADV Running,\r\ncode showing no errors.\r\n\r\n## Code To Reproduce Issue [ Good To Have ]\r\n\r\npackage Android;\r\n\r\nimport java.io.File;\r\nimport java.net.MalformedURLException;\r\nimport java.net.URL;\r\nimport org.junit.Test;\r\nimport org.openqa.selenium.remote.DesiredCapabilities;\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\npublic class desiredcapb {\r\n\r\n\t@Test\r\n\tpublic void test() throws MalformedURLException {\r\n\tFile appDir = new File(\"src\");\r\n\tFile app = new File(appDir,\"Battery Saver Pro.apk\");\r\n\tDesiredCapabilities capabilities = new DesiredCapabilities();\r\n\tcapabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, MobilePlatform.ANDROID);\r\n\tcapabilities.setCapability(MobileCapabilityType.DEVICE_NAME, \"Android Emulator\");\r\n\tcapabilities.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());\r\n\tAndroidDriver driver = new AndroidDriver(new URL(\"http://127.0.0.1:4723/wd/hub\"),capabilities);\t\t\r\n\t}\r\n}\r\n\r\n## Appium Server Logs:\r\n> info: --> POST /wd/hub/session {\"desiredCapabilities\":{\"app\":\"C:\\\\Users\\\\Abhresh\\\\Documents\\\\APPIUM\\\\Appiuminto\\\\src\\\\Battery Saver Pro.apk\",\"platformName\":\"Android\",\"deviceName\":\"Android Emulator\"}}\r\n> info: Client User-Agent string: Apache-HttpClient/4.5.1 (Java/1.8.0_91)\r\n> info: [debug] No appActivity desired capability or server param. Parsing from apk.\r\n> info: [debug] No appPackage desired capability or server param. Parsing from apk.\r\n> info: [debug] Using local app from desired caps: C:\\Users\\Abhresh\\Documents\\APPIUM\\Appiuminto\\src\\Battery Saver Pro.apk\r\n> info: [debug] Creating new appium session bee81b96-b555-47d6-a072-6ba71238a151\r\n> info: Starting android appium\r\n> info: [debug] Getting Java version\r\n> info: Java version is: 1.8.0_91\r\n> info: [debug] Checking whether adb is present\r\n> info: [debug] Using adb from D:\\Training\\APPIUM\\sdk\\platform-tools\\adb.exe\r\n> info: [debug] Parsing package and activity from app manifest\r\n> info: [debug] Checking whether aapt is present\r\n> info: [debug] Using aapt from D:\\Training\\APPIUM\\sdk\\build-tools\\23.0.3\\aapt.exe\r\n> info: [debug] Extracting package and launch activity from manifest.\r\n> info: [debug] executing cmd: D:\\Training\\APPIUM\\sdk\\build-tools\\23.0.3\\aapt.exe dump badging \"C:\\Users\\Abhresh\\Documents\\APPIUM\\Appiuminto\\src\\Battery Saver Pro.apk\"\r\n> info: [debug] badging package: apps.ignisamerica.batterysaver.pro\r\n> info: [debug] badging act: apps.ignisamerica.batterysaver.controller.activity.SplashActivity\r\n> info: [debug] Parsed package and activity are: apps.ignisamerica.batterysaver.pro/apps.ignisamerica.batterysaver.controller.activity.SplashActivity\r\n> info: [debug] Using fast reset? false\r\n> info: [debug] Preparing device for session\r\n> info: [debug] Checking whether app is actually present\r\n> info: Retrieving device\r\n> info: [debug] Trying to find a connected android device\r\n> info: [debug] Getting connected devices...\r\n> info: [debug] executing cmd: D:\\Training\\APPIUM\\sdk\\platform-tools\\adb.exe devices\r\n> info: [debug] 1 device(s) connected\r\n> info: Found device emulator-5554\r\n> info: [debug] Setting device id to emulator-5554\r\n> info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)\r\n> info: [debug] executing cmd: D:\\Training\\APPIUM\\sdk\\platform-tools\\adb.exe -s emulator-5554 wait-for-device\r\n> info: [debug] executing cmd: D:\\Training\\APPIUM\\sdk\\platform-tools\\adb.exe -s emulator-5554 shell \"echo 'ready'\"\r\n> info: [debug] Starting logcat capture\r\n> info: [debug] Getting device API level\r\n> info: [debug] executing cmd: D:\\Training\\APPIUM\\sdk\\platform-tools\\adb.exe -s emulator-5554 shell \"getprop ro.build.version.sdk\"\r\n> info: [debug] Device is at API Level 19\r\n> info: Device API level is: 19\r\n> info: [debug] Extracting strings for language: default\r\n> info: [debug] executing cmd: D:\\Training\\APPIUM\\sdk\\platform-tools\\adb.exe -s emulator-5554 shell \"getprop persist.sys.language\"\r\n> info: [debug] Current device persist.sys.language: en\r\n> info: [debug] java -jar \"D:\\Training\\APPIUM\\Appium\\Appium Server\\node_modules\\appium\\node_modules\\appium-adb\\jars\\appium_apk_tools.jar\" \"stringsFromApk\" \"C:\\Users\\Abhresh\\Documents\\APPIUM\\Appiuminto\\src\\Battery Saver Pro.apk\" \"C:\\Users\\Abhresh\\AppData\\Local\\Temp\\apps.ignisamerica.batterysaver.pro\" en\r\n> info: [debug] Reading strings from converted strings.json\r\n> info: [debug] Setting language to default\r\n> info: [debug] executing cmd: D:\\Training\\APPIUM\\sdk\\platform-tools\\adb.exe -s emulator-5554 push \"C:\\\\Users\\\\Abhresh\\\\AppData\\\\Local\\\\Temp\\\\apps.ignisamerica.batterysaver.pro\\\\strings.json\" /data/local/tmp\r\n> info: [debug] Stopping logcat capture\r\n> info: [debug] Logcat terminated with code null, signal SIGTERM\r\n> info: [debug] Sent shutdown command, waiting for UiAutomator to stop...\r\n> warn: UiAutomator did not shut down fast enough, calling it gone\r\n> info: [debug] Cleaning up android objects\r\n> info: [debug] Cleaning up appium session\r\n> error: Failed to start an Appium session, err was: Error: Could not push strings.json\r\n> info: [debug] Error: Could not push strings.json\r\n>     at D:\\Training\\APPIUM\\Appium\\Appium Server\\node_modules\\appium\\lib\\devices\\android\\android.js:347:26\r\n>     at [object Object].<anonymous> (D:\\Training\\APPIUM\\Appium\\Appium Server\\node_modules\\appium\\node_modules\\appium-adb\\lib\\adb.js:178:16)\r\n>     at ChildProcess.exithandler (child_process.js:758:5)\r\n>     at ChildProcess.emit (events.js:110:17)\r\n>     at maybeClose (child_process.js:1016:16)\r\n>     at Process.ChildProcess._handle.onexit (child_process.js:1088:5)\r\n> info: [debug] Responding to client with error: {\"status\":33,\"value\":{\"message\":\"A new session could not be created. (Original error: Could not push strings.json)\",\"origValue\":\"Could not push strings.json\"},\"sessionId\":null}\r\n> info: <-- POST /wd/hub/session 500 12230.414 ms - 176 \r\n"},"comment":{"url":"https://api.github.com/repos/appium/appium/issues/comments/236230654","html_url":"https://github.com/appium/appium/issues/6705#issuecomment-236230654","issue_url":"https://api.github.com/repos/appium/appium/issues/6705","id":236230654,"user":{"login":"Abhresh","id":20726902,"avatar_url":"https://avatars.githubusercontent.com/u/20726902?v=3","gravatar_id":"","url":"https://api.github.com/users/Abhresh","html_url":"https://github.com/Abhresh","followers_url":"https://api.github.com/users/Abhresh/followers","following_url":"https://api.github.com/users/Abhresh/following{/other_user}","gists_url":"https://api.github.com/users/Abhresh/gists{/gist_id}","starred_url":"https://api.github.com/users/Abhresh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abhresh/subscriptions","organizations_url":"https://api.github.com/users/Abhresh/orgs","repos_url":"https://api.github.com/users/Abhresh/repos","events_url":"https://api.github.com/users/Abhresh/events{/privacy}","received_events_url":"https://api.github.com/users/Abhresh/received_events","type":"User","site_admin":false},"created_at":"2016-07-29T16:41:04Z","updated_at":"2016-07-29T16:41:04Z","body":"@imurchie \r\n\r\nThis is what i got when i run in command line...\r\n\r\nC:\\Users\\Abhresh>D:\\Training\\APPIUM\\sdk\\platform-tools\\adb.exe -s emulator-5554 push \"C:\\Users\\Abhresh\\AppData\\Local\\Temp\\apps.ignisamerica.batterysaver.pro\\strings.json\" /data/local/tmp\r\nadb: error: connect failed: device 'emulator-5554' not found\r\n"}}
{"actor":{"display_login":"Abhresh"}}