Trying to start the Appium server using ‘Espresso’ with below configurations:
{
“app”: “/Users/xyz/Downloads/app-debug.apk”,
“platformName”: “Android”,
“deviceName”: “emulator-5554”,
“automationName”: “espresso”,
“fullReset”: “true”,
“forceEspressoRebuild”: “true”
}
Exception received as below:
A new session could not be created. Details: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up.
appium-server-logs.txt (27.6 KB)
Appium version: 1.23.0-beta.0 / 1.21.0-1
wreed
March 3, 2022, 5:02pm
2
Here’s the error you are getting:
java.lang.NoSuchMethodError: No static method lifecycleEventObserver(Ljava/lang/Object;)Landroidx/lifecycle/LifecycleEventObserver; in class Landroidx/lifecycle/Lifecycling; or its super classes (declaration of ‘androidx.lifecycle.Lifecycling’ appears in /data/app/io.appium.espressoserver.test-z4Zirf10mrYG1Q9H2t7VhQ==/base.apk)
The closest thing I can find is this:
opened 01:37AM - 10 May 19 UTC
Appium v1.12.0
I'm not very familiar with Appium, this is my first crack at thi… s.
I get the following exception when I try to start an Appium session with espresso. The crash is happening in the `onCreate` method of all my activities (I've tried starting with different activities) via `androidx.appcompat.app.AppCompatActivity.onCreate(AppCompatActivity.java:71)`.
This crash does not happen when I change the driver to `UiAutomator2`, run the app on its own, or run my Espresso test suite. The crash only occurs when I run through Appium via the Espresso driver.
My config JSON:
```
{
"deviceName": "P500",
"platformName": "Android",
"platformVersion": 21,
"automationName": "Espresso",
"app": "C:\\builds\\redacted-debug.apk",
"appPackage": "com.redacted.debug",
"udid": "123456789",
"appActivity": "com.redacted.activity.SplashActivity",
"noReset": true,
"skipUnlock": true
}
```
Exception Stack trace:
```
04-26 22:29:07.231 31232 31232 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.redacted.debug/com.redacted.activity.SetupActivity}: android.content.res.Resources$NotFoundException: Resource "com.redacted.debug:dimen/cockpit_section_status_max_width" (7f070059) is not a Drawable (color or path): TypedValue{t=0x5/d=0x25801 a=2 r=0x7f070059}
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at android.app.ActivityThread.access$800(ActivityThread.java:151)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at android.os.Looper.loop(Looper.java:135)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5257)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:955)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:750)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: Caused by: android.content.res.Resources$NotFoundException: Resource "com.redacted.debug:dimen/cockpit_section_status_max_width" (7f070059) is not a Drawable (color or path): TypedValue{t=0x5/d=0x25801 a=2 r=0x7f070059}
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at android.content.res.Resources.loadDrawableForCookie(Resources.java:2441)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at android.content.res.Resources.loadDrawable(Resources.java:2381)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at android.content.res.Resources.getDrawable(Resources.java:787)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at android.content.Context.getDrawable(Context.java:403)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at androidx.core.content.ContextCompat.getDrawable(ContextCompat.java:463)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at androidx.appcompat.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:203)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at androidx.appcompat.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:191)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at androidx.appcompat.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:753)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at androidx.appcompat.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:196)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at androidx.appcompat.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:86)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at androidx.appcompat.app.AppCompatDelegateImpl.<init>(AppCompatDelegateImpl.java:260)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at androidx.appcompat.app.AppCompatDelegate.create(AppCompatDelegate.java:182)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at androidx.appcompat.app.AppCompatActivity.getDelegate(AppCompatActivity.java:520)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at androidx.appcompat.app.AppCompatActivity.onCreate(AppCompatActivity.java:71)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at com.redacted.activity.SetupActivity.onCreate(SetupActivity.java:125)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6013)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at androidx.test.runner.MonitoringInstrumentation.callActivityOnCreate(MonitoringInstrumentation.java:674)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
04-26 22:29:07.231 31232 31232 E AndroidRuntime: ... 10 more
```
Trying with Appium 1.13.0 gives me a different error:
`[debug] [MJSONWP] Encountered internal error running command: Error: java.lang.SecurityException: Permission Denial: starting instrumentation ComponentInfo{io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner} from pid=13136, uid=13136 not allowed because package io.appium.espressoserver.test does not have a signature matching the target com.redacted.debug`
You don’t give any details on your setup but the discussion suggests it could be a bad Gradle entry.
1 Like