vrunoa / appium-workshop

MIT License
0 stars 0 forks source link

Cannot open URL using Android 4.4.2 real device #1

Open navarroaxel opened 7 years ago

navarroaxel commented 7 years ago

[Appium] Welcome to Appium v1.5.3 [Appium] Appium REST http interface listener started on 0.0.0.0:4723 [HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"browserName":"Chrome","deviceName":"Android Device","platformName":"Android","platformVersion":"4.4.2"}} [MJSONWP] Calling AppiumDriver.createSession() with args: [{"browserName":"Chrome","d... [Appium] Creating new AndroidDriver session [Appium] Capabilities: [Appium] browserName: 'Chrome' [Appium] deviceName: 'Android Device' [Appium] platformName: 'Android' [Appium] platformVersion: '4.4.2' [BaseDriver] Session created with session id: 331d297b-35f9-4c0c-ba3f-f7d598a5ee86 [debug] [AndroidDriver] Getting Java version [AndroidDriver] Java version is: 1.8.0_102 [AndroidDriver] We're going to run a Chrome-based session [AndroidDriver] Chrome-type package and activity are com.android.chrome and com.google.android.apps.chrome.Main [ADB] Checking whether adb is present [ADB] Using adb.exe from C:\Users\navar\AppData\Local\Android\sdk\platform-tools\adb.exe [AndroidDriver] Retrieving device list [debug] [ADB] Trying to find a connected android device [debug] [ADB] Getting connected devices... [debug] [ADB] 1 device(s) connected [AndroidDriver] Looking for a device with Android 4.4.2 [debug] [ADB] Setting device id to LGE9875219c6ab [ADB] Getting device platform version [debug] [ADB] Getting connected devices... [debug] [ADB] 1 device(s) connected [debug] [ADB] Running C:\Users\navar\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","LGE9875219c6ab","shell","getprop","ro.build.version.release"] [AndroidDriver] Using device: LGE9875219c6ab [ADB] Checking whether adb is present [ADB] Using adb.exe from C:\Users\navar\AppData\Local\Android\sdk\platform-tools\adb.exe [debug] [ADB] Setting device id to LGE9875219c6ab [AndroidDriver] App file was not listed, instead we're going to run com.android.chrome directly on the device [debug] [AndroidDriver] Checking whether package is present on the device [debug] [ADB] Getting connected devices... [debug] [ADB] 1 device(s) connected [debug] [ADB] Running C:\Users\navar\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","LGE9875219c6ab","shell","pm","list","packages","com.android.chrome"] [AndroidDriver] Starting Android session [debug] [ADB] Running C:\Users\navar\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","LGE9875219c6ab","wait-for-device"] [debug] [ADB] Getting connected devices... [debug] [ADB] 1 device(s) connected [debug] [ADB] Running C:\Users\navar\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","LGE9875219c6ab","shell","echo","ping"] [debug] [Logcat] Starting logcat capture [debug] [AndroidDriver] Pushing settings apk to device... [debug] [ADB] Running C:\Users\navar\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","LGE9875219c6ab","install","C:\Users\navar\AppData\Roaming\npm\nod e_modules\appium\node_modules\appium-android-driver\node_modules\io.appium.settings\bin\settings_apk-debug.apk"] [debug] [AndroidDriver] Pushing unlock helper app to device... [debug] [ADB] Running C:\Users\navar\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","LGE9875219c6ab","install","C:\Users\navar\AppData\Roaming\npm\nod e_modules\appium\node_modules\appium-android-driver\node_modules\appium-unlock\bin\unlock_apk-debug.apk"] [ADB] Getting device platform version [debug] [ADB] Getting connected devices... [debug] [ADB] 1 device(s) connected [debug] [ADB] Running C:\Users\navar\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","LGE9875219c6ab","shell","getprop","ro.build.version.release"] [debug] [ADB] Getting connected devices... [debug] [ADB] 1 device(s) connected [debug] [ADB] Running C:\Users\navar\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","LGE9875219c6ab","shell","dumpsys","window"] [AndroidDriver] Screen already unlocked, doing nothing [debug] [AndroidBootstrap] Watching for bootstrap disconnect [debug] [ADB] Forwarding system: 4724 to device: 4724 [debug] [ADB] Running C:\Users\navar\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","LGE9875219c6ab","forward","tcp:4724","tcp:4724"] [debug] [UiAutomator] Starting UiAutomator [debug] [UiAutomator] Moving to state 'starting' [debug] [UiAutomator] Parsing uiautomator jar [debug] [UiAutomator] Found jar name: 'AppiumBootstrap.jar' [debug] [ADB] Running C:\Users\navar\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","LGE9875219c6ab","push","C:\Users\navar\AppData\Roaming\npm\node_m odules\appium\node_modules\appium-android-driver\node_modules\appium-android-bootstrap\bootstrap\bin\AppiumBootstrap.jar","/data/local/tmp/"] [debug] [ADB] Attempting to kill all uiautomator processes [debug] [ADB] Getting all processes with uiautomator [debug] [ADB] Getting connected devices... [debug] [ADB] 1 device(s) connected [debug] [ADB] Running C:\Users\navar\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","LGE9875219c6ab","shell","ps","uiautomator"] [ADB] No uiautomator process found to kill, continuing... [debug] [UiAutomator] Starting UIAutomator [debug] [ADB] Creating ADB subprocess with args: -P, 5037, -s, LGE9875219c6ab, shell, uiautomator, runtest, AppiumBootstrap.jar, -c, io.appium.android.bootstrap.Bootstrap, -e, pkg, com. android.chrome, -e, disableAndroidWatchers, false, -e, acceptSslCerts, false [debug] [UiAutomator] Moving to state 'online' [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers. [AndroidBootstrap] Android bootstrap socket is now connected [AndroidDriver] Starting a chrome-based browser session [debug] [Chromedriver] Changed state to 'starting' [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected [Chromedriver] Set chromedriver binary as: C:\Users\navar\AppData\Roaming\npm\node_modules\appium\node_modules\appium-android-driver\node_modules\appium-chromedriver\chromedriver\win\ch romedriver.exe [Chromedriver] Killing any old chromedrivers, running: FOR /F "usebackq tokens=5" %a in (netstat -nao ^| findstr /R /C:"9515 ") do (FOR /F "usebackq" %b in (TASKLIST /FI "PID eq %a" ^| findstr /I chromedriver.exe) do (IF NOT %b=="" TASKKILL /F /PID %a)) [Chromedriver] No old chromedrivers seemed to exist [Chromedriver] Spawning chromedriver with: C:\Users\navar\AppData\Roaming\npm\node_modules\appium\node_modules\appium-android-driver\node_modules\appium-chromedriver\chromedriver\win\ch romedriver.exe --url-base=wd/hub --port=9515 --adb-port=5037 [Chromedriver] [STDOUT] Starting ChromeDriver 2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4) on port 9515 Only local connections are allowed. [JSONWP Proxy] Proxying [GET /status] to [GET http://127.0.0.1:9515/wd/hub/status] with no body [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"\",\"stat... [JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {"desiredCapabilities":{"ch... [JSONWP Proxy] Got response with status 200: {"sessionId":"d43af9185528d... [debug] [Chromedriver] Changed state to 'online' [Appium] New AndroidDriver session created successfully, session 331d297b-35f9-4c0c-ba3f-f7d598a5ee86 added to master session list [MJSONWP] Responding to client with driver.createSession() result: {"platform":"LINUX","webSto... [HTTP] <-- POST /wd/hub/session 200 18010 ms - 517 [HTTP] --> POST /wd/hub/session/331d297b-35f9-4c0c-ba3f-f7d598a5ee86/url {"url":"https://vrunoa.github.io/appium-workshop/"} [MJSONWP] Driver proxy active, passing request on via HTTP proxy [JSONWP Proxy] Proxying [POST /wd/hub/session/331d297b-35f9-4c0c-ba3f-f7d598a5ee86/url] to [POST http://127.0.0.1:9515/wd/hub/session/d43af9185528df52b7161dd152452f3f/url] with body: {" url":"https://vrunoa.gith... [JSONWP Proxy] Got response with status 200: {"sessionId":"d43af9185528d... [JSONWP Proxy] Replacing sessionId d43af9185528df52b7161dd152452f3f with 331d297b-35f9-4c0c-ba3f-f7d598a5ee86 [HTTP] <-- POST /wd/hub/session/331d297b-35f9-4c0c-ba3f-f7d598a5ee86/url 200 17 ms - 219 [HTTP] --> DELETE /wd/hub/session/331d297b-35f9-4c0c-ba3f-f7d598a5ee86 {} [MJSONWP] Calling AppiumDriver.deleteSession() with args: ["331d297b-35f9-4c0c-ba3f-f... [debug] [AndroidDriver] Shutting down Android driver [debug] [AndroidDriver] Stopping chromedriver for context CHROMIUM [debug] [Chromedriver] Changed state to 'stopping' [JSONWP Proxy] Proxying [DELETE /] to [DELETE http://127.0.0.1:9515/wd/hub/session/d43af9185528df52b7161dd152452f3f] with no body [JSONWP Proxy] Got response with status 200: "{\"sessionId\":\"d43af9185... [debug] [Chromedriver] Changed state to 'stopped' [debug] [ADB] Getting connected devices... [debug] [ADB] 1 device(s) connected [debug] [ADB] Running C:\Users\navar\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","LGE9875219c6ab","shell","am","force-stop","io.appium.unlock"] [debug] [ADB] Pressing the HOME button [debug] [ADB] Getting connected devices... [debug] [ADB] 1 device(s) connected [debug] [ADB] Running C:\Users\navar\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","LGE9875219c6ab","shell","input","keyevent",3] [debug] [Logcat] Stopping logcat capture [debug] [AndroidBootstrap] Sending command to android: {"cmd":"shutdown"} [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"shutdown"} [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type SHUTDOWN [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"value":"OK, shutting down","status":0} [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Closed client connection [debug] [AndroidBootstrap] Received command result from bootstrap [debug] [UiAutomator] Shutting down UiAutomator [debug] [UiAutomator] Moving to state 'stopping' [debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: numtests=1 [debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=. [debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner [debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: test=testRunServer [debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap [debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: current=1 [debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: 0 [debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream= [debug] [AndroidBootstrap] [UIAUTO STDOUT] Test results for WatcherResultPrinter=. [debug] [AndroidBootstrap] [UIAUTO STDOUT] Time: 18.968 [debug] [AndroidBootstrap] [UIAUTO STDOUT] OK (1 test) [debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: -1 [debug] [UiAutomator] UiAutomator shut down normally [debug] [UiAutomator] Moving to state 'stopped' [debug] [ADB] Attempting to kill all uiautomator processes [debug] [ADB] Getting all processes with uiautomator [debug] [ADB] Getting connected devices... [debug] [ADB] 1 device(s) connected [debug] [ADB] Running C:\Users\navar\AppData\Local\Android\sdk\platform-tools\adb.exe with args: ["-P",5037,"-s","LGE9875219c6ab","shell","ps","uiautomator"] [ADB] No uiautomator process found to kill, continuing... [debug] [UiAutomator] Moving to state 'stopped' [Appium] Removing session 331d297b-35f9-4c0c-ba3f-f7d598a5ee86 from our master session list [debug] [MJSONWP] Received response: null [debug] [MJSONWP] But deleting session, so not returning [MJSONWP] Responding to client with driver.deleteSession() result: null [HTTP] <-- DELETE /wd/hub/session/331d297b-35f9-4c0c-ba3f-f7d598a5ee86 200 2552 ms - 76

Error: [get("https://vrunoa.github.io/appium-workshop/")] Error response status: 6 Selenium error: no such session (Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 10.0 x86_64) at exports.newError (node_modules/wd/lib/utils.js:145:13) at node_modules/wd/lib/callbacks.js:33:23 at node_modules/wd/lib/webdriver.js:179:5 at Request._callback (node_modules/wd/lib/http-utils.js:87:7) at Request.self.callback (node_modules/request/request.js:187:22) at Request. (node_modules/request/request.js:1048:10) at IncomingMessage. (node_modules/request/request.js:969:12) at endReadableNT (_stream_readable.js:974:12) at _combinedTickCallback (internal/process/next_tick.js:74:11) at process._tickCallback (internal/process/next_tick.js:98:9)

vrunoa commented 7 years ago

@navarroaxel can you attach the node version as well ? thanks

navarroaxel commented 7 years ago

@vrunoa node@6.9.1