Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process crashed while executing startEspressoServer #460

Open
maskedpatel opened this issue Jun 18, 2019 · 3 comments
Open

Process crashed while executing startEspressoServer #460

maskedpatel opened this issue Jun 18, 2019 · 3 comments

Comments

@maskedpatel
Copy link

Hey, so we've been using Appium at our company for a while now and were planning to make the move from Appium's UIAutomator2 driver to their Espresso driver.
We had no issues running our UI tests using the UIAutomator2 driver. In our config file we changed the capabilities JSON to:
capabilities: [{
platformName: 'Android',
platformVersion: '9',
deviceName: 'Android Emulator',
automationName: 'Espresso',
app: resolve(__dirname, '..', 'mobile.kt', 'app', 'build', 'outputs', 'apk', 'debug', 'app-debug.apk'),
avd: 'Pixel_XL_API_28'
}]
We then tried to re-run the same tests but it failed. We also use Espresso tests directly in our Android platform without any issue which is why the following error seemed strange to us. I attached our log as well as an excerpt of the error we saw. Any help would be much appreciated. Thanks!
2019-06-17T23_55_01_877Z-debug.log

[debug] [Espresso] [Instrumentation] [STDOUT] java.lang.IllegalStateException: This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat.
[debug] [Espresso] [Instrumentation] [STDOUT] at androidx.appcompat.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:756)
[debug] [Espresso] [Instrumentation] [STDOUT] at androidx.appcompat.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:196)
[debug] [Espresso] [Instrumentation] [STDOUT] at androidx.appcompat.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:86)
[debug] [Espresso] [Instrumentation] [STDOUT] at androidx.appcompat.app.AppCompatDelegateImpl.(AppCompatDelegateImpl.java:260)
[debug] [Espresso] [Instrumentation] [STDOUT] at androidx.appcompat.app.AppCompatDelegate.create(AppCompatDelegate.java:182)
[debug] [Espresso] [Instrumentation] [STDOUT] at androidx.appcompat.app.AppCompatActivity.getDelegate(AppCompatActivity.java:520)
[debug] [Espresso] [Instrumentation] [STDOUT] at androidx.appcompat.app.AppCompatActivity.onCreate(AppCompatActivity.java:71)
[debug] [Espresso] [Instrumentation] [STDOUT] at com.rebelvox.voxerio.utils.VoxerActivity.onCreate(VoxerActivity.kt:15)
[debug] [Espresso] [Instrumentation] [STDOUT] at com.rebelvox.voxerio.main.VoxerMainActivity.onCreate(VoxerMainActivity.kt:163)
[debug] [Espresso] [Instrumentation] [STDOUT] at android.app.Activity.performCreate(Activity.java:7136)
[debug] [Espresso] [Instrumentation] [STDOUT] at android.app.Activity.performCreate(Activity.java:7127)
[debug] [Espresso] [Instrumentation] [STDOUT] at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
[debug] [Espresso] [Instrumentation] [STDOUT] at androidx.test.runner.MonitoringInstrumentation.callActivityOnCreate(MonitoringInstrumentation.java:674)
[debug] [Espresso] [Instrumentation] [STDOUT] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
[debug] [Espresso] [Instrumentation] [STDOUT] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
[debug] [Espresso] [Instrumentation] [STDOUT] at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
[debug] [Espresso] [Instrumentation] [STDOUT] at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
[debug] [Espresso] [Instrumentation] [STDOUT] at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
[debug] [Espresso] [Instrumentation] [STDOUT] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
[debug] [Espresso] [Instrumentation] [STDOUT] at android.os.Handler.dispatchMessage(Handler.java:106)
[debug] [Espresso] [Instrumentation] [STDOUT] at android.os.Looper.loop(Looper.java:193)
[debug] [Espresso] [Instrumentation] [STDOUT] at android.app.ActivityThread.main(ActivityThread.java:6669)
[debug] [Espresso] [Instrumentation] [STDOUT] at java.lang.reflect.Method.invoke(Native Method)
[debug] [Espresso] [Instrumentation] [STDOUT] at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
[debug] [Espresso] [Instrumentation] [STDOUT] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

@KazuCocoa
Copy link
Member

java.lang.IllegalStateException: This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat.

I assume it depends on your test target app...
What about VectorDrawableCompat related items like https://stackoverflow.com/questions/38143867/why-this-app-has-been-built-with-an-incorrect-configuration-error-occured-in-s ?

@maskedpatel
Copy link
Author

Yeah we saw this and a couple other stackoverflow posts that pretty much all say to just update your gradle version in the app. Our gradle is 3.4.1 which is up to date in comparison with the issues seen in the stackoverflow posts. Just wondering if there's any other possibilities that could be considered.

@KazuCocoa
Copy link
Member

mm, one possibility is if the code refers support library's VectorDrawableCompat.

I mean like below:

  • your app refers android module (not AndroidX)
  • the espresso module refers AndroidX support library module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants