appium / appium-uiautomator2-server

Appium UiAutomator/UiObject2-based server for Android UI automation. This module is used by appium-uiautomator2-driver component
Apache License 2.0
319 stars 227 forks source link

how i can give same signature matching #629

Open AstinOfficial opened 2 months ago

AstinOfficial commented 2 months ago

[Instrumentation] INSTRUMENTATION_STATUS: Error=Permission Denial: starting instrumentation ComponentInfo{io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner} from pid=22085, uid=2000 not allowed because package io.appium.uiautomator2.server.test does not have a signature matching the target io.appium.uiautomator2.server [Instrumentation] INSTRUMENTATION_STATUS: id=ActivityManagerService [Instrumentation] INSTRUMENTATION_STATUS_CODE: -1 [Instrumentation] java.lang.SecurityException: Permission Denial: starting instrumentation ComponentInfo{io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner} from pid=22085, uid=2000 not allowed because package io.appium.uiautomator2.server.test does not have a signature matching the target io.appium.uiautomator2.server [Instrumentation] at android.os.Parcel.createExceptionOrNull(Parcel.java:3011) [Instrumentation] at android.os.Parcel.createException(Parcel.java:2995) [Instrumentation] at android.os.Parcel.readException(Parcel.java:2978) [Instrumentation] at android.os.Parcel.readException(Parcel.java:2920) [Instrumentation] at android.app.IActivityManager$Stub$Proxy.startInstrumentation(IActivityManager.java:5500) [Instrumentation] at com.android.commands.am.Instrument.run(Instrument.java:532) [Instrumentation] at com.android.commands.am.Am.runInstrument(Am.java:208) [Instrumentation] at com.android.commands.am.Am.onRun(Am.java:85) [Instrumentation] at com.android.internal.os.BaseCommand.run(BaseCommand.java:62) [Instrumentation] at com.android.commands.am.Am.main(Am.java:54) [Instrumentation] at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method) [Instrumentation] at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:355) [Instrumentation] Caused by: android.os.RemoteException: Remote stack trace: [Instrumentation] at com.android.server.am.ActivityManagerService.startInstrumentation(ActivityManagerService.java:14641) [Instrumentation] at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2611) [Instrumentation] at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2630) [Instrumentation] at android.os.Binder.execTransactInternal(Binder.java:1280) [Instrumentation] at android.os.Binder.execTransact(Binder.java:1244) [Instrumentation] The process has exited with code 1 [AndroidUiautomator2Driver@4006 (d32c973e)] The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.

KazuCocoa commented 2 months ago

Could you share the full Appium log and how to prepare the io.appium.uiautomator2.server.test/io.appium.uiautomator2.server packages?

Usually both have the same appium dev's signature https://github.com/appium/appium-adb/tree/master/keys