Skip to content

Instantly share code, notes, and snippets.

@VenkateshPS
Created June 20, 2018 10:40
Show Gist options
  • Save VenkateshPS/978b677c9198a20d98f29639cb589735 to your computer and use it in GitHub Desktop.
Save VenkateshPS/978b677c9198a20d98f29639cb589735 to your computer and use it in GitHub Desktop.
Appium 1.8.1 log while running test on Android7
[debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 8200
[debug] [ADB] Forwarding system: 8200 to device: 6790
[debug] [ADB] Running '/Users/venkateshsingh/android/platform-tools/adb -P 5037 -s 5210574eea242489 forward tcp\:8200 tcp\:6790'
[debug] [ADB] Running '/Users/venkateshsingh/android/platform-tools/adb -P 5037 -s 5210574eea242489 shell rm -rf /data/local/tmp/strings.json'
[debug] [AndroidDriver] Extracting strings from apk
[debug] [AndroidDriver] /Users/venkateshsingh/Desktop/UCAutomation/App/uc-debugJenkins-6.0.0-1033d.apk
[debug] [AndroidDriver] null
[debug] [AndroidDriver] /var/folders/z_/bz3z41cn74q1_jc1jlc4h26c0000gn/T/com.vocera.uc
[debug] [ADB] Extracting strings for language: default
[ADB] Successfully extracted 409 strings from '/Users/venkateshsingh/Desktop/UCAutomation/App/uc-debugJenkins-6.0.0-1033d.apk' resources for '(default)' configuration
[debug] [ADB] Running '/Users/venkateshsingh/android/platform-tools/adb -P 5037 -s 5210574eea242489 push /var/folders/z_/bz3z41cn74q1_jc1jlc4h26c0000gn/T/com.vocera.uc/strings.json /data/local/tmp'
[debug] [ADB] Checking app cert for /Users/venkateshsingh/Desktop/UCAutomation/App/uc-debugJenkins-6.0.0-1033d.apk
[debug] [ADB] Starting '/Users/venkateshsingh/android/build-tools/27.0.1/apksigner' with args 'verify,--print-certs,/Users/venkateshsingh/Desktop/UCAutomation/App/uc-debugJenkins-6.0.0-1033d.apk'
[debug] [ADB] '/Users/venkateshsingh/Desktop/UCAutomation/App/uc-debugJenkins-6.0.0-1033d.apk' is already signed.
[debug] [ADB] Getting install status for com.vocera.uc
[debug] [ADB] Running '/Users/venkateshsingh/android/platform-tools/adb -P 5037 -s 5210574eea242489 shell pm list packages com.vocera.uc'
[debug] [ADB] App is not installed
[debug] [ADB] Getting install status for com.vocera.uc
[debug] [ADB] Running '/Users/venkateshsingh/android/platform-tools/adb -P 5037 -s 5210574eea242489 shell pm list packages com.vocera.uc'
[debug] [ADB] App is not installed
[debug] [ADB] App '/Users/venkateshsingh/Desktop/UCAutomation/App/uc-debugJenkins-6.0.0-1033d.apk' not installed. Installing
[debug] [ADB] Running '/Users/venkateshsingh/android/platform-tools/adb -P 5037 -s 5210574eea242489 install /Users/venkateshsingh/Desktop/UCAutomation/App/uc-debugJenkins-6.0.0-1033d.apk'
[debug] [ADB] Install command stdout:
[debug] [ADB] Running '/Users/venkateshsingh/android/platform-tools/adb -P 5037 -s 5210574eea242489 shell am force-stop io.appium.uiautomator2.server'
[UiAutomator2] Starting uiautomator2 server 1.12.0
[UiAutomator2] Using UIAutomator2 server from '/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v1.12.0.apk' and test from '/usr/local/lib/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk'
[UiAutomator2] Running command: 'adb -s 5210574eea242489 shell am instrument -w io.appium.uiautomator2.server.test/android.support.test.runner.AndroidJUnitRunner'
[UiAutomator2] Waiting up to 20000ms for UiAutomator2 to be online...
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [UiAutomator2] [UIAutomator2] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
[debug] [UiAutomator2] [UIAutomator2] Error in startServer(io.appium.uiautomator2.server.test.AppiumUiAutomator2Server):
[debug] [UiAutomator2] [UIAutomator2] java.lang.NoSuchMethodError: No static method getInstance(Landroid/content/Context;I)Lio/appium/uiautomator2/server/ServerInstrumentation; in class Lio/appium/uiautomator2/server/ServerInstrumentation; or its super classes (declaration of 'io.appium.uiautomator2.server.ServerInstrumentation' appears in /data/app/io.appium.uiautomator2.server-2/base.apk)
[debug] [UiAutomator2] [UIAutomator2] at io.appium.uiautomator2.server.test.AppiumUiAutomator2Server.startServer(AppiumUiAutomator2Server.java:29)
[debug] [UiAutomator2] [UIAutomator2] at java.lang.reflect.Method.invoke(Native Method)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.Suite.runChild(Suite.java:128)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.Suite.runChild(Suite.java:27)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
[debug] [UiAutomator2] [UIAutomator2] at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:59)
[debug] [UiAutomator2] [UIAutomator2] at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:262)
[debug] [UiAutomator2] [UIAutomator2] at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1967)
[debug] [UiAutomator2] [UIAutomator2] Time: 0.01
[debug] [UiAutomator2] [UIAutomator2] There was 1 failure:
[debug] [UiAutomator2] [UIAutomator2] 1) startServer(io.appium.uiautomator2.server.test.AppiumUiAutomator2Server)
[debug] [UiAutomator2] [UIAutomator2] java.lang.NoSuchMethodError: No static method getInstance(Landroid/content/Context;I)Lio/appium/uiautomator2/server/ServerInstrumentation; in class Lio/appium/uiautomator2/server/ServerInstrumentation; or its super classes (declaration of 'io.appium.uiautomator2.server.ServerInstrumentation' appears in /data/app/io.appium.uiautomator2.server-2/base.apk)
[debug] [UiAutomator2] [UIAutomator2] at io.appium.uiautomator2.server.test.AppiumUiAutomator2Server.startServer(AppiumUiAutomator2Server.java:29)
[debug] [UiAutomator2] [UIAutomator2] at java.lang.reflect.Method.invoke(Native Method)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.Suite.runChild(Suite.java:128)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.Suite.runChild(Suite.java:27)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
[debug] [UiAutomator2] [UIAutomator2] at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
[debug] [UiAutomator2] [UIAutomator2] at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:59)
[debug] [UiAutomator2] [UIAutomator2] at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:262)
[debug] [UiAutomator2] [UIAutomator2] at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1967)
[debug] [UiAutomator2] [UIAutomator2] FAILURES!!!
[debug] [UiAutomator2] [UIAutomator2] Tests run: 1, Failures: 1
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8200/wd/hub/status] with no body
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error was: Error: Trying to proxy a session command without session id
[debug] [ADB] Running '/Users/venkateshsingh/android/platform-tools/adb -P 5037 -s 5210574eea242489 shell am force-stop com.vocera.uc'
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Removing forwarded port socket connection: 8200
[debug] [ADB] Running '/Users/venkateshsingh/android/platform-tools/adb -P 5037 -s 5210574eea242489 forward --remove tcp\:8200'
[debug] [BaseDriver] Event 'newSessionStarted' logged at 1529489447833 (15:40:47 GMT+0530 (IST))
[HTTP] <-- POST /wd/hub/session 400 43837 ms - 934
[HTTP]
Jun 20, 2018 3:40:47 PM org.openqa.selenium.remote.ErrorCodes toStatus
INFO: HTTP Status: '400' -> incorrect JSON status mapping for 'unknown error' (500 expected)
org.openqa.selenium.WebDriverException: Could not proxy command to remote server. Original error: Error: read ECONNRESET
Build info: version: '3.9.1', revision: '63f7b50', time: '2018-02-07T22:25:02.294Z'
System info: host: 'Venkateshs-MacBook-Pro.local', ip: 'fe80:0:0:0:18ed:c23a:828f:a93d%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.4', java.version: '1.8.0_60'
Driver info: driver.version: UCAndroidDriver
remote stacktrace: ProxyRequestError: Could not proxy command to remote server. Original error: Error: read ECONNRESET
at JWProxy.proxy$ (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:152:13)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
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:422)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$new$0(W3CHandshakeResponse.java:57)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$getResponseFunction$2(W3CHandshakeResponse.java:104)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
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:126)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:129)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:545)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:209)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:132)
at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:38)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:84)
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:94)
at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:79)
@Alwirasheikh
Copy link

What is the solution for this? I am getting the same error

  1. startServer(io.appium.uiautomator2.server.test.AppiumUiAutomator2Server)
    [debug] [UiAutomator2] [UIAutomator2] java.lang.NoSuchMethodError: No static method getInstance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment