{"action":"created","issue":{"url":"https://api.github.com/repos/appium/appium/issues/6095","repository_url":"https://api.github.com/repos/appium/appium","labels_url":"https://api.github.com/repos/appium/appium/issues/6095/labels{/name}","comments_url":"https://api.github.com/repos/appium/appium/issues/6095/comments","events_url":"https://api.github.com/repos/appium/appium/issues/6095/events","html_url":"https://github.com/appium/appium/issues/6095","id":130596298,"number":6095,"title":"Reboot scenario fails due to session not available","user":{"login":"email2vimalraj","id":1214686,"avatar_url":"https://avatars.githubusercontent.com/u/1214686?v=3","gravatar_id":"","url":"https://api.github.com/users/email2vimalraj","html_url":"https://github.com/email2vimalraj","followers_url":"https://api.github.com/users/email2vimalraj/followers","following_url":"https://api.github.com/users/email2vimalraj/following{/other_user}","gists_url":"https://api.github.com/users/email2vimalraj/gists{/gist_id}","starred_url":"https://api.github.com/users/email2vimalraj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/email2vimalraj/subscriptions","organizations_url":"https://api.github.com/users/email2vimalraj/orgs","repos_url":"https://api.github.com/users/email2vimalraj/repos","events_url":"https://api.github.com/users/email2vimalraj/events{/privacy}","received_events_url":"https://api.github.com/users/email2vimalraj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/appium/appium/labels/Android","name":"Android","color":"ADFF2F"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-02T07:06:22Z","updated_at":"2016-06-13T05:38:15Z","closed_at":null,"body":"**Appium server**: 1.4.16, **java-client**: 3.3.0, **OS**: Mac 10.10.5 \r\n\r\nThis is my capability for the real android device:\r\n\r\n    platformName: Android\r\n    deviceName:   Android\r\n    app:          debug-app.apk\r\n    newCommandTimeout: 120\r\n    noReset: true\r\n\r\nSteps to reproduce the issue:\r\n\r\nCreate the capabilities\r\nCreate android driver object with the capabilities\r\nTrigger reboot\r\nWatch appium session cleans up.\r\nCode Example (**watch line # 36 and 37 are commented out**) : https://gist.github.com/email2vimalraj/9ac0df30fb89d7f924be\r\n\r\nThe following steps are working fine:\r\n\r\nCreate the capabilities\r\nCreate android driver object with the capabilities\r\nClose the app and launch the app again\r\nTrigger reboot\r\nNow everything will go smooth\r\nCode Example (**watch line # 36 and 37 are un-commented**) : https://gist.github.com/email2vimalraj/518ec9e1e998f838923a\r\n\r\n_P.S_: Re-creating the issue since no one is replying to the issue which I have opened earlier - #5992 and closed the earlier"},"comment":{"url":"https://api.github.com/repos/appium/appium/issues/comments/225492977","html_url":"https://github.com/appium/appium/issues/6095#issuecomment-225492977","issue_url":"https://api.github.com/repos/appium/appium/issues/6095","id":225492977,"user":{"login":"email2vimalraj","id":1214686,"avatar_url":"https://avatars.githubusercontent.com/u/1214686?v=3","gravatar_id":"","url":"https://api.github.com/users/email2vimalraj","html_url":"https://github.com/email2vimalraj","followers_url":"https://api.github.com/users/email2vimalraj/followers","following_url":"https://api.github.com/users/email2vimalraj/following{/other_user}","gists_url":"https://api.github.com/users/email2vimalraj/gists{/gist_id}","starred_url":"https://api.github.com/users/email2vimalraj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/email2vimalraj/subscriptions","organizations_url":"https://api.github.com/users/email2vimalraj/orgs","repos_url":"https://api.github.com/users/email2vimalraj/repos","events_url":"https://api.github.com/users/email2vimalraj/events{/privacy}","received_events_url":"https://api.github.com/users/email2vimalraj/received_events","type":"User","site_admin":false},"created_at":"2016-06-13T05:38:15Z","updated_at":"2016-06-13T05:38:15Z","body":"@scottdixon : Sorry for the delay. Got a chance to upgrade to latest v1.5.3 and tried this. Facing error while rebooting without closing app or rebooting after driver.closeApp() or rebooting after driver.forceCloseApp():\r\n\r\n```\r\n[Logcat] Logcat terminated with code 0, signal null\r\n[UiAutomator] UiAutomator exited unexpectedly with code 0, signal null\r\n[debug] [UiAutomator] Moving to state 'stopped'\r\n[debug] [AndroidDriver] Shutting down Android driver\r\n[Appium] Closing session, cause was 'UiAUtomator shut down unexpectedly'\r\n[Appium] Removing session 23cd9289-f1ed-4884-9bd6-9cb83572e744 from our master session list\r\n[debug] [ADB] Getting connected devices...\r\n[debug] [ADB] 0 device(s) connected\r\nUnhandled rejection Error: No device connected, cannot run adb shell command \"am force-stop com.myapp.mypackage\"\r\n    at ADB.callee$0$0$ (lib/tools/system-calls.js:198:11)\r\n    at tryCatch (/Users/myname/.npm-packages/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)\r\n    at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/myname/.npm-packages/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)\r\n    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Users/myname/.npm-packages/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)\r\n    at GeneratorFunctionPrototype.invoke (/Users/myname/.npm-packages/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)\r\n    at process._tickCallback (internal/process/next_tick.js:103:7)\r\n```"}}
{"actor":{"display_login":"email2vimalraj"}}