-
org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Screen did not unlock)
about 9 years ago
-
about 7 years ago
Hi buddy,
Please give solution for this bug.
"C:\Program Files\Android\Android Studio1\jre\bin\java" -Didea.launcher.port=7532 "-Didea.launcher.bin.path=C:\Program Files\Android\Android Studio1\bin" -Didea.junit.sm_runner -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Android\Android Studio1\lib\idea_rt.jar;C:\Program Files\Android\Android Studio1\plugins\junit\lib\junit-rt.jar;C:\Users\Admin\AppData\Local\Android\sdk\platforms\android-25\data\res;D:\Gowtham\Call\app\build\intermediates\classes\test\debug;D:\Gowtham\Call\app\build\intermediates\classes\debug;D:\Gowtham\Call\app\libs\commons-io-2.5.jar;D:\Gowtham\Call\app\libs\cssparser-0.9.22.jar;D:\Gowtham\Call\app\libs\commons-exec-1.3.jar;D:\Gowtham\Call\app\libs\jetty-io-9.4.1.v20170120.jar;D:\Gowtham\Call\app\libs\client-combined-3.4.0-nodeps.jar;C:\Users\Admin\.android\build-cache\1cee08a74c28b17e030babbaea528d87b79cf79f\output\jars\classes.jar;C:\Users\Admin\.android\build-cache\1cee08a74c28b17e030babbaea528d87b79cf79f\output\res;D:\Gowtham\Call\app\libs\commons-logging-1.2.jar;D:\Gowtham\Call\app\libs\commons-lang3-3.5.jar;D:\Gowtham\Call\app\libs\xml-apis-1.4.01.jar;D:\Gowtham\Call\app\libs\httpclient-4.5.3.jar;D:\Gowtham\Call\app\libs\serializer-2.7.2.jar;D:\Gowtham\Call\app\libs\htmlunit-core-js-2.26.jar;D:\Gowtham\Call\app\libs\websocket-common-9.4.3.v20170317.jar;D:\Gowtham\Call\app\libs\neko-htmlunit-2.25.jar;D:\Gowtham\Call\app\libs\jetty-util-9.4.1.v20170120.jar;C:\Users\Admin\.android\build-cache\14330037ad4c063d58ee61b465c9ec367dfb9d8f\output\jars\classes.jar;C:\Users\Admin\.android\build-cache\14330037ad4c063d58ee61b465c9ec367dfb9d8f\output\res;C:\Users\Admin\.android\build-cache\2d621a8ee09cc95312b83bcc64ecb7d92f6a76ac\output\jars\classes.jar;C:\Users\Admin\.android\build-cache\2d621a8ee09cc95312b83bcc64ecb7d92f6a76ac\output\res;D:\Gowtham\Call\app\libs\commons-codec-1.10.jar;D:\Gowtham\Call\app\libs\jna-platform-4.1.0.jar;C:\Users\Admin\AppData\Local\Android\sdk\extras\android\m2repository\com\android\support\support-annotations\25.3.1\support-annotations-25.3.1.jar;C:\Users\Admin\.android\build-cache\ca15754dc01a3dc997cb992d9055e464a5645696\output\jars\classes.jar;C:\Users\Admin\.android\build-cache\ca15754dc01a3dc997cb992d9055e464a5645696\output\res;C:\Users\Admin\.android\build-cache\0e38dcbb3ff6675df96a849bed5d8386a0c1438d\output\res;C:\Users\Admin\.android\build-cache\0e38dcbb3ff6675df96a849bed5d8386a0c1438d\output\jars\classes.jar;D:\Gowtham\Call\app\libs\websocket-client-9.4.3.v20170317.jar;D:\Gowtham\Call\app\libs\sac-1.3.jar;D:\Gowtham\Call\app\libs\xalan-2.7.2.jar;D:\Gowtham\Call\app\libs\xercesImpl-2.11.0.jar;D:\Gowtham\Call\app\libs\gson-2.8.0.jar;C:\Users\Admin\.android\build-cache\828aa98715b0ea85da43dedef63bb66ab960de1c\output\jars\classes.jar;C:\Users\Admin\.android\build-cache\828aa98715b0ea85da43dedef63bb66ab960de1c\output\res;D:\Gowtham\Call\app\libs\guava-21.0.jar;D:\Gowtham\Call\app\libs\websocket-api-9.4.3.v20170317.jar;C:\Users\Admin\.android\build-cache\80e3c8138b350742c3adddd05870123938cc5d39\output\res;C:\Users\Admin\.android\build-cache\80e3c8138b350742c3adddd05870123938cc5d39\output\jars\classes.jar;C:\Users\Admin\.android\build-cache\96ea2dc1e2ff15c36f62c83162c892bb7fc70c80\output\jars\classes.jar;C:\Users\Admin\.android\build-cache\96ea2dc1e2ff15c36f62c83162c892bb7fc70c80\output\res;D:\Gowtham\Call\app\libs\cglib-nodep-3.2.4.jar;D:\Gowtham\Call\app\libs\htmlunit-2.26.jar;D:\Gowtham\Call\app\libs\java-client-5.0.0-BETA8.jar;D:\Gowtham\Call\app\libs\jna-4.1.0.jar;C:\Users\Admin\.android\build-cache\dfe0db774e00a6f7c64c68c2c91eb618f4886241\output\jars\classes.jar;C:\Users\Admin\.android\build-cache\dfe0db774e00a6f7c64c68c2c91eb618f4886241\output\res;C:\Users\Admin\.android\build-cache\67ae312f3846be9823ce437f608ce24bf2150ccd\output\jars\classes.jar;C:\Users\Admin\.android\build-cache\67ae312f3846be9823ce437f608ce24bf2150ccd\output\res;D:\Gowtham\Call\app\libs\httpmime-4.5.3.jar;C:\Users\Admin\AppData\Local\Android\sdk\extras\m2repository\com\android\support\constraint\constraint-layout-solver\1.0.2\constraint-layout-solver-1.0.2.jar;D:\Gowtham\Call\app\libs\httpcore-4.4.6.jar;C:\Users\Admin\.gradle\caches\modules-2\files-2.1\org.hamcrest\hamcrest-core\1.3\42a25dc3219429f0e5d060061f71acb49bf010a0\hamcrest-core-1.3.jar;D:\Gowtham\Call\app\libs\hamcrest-core-1.3.jar;D:\Gowtham\Call\app\libs\htmlunit-driver-2.26.jar;D:\Gowtham\Call\app\libs\javax.servlet-api-3.1.0.jar;C:\Users\Admin\.gradle\caches\modules-2\files-2.1\junit\junit\4.12\2973d150c0dc1fefe998f834810d68f278ea58ec\junit-4.12.jar;D:\Gowtham\Call\app\libs\junit-4.12.jar;C:\Users\Admin\.android\build-cache\a8ebdc26b1ff4bf5860d6fc1a036935096cb6d43\output\jars\classes.jar;C:\Users\Admin\.android\build-cache\a8ebdc26b1ff4bf5860d6fc1a036935096cb6d43\output\res;C:\Users\Admin\.android\build-cache\46ba9976ee8ae73b3356d726fe026b5d52ad9bf6\output\jars\classes.jar;C:\Users\Admin\.android\build-cache\46ba9976ee8ae73b3356d726fe026b5d52ad9bf6\output\res;C:\Users\Admin\.android\build-cache\d6d393b24cab7ffacecbe0e9e2ae20b6553d25e0\output\jars\classes.jar;C:\Users\Admin\.android\build-cache\d6d393b24cab7ffacecbe0e9e2ae20b6553d25e0\output\res;D:\Gowtham\Call\app\libs\phantomjsdriver-1.4.0.jar;D:\Gowtham\Call\app\build\intermediates\sourceFolderJavaResources\test\debug;D:\Gowtham\Call\app\build\intermediates\sourceFolderJavaResources\debug;D:\Gowtham\Call\build\generated\mockable-android-25.jar" com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 com.example.admin.call.FirstTest
org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: 'java -version' failed. Error: Command failed: C:\Windows\system32\cmd.exe /s /c "java -version"
) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 377 milliseconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'CD029', ip: '10.11.20.129', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_112-release'
Driver info: driver.version: RemoteWebDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53)
at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$22(ProtocolHandshake.java:365)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:368)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:159)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:637)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:250)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:236)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:137)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:174)
at com.example.admin.call.FirstTest.setUp(FirstTest.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
java.lang.NullPointerException
at com.example.admin.call.FirstTest.End(FirstTest.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Process finished with exit code -1 -
-
almost 9 years ago
Hi Nawazish,
The error logs and the attached screenshot states that the you cannot proceed until your screen is unlocked.
Follow the following steps to unlock your screen:
Emulator settings >> Security >> Screen lock >> None
Now the screen will always appear in unlock state and your will be executed successfully.Thanks
-
-
almost 9 years ago
Hi Kaushik, Please find below the error log as well as the attached screenshot of emulator screen:
Checking if an update is available Update not available Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address 127.0.0.1 --port 4723 --platform-name Android --platform-version 23 --automation-name Appium --log-no-color warn: Appium support for versions of node < 0.12 has been deprecated and will be removed in a future version. Please upgrade! info: Welcome to Appium v1.4.13 (REV c75d8adcb66a75818a542fe1891a34260c21f76a) info: Appium REST http interface listener started on 127.0.0.1:4723 info: [debug] Non-default server args: {"address":"127.0.0.1","logNoColors":true,"platformName":"Android","platformVersion":"23","automationName":"Appium"} info: Console LogLevel: debug info: --> POST /wd/hub/session {"desiredCapabilities":{"app":"C:\Users\EF\workspace\First_Android\src\UmallApp.apk","platformName":"Android","deviceName":"Android Emulator"}} info: Client User-Agent string: Apache-HttpClient/4.4.1 (Java/1.8.0_60) info: [debug] No appActivity desired capability or server param. Parsing from apk. info: [debug] No appPackage desired capability or server param. Parsing from apk. info: [debug] Using local app from desired caps: C:\Users\EF\workspace\First_Android\src\UmallApp.apk info: [debug] Creating new appium session 9a58fa54-2524-4aae-95d9-c5b9668e75b2 info: Starting android appium info: [debug] Getting Java version info: Java version is: 1.8.0_60 info: [debug] Checking whether adb is present info: [debug] Using adb from C:\Users\EF\android-sdks\platform-tools\adb.exe info: [debug] Parsing package and activity from app manifest info: [debug] Checking whether aapt is present info: [debug] Using aapt from C:\Users\EF\android-sdks\build-tools\23.0.2\aapt.exe info: [debug] Extracting package and launch activity from manifest. info: [debug] executing cmd: C:\Users\EF\android-sdks\build-tools\23.0.2\aapt.exe dump badging C:\Users\EF\workspace\First_Android\src\UmallApp.apk info: [debug] badging package: pk.umall info: [debug] badging act: pk.umall.SplashActivity_ info: [debug] Parsed package and activity are: pk.umall/pk.umall.SplashActivity_ info: [debug] Using fast reset? true info: [debug] Preparing device for session info: [debug] Checking whether app is actually present info: Retrieving device info: [debug] Trying to find a connected android device info: [debug] Getting connected devices... info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe devices info: [debug] 1 device(s) connected info: Found device emulator-5554 info: [debug] Setting device id to emulator-5554 info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5) info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 wait-for-device info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "echo 'ready'" info: [debug] Starting logcat capture info: [debug] Getting device API level info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "getprop ro.build.version.sdk" info: [debug] Device is at API Level 23 info: Device API level is: 23 info: [debug] Extracting strings for language: default info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "getprop persist.sys.language" info: [debug] Current device persist.sys.language: info: [debug] java -jar "C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar" "stringsFromApk" "C:\Users\EF\workspace\First_Android\src\UmallApp.apk" "C:\Users\EF\AppData\Local\Temp\pk.umall" info: [debug] Reading strings from converted strings.json info: [debug] Setting language to default info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 push "C:\Users\EF\AppData\Local\Temp\pk.umall\strings.json" /data/local/tmp info: [debug] Checking whether aapt is present info: [debug] Using aapt from C:\Users\EF\android-sdks\build-tools\23.0.2\aapt.exe info: [debug] Retrieving process from manifest. info: [debug] executing cmd: C:\Users\EF\android-sdks\build-tools\23.0.2\aapt.exe dump xmltree C:\Users\EF\workspace\First_Android\src\UmallApp.apk AndroidManifest.xml info: [debug] Set app process to: pk.umall info: [debug] Not uninstalling app since server not started with --full-reset info: [debug] Checking app cert for C:\Users\EF\workspace\First_Android\src\UmallApp.apk. info: [debug] executing cmd: java -jar "C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar" C:\Users\EF\workspace\First_Android\src\UmallApp.apk info: [debug] App already signed. info: [debug] Zip-aligning C:\Users\EF\workspace\First_Android\src\UmallApp.apk info: [debug] Checking whether zipalign is present info: [debug] Using zipalign from C:\Users\EF\android-sdks\build-tools\23.0.2\zipalign.exe info: [debug] Zip-aligning apk. info: [debug] executing cmd: C:\Users\EF\android-sdks\build-tools\23.0.2\zipalign.exe -f 4 C:\Users\EF\workspace\First_Android\src\UmallApp.apk C:\Users\EF\AppData\Local\Temp\1151016-8184-q09551\appium.tmp info: [debug] MD5 for app is 71b22c5da81333655262eb5cbe574ca1 info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "ls /data/local/tmp/71b22c5da81333655262eb5cbe574ca1.apk" info: [debug] Getting install status for pk.umall info: [debug] Getting device API level info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "getprop ro.build.version.sdk" info: [debug] Device is at API Level 23 info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "pm list packages -3 pk.umall" info: [debug] App is installed info: App is already installed, resetting app info: [debug] Running fast reset (stop and clear) info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "am force-stop pk.umall" info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "pm clear pk.umall" info: [debug] Forwarding system:4724 to device:4724 info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 forward tcp:4724 tcp:4724 info: [debug] Pushing appium bootstrap to device... info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 push "C:\Program Files (x86)\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar" /data/local/tmp/ info: [debug] Pushing settings apk to device... info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 install "C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk" info: [debug] Pushing unlock helper app to device... info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 install "C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk" info: Starting App info: [debug] Attempting to kill all 'uiautomator' processes info: [debug] Getting all processes with 'uiautomator' info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "ps 'uiautomator'" info: [debug] No matching processes found info: [debug] Running bootstrap info: [debug] spawning: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg pk.umall -e disableAndroidWatchers false info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1 info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream= info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap: info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1 info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1 info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724 info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready info: [debug] [BOOTSTRAP] [debug] Loading json... info: [debug] Waking up device if it's not alive info: [debug] Pushing command to appium work queue: ["wake",{}] info: [debug] [BOOTSTRAP] [debug] json loading complete. info: [debug] [BOOTSTRAP] [debug] Registered crash watchers. info: [debug] [BOOTSTRAP] [debug] Client connected info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"wake","params":{}} info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION info: [debug] [BOOTSTRAP] [debug] Got command action: wake info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":true} info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "dumpsys window" info: [debug] [BOOTSTRAP] [debug] Emitting system alert message info: [debug] Emitting alert message... info: Unlocking screen info: [debug] Screen is locked, trying to unlock info: [debug] Getting device API level info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "getprop ro.build.version.sdk" info: [debug] Device is at API Level 23 info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n io.appium.unlock/.Unlock" info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "dumpsys window" info: [debug] Stopping logcat capture info: [debug] Logcat terminated with code null, signal SIGTERM info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"shutdown"} info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN info: [debug] Sent shutdown command, waiting for UiAutomator to stop... info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":"OK, shutting down"} info: [debug] [BOOTSTRAP] [debug] Closed client connection info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1 info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=. info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1 info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0 info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream= info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=. info: [debug] [UIAUTOMATOR STDOUT] Time: 25.547 info: [debug] [UIAUTOMATOR STDOUT] OK (1 test) info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1 info: [debug] UiAutomator shut down normally error: Failed to start an Appium session, err was: Error: Screen did not unlock info: [debug] Cleaning up android objects info: [debug] Cleaning up appium session info: [debug] Error: Screen did not unlock at [object Object].
(C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android\android-controller.js:399:25) at C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1479:4 at [object Object]. (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:180:9) at ChildProcess.exithandler (child_process.js:635:7) at ChildProcess.EventEmitter.emit (events.js:98:17) at maybeClose (child_process.js:743:16) at Socket. (child_process.js:956:11) at Socket.EventEmitter.emit (events.js:95:17) at Pipe.close (net.js:465:12) info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Screen did not unlock)","origValue":"Screen did not unlock"},"sessionId":null} info: <-- POST /wd/hub/session 500 130796.209 ms - 164 -
-
almost 9 years ago
Hi Kaushik, Below given are the logs:
Checking if an update is available Update not available Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address 127.0.0.1 --port 4723 --platform-name Android --platform-version 23 --automation-name Appium --log-no-color warn: Appium support for versions of node < 0.12 has been deprecated and will be removed in a future version. Please upgrade! info: Welcome to Appium v1.4.13 (REV c75d8adcb66a75818a542fe1891a34260c21f76a) info: Appium REST http interface listener started on 127.0.0.1:4723 info: [debug] Non-default server args: {"address":"127.0.0.1","logNoColors":true,"platformName":"Android","platformVersion":"23","automationName":"Appium"} info: Console LogLevel: debug info: --> POST /wd/hub/session {"desiredCapabilities":{"app":"C:\Users\EF\workspace\First_Android\src\UmallApp.apk","platformName":"Android","deviceName":"Android Emulator"}} info: Client User-Agent string: Apache-HttpClient/4.4.1 (Java/1.8.0_60) info: [debug] No appActivity desired capability or server param. Parsing from apk. info: [debug] No appPackage desired capability or server param. Parsing from apk. info: [debug] Using local app from desired caps: C:\Users\EF\workspace\First_Android\src\UmallApp.apk info: [debug] Creating new appium session 9a58fa54-2524-4aae-95d9-c5b9668e75b2 info: Starting android appium info: [debug] Getting Java version info: Java version is: 1.8.0_60 info: [debug] Checking whether adb is present info: [debug] Using adb from C:\Users\EF\android-sdks\platform-tools\adb.exe info: [debug] Parsing package and activity from app manifest info: [debug] Checking whether aapt is present info: [debug] Using aapt from C:\Users\EF\android-sdks\build-tools\23.0.2\aapt.exe info: [debug] Extracting package and launch activity from manifest. info: [debug] executing cmd: C:\Users\EF\android-sdks\build-tools\23.0.2\aapt.exe dump badging C:\Users\EF\workspace\First_Android\src\UmallApp.apk info: [debug] badging package: pk.umall info: [debug] badging act: pk.umall.SplashActivity_ info: [debug] Parsed package and activity are: pk.umall/pk.umall.SplashActivity_ info: [debug] Using fast reset? true info: [debug] Preparing device for session info: [debug] Checking whether app is actually present info: Retrieving device info: [debug] Trying to find a connected android device info: [debug] Getting connected devices... info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe devices info: [debug] 1 device(s) connected info: Found device emulator-5554 info: [debug] Setting device id to emulator-5554 info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5) info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 wait-for-device info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "echo 'ready'" info: [debug] Starting logcat capture info: [debug] Getting device API level info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "getprop ro.build.version.sdk" info: [debug] Device is at API Level 23 info: Device API level is: 23 info: [debug] Extracting strings for language: default info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "getprop persist.sys.language" info: [debug] Current device persist.sys.language: info: [debug] java -jar "C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar" "stringsFromApk" "C:\Users\EF\workspace\First_Android\src\UmallApp.apk" "C:\Users\EF\AppData\Local\Temp\pk.umall" info: [debug] Reading strings from converted strings.json info: [debug] Setting language to default info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 push "C:\Users\EF\AppData\Local\Temp\pk.umall\strings.json" /data/local/tmp info: [debug] Checking whether aapt is present info: [debug] Using aapt from C:\Users\EF\android-sdks\build-tools\23.0.2\aapt.exe info: [debug] Retrieving process from manifest. info: [debug] executing cmd: C:\Users\EF\android-sdks\build-tools\23.0.2\aapt.exe dump xmltree C:\Users\EF\workspace\First_Android\src\UmallApp.apk AndroidManifest.xml info: [debug] Set app process to: pk.umall info: [debug] Not uninstalling app since server not started with --full-reset info: [debug] Checking app cert for C:\Users\EF\workspace\First_Android\src\UmallApp.apk. info: [debug] executing cmd: java -jar "C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar" C:\Users\EF\workspace\First_Android\src\UmallApp.apk info: [debug] App already signed. info: [debug] Zip-aligning C:\Users\EF\workspace\First_Android\src\UmallApp.apk info: [debug] Checking whether zipalign is present info: [debug] Using zipalign from C:\Users\EF\android-sdks\build-tools\23.0.2\zipalign.exe info: [debug] Zip-aligning apk. info: [debug] executing cmd: C:\Users\EF\android-sdks\build-tools\23.0.2\zipalign.exe -f 4 C:\Users\EF\workspace\First_Android\src\UmallApp.apk C:\Users\EF\AppData\Local\Temp\1151016-8184-q09551\appium.tmp info: [debug] MD5 for app is 71b22c5da81333655262eb5cbe574ca1 info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "ls /data/local/tmp/71b22c5da81333655262eb5cbe574ca1.apk" info: [debug] Getting install status for pk.umall info: [debug] Getting device API level info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "getprop ro.build.version.sdk" info: [debug] Device is at API Level 23 info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "pm list packages -3 pk.umall" info: [debug] App is installed info: App is already installed, resetting app info: [debug] Running fast reset (stop and clear) info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "am force-stop pk.umall" info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "pm clear pk.umall" info: [debug] Forwarding system:4724 to device:4724 info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 forward tcp:4724 tcp:4724 info: [debug] Pushing appium bootstrap to device... info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 push "C:\Program Files (x86)\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar" /data/local/tmp/ info: [debug] Pushing settings apk to device... info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 install "C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk" info: [debug] Pushing unlock helper app to device... info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 install "C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk" info: Starting App info: [debug] Attempting to kill all 'uiautomator' processes info: [debug] Getting all processes with 'uiautomator' info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "ps 'uiautomator'" info: [debug] No matching processes found info: [debug] Running bootstrap info: [debug] spawning: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg pk.umall -e disableAndroidWatchers false info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1 info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream= info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap: info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1 info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1 info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724 info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready info: [debug] [BOOTSTRAP] [debug] Loading json... info: [debug] Waking up device if it's not alive info: [debug] Pushing command to appium work queue: ["wake",{}] info: [debug] [BOOTSTRAP] [debug] json loading complete. info: [debug] [BOOTSTRAP] [debug] Registered crash watchers. info: [debug] [BOOTSTRAP] [debug] Client connected info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"wake","params":{}} info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION info: [debug] [BOOTSTRAP] [debug] Got command action: wake info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":true} info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "dumpsys window" info: [debug] [BOOTSTRAP] [debug] Emitting system alert message info: [debug] Emitting alert message... info: Unlocking screen info: [debug] Screen is locked, trying to unlock info: [debug] Getting device API level info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "getprop ro.build.version.sdk" info: [debug] Device is at API Level 23 info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n io.appium.unlock/.Unlock" info: [debug] executing cmd: C:\Users\EF\android-sdks\platform-tools\adb.exe -s emulator-5554 shell "dumpsys window" info: [debug] Stopping logcat capture info: [debug] Logcat terminated with code null, signal SIGTERM info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"shutdown"} info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN info: [debug] Sent shutdown command, waiting for UiAutomator to stop... info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":"OK, shutting down"} info: [debug] [BOOTSTRAP] [debug] Closed client connection info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1 info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=. info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1 info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0 info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream= info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=. info: [debug] [UIAUTOMATOR STDOUT] Time: 25.547 info: [debug] [UIAUTOMATOR STDOUT] OK (1 test) info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1 info: [debug] UiAutomator shut down normally error: Failed to start an Appium session, err was: Error: Screen did not unlock info: [debug] Cleaning up android objects info: [debug] Cleaning up appium session info: [debug] Error: Screen did not unlock at [object Object].
(C:\Program Files (x86)\Appium\node_modules\appium\lib\devices\android\android-controller.js:399:25) at C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1479:4 at [object Object]. (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:180:9) at ChildProcess.exithandler (child_process.js:635:7) at ChildProcess.EventEmitter.emit (events.js:98:17) at maybeClose (child_process.js:743:16) at Socket. (child_process.js:956:11) at Socket.EventEmitter.emit (events.js:95:17) at Pipe.close (net.js:465:12) info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Screen did not unlock)","origValue":"Screen did not unlock"},"sessionId":null} info: <-- POST /wd/hub/session 500 130796.209 ms - 164 -
-
almost 9 years ago
Hi Nawazish,
Please share the error logs.
Thanks,
-
-
almost 9 years ago
Hi Guys,
I am getting the same error. Anyone can let me know the solution to get this issue resolved. Please note that I am running an emulator in Eclipse on windows platform not an actual device. Once the below given code is executed, a message appears on emulator with wait & ok button and after clicking on any button the top left corner of emulator shows Unlock. Please help to get this issue resolved.
import static org.junit.Assert.*;
import java.io.File; import java.net.MalformedURLException; import java.net.URL;
import io.appium.java_client.android.AndroidDriver; import io.appium.java_client.android.AndroidElement; import io.appium.java_client.remote.MobileCapabilityType; import io.appium.java_client.remote.MobilePlatform;
import org.junit.Test; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.RemoteWebDriver;
public class DesiredCap {
@Test public void test() throws MalformedURLException { //fail("Not yet implemented"); File appdir = new File ("src"); File app = new File (appdir, "App.apk"); DesiredCapabilities cap = new DesiredCapabilities(); cap.setCapability(MobileCapabilityType.PLATFORM_NAME, MobilePlatform.ANDROID); cap.setCapability(MobileCapabilityType.DEVICE_NAME, "Android Emulator"); cap.setCapability(MobileCapabilityType.APP, app.getAbsolutePath()); AndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement> (new URL("http://127.0.0.1:4723/wd/hub"), cap); }
}
-
6 Comment(s)