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

java.lang.IllegalAccessError: Illegal class access ('X.0P7' attempting to access 'androidx.lifecycle.ReportFragment$LifecycleCallbacks') #826

Open
ouhadjilyes opened this issue Oct 15, 2022 · 2 comments

Comments

@ouhadjilyes
Copy link

ouhadjilyes commented Oct 15, 2022

I'm testing a native android mobile app (black-box testing) using appium with espresso driver , I'm getting a """ java.lang.IllegalAccessError """ for this method """ androidx.lifecycle.ReportFragment$LifecycleCallbacks.registerIn(android.app.Activity) """

Appium (v2.0.0-beta.46)
Java 19

Caps :
"platformName" : "Android", "forceEspressoRebuild" : "true", "platformVersion" : "12", "automationName" : "Espresso", "showGradleLog" : "true", "app" : "apidemos.apk"

Logs:

Creating ADB subprocess with args: ["-P",5037,"-s","RR8T70235ZX","shell","am","instrument","-w","-e","debug",false,"-e","disableAnalytics",true,"io.appium.espressoserver.test/androidx.test.runner.AndroidJUnitRunner"]
[EspressoDriver@fa76 (23b97af1)] Waiting up to 45000ms for Espresso server to be online
[debug] [EspressoDriver@fa76 (23b97af1)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@fa76 (23b97af1)] Proxying [GET /status] to [GET http://127.0.0.1:50348/status] with no body
[EspressoDriver@fa76 (23b97af1)] socket hang up
[debug] [EspressoDriver@fa76 (23b97af1)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@fa76 (23b97af1)] Proxying [GET /status] to [GET http://127.0.0.1:50348/status] with no body
[EspressoDriver@fa76 (23b97af1)] socket hang up
[debug] [EspressoDriver@fa76 (23b97af1)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@fa76 (23b97af1)] Proxying [GET /status] to [GET http://127.0.0.1:50348/status] with no body
[EspressoDriver@fa76 (23b97af1)] socket hang up
[debug] [EspressoDriver@fa76 (23b97af1)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@fa76 (23b97af1)] Proxying [GET /status] to [GET http://127.0.0.1:50348/status] with no body
[EspressoDriver@fa76 (23b97af1)] socket hang up
[debug] [EspressoDriver@fa76 (23b97af1)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@fa76 (23b97af1)] Proxying [GET /status] to [GET http://127.0.0.1:50348/status] with no body
[EspressoDriver@fa76 (23b97af1)] socket hang up
[debug] [EspressoDriver@fa76 (23b97af1)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@fa76 (23b97af1)] Proxying [GET /status] to [GET http://127.0.0.1:50348/status] with no body
[EspressoDriver@fa76 (23b97af1)] socket hang up
[debug] [EspressoDriver@fa76 (23b97af1)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@fa76 (23b97af1)] Proxying [GET /status] to [GET http://127.0.0.1:50348/status] with no body
[EspressoDriver@fa76 (23b97af1)] socket hang up
[HTTP] --> GET /device-farm/api/devices
[HTTP] {}
[debug] [EspressoDriver@fa76 (23b97af1)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@fa76 (23b97af1)] Proxying [GET /status] to [GET http://127.0.0.1:50348/status] with no body
[HTTP] --> GET /dashboard/api/sessions?start_time=2022-10-15T22:11:27.541Z
[HTTP] {}
[EspressoDriver@fa76 (23b97af1)] socket hang up
[HTTP] <-- GET /dashboard/api/sessions?start_time=2022-10-15T22:11:27.541Z 200 12 ms - 47
[HTTP]
[HTTP] <-- GET /device-farm/api/devices 200 27 ms - 433
[HTTP]
[HTTP] --> GET /device-farm/api/queue
[HTTP] {}
[HTTP] <-- GET /device-farm/api/queue 200 1 ms - 1
[HTTP]
[debug] [EspressoDriver@fa76 (23b97af1)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@fa76 (23b97af1)] Proxying [GET /status] to [GET http://127.0.0.1:50348/status] with no body
[EspressoDriver@fa76 (23b97af1)] socket hang up
[debug] [EspressoDriver@fa76 (23b97af1)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@fa76 (23b97af1)] Proxying [GET /status] to [GET http://127.0.0.1:50348/status] with no body
[EspressoDriver@fa76 (23b97af1)] socket hang up
[debug] [EspressoDriver@fa76 (23b97af1)] [Instrumentation] io.appium.espressoserver.EspressoServerRunnerTest:
[debug] [EspressoDriver@fa76 (23b97af1)] Matched '/status' to command name 'getStatus'
[debug] [EspressoDriver@fa76 (23b97af1)] Proxying [GET /status] to [GET http://127.0.0.1:50348/status] with no body
[debug] [EspressoDriver@fa76 (23b97af1)] Got response with status 200: {"id":"00b055eb-d27d-43b7-a261-f35afa67e6c7","sessionId":null,"value":null}
[EspressoDriver@fa76 (23b97af1)] Espresso server is online. The initialization process took 5391ms
[EspressoDriver@fa76 (23b97af1)] Starting the session
[debug] [EspressoDriver@fa76 (23b97af1)] Matched '/session' to command name 'createSession'
[debug] [EspressoDriver@fa76 (23b97af1)] Proxying [POST /session] to [POST http://127.0.0.1:50348/session] with body: {"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","forceEspressoRebuild":true,"platformVersion":"12","automationName":"Espresso","showGradleLog":true,"app":"facebook.apk","clearDeviceLogsOnStart":true,"nativeWebScreenshot":true,"mjpegServerPort":50147,"udid":"RR8T70235ZX","systemPort":50348,"chromeDriverPort":50349},"platformName":"Android","forceEspressoRebuild":true,"platformVersion":"12","automationName":"Espresso","showGradleLog":true,"app":"facebook.apk","clearDeviceLogsOnStart":true,"nativeWebScreenshot":true,"mjpegServerPort":50147,"udid":"RR8T70235ZX","systemPort":50348,"chromeDriverPort":50349,"deviceName":"RR8T70235ZX","deviceUDID":"RR8T70235ZX","appPackage":"com.facebook.katana","appWaitPackage":"com.facebook.katana","appActivity":"com.facebook.katana.LoginActivity","appWaitActivity":"co...
[debug] [EspressoDriver@fa76 (23b97af1)] [Instrumentation] Process crashed while executing startEspressoServer(io.appium.espressoserver.EspressoServerRunnerTest):
[debug] [EspressoDriver@fa76 (23b97af1)] java.lang.IllegalAccessError: Illegal class access ('X.0P7' attempting to access 'androidx.lifecycle.ReportFragment$LifecycleCallbacks') in attempt to invoke static method void androidx.lifecycle.ReportFragment$LifecycleCallbacks.registerIn(android.app.Activity) (declaration of 'X.0P7' appears in /data/app/~~jpbLI0xLz_Nn6T5WFH4XZA==/com.facebook.katana-yIoi7QkQNwrM81ZrPyVlgQ==/base.apk)
[debug] [EspressoDriver@fa76 (23b97af1)] at X.0P7.A00(:6)
[debug] [EspressoDriver@fa76 (23b97af1)] at androidx.lifecycle.LifecycleDispatcher$DispatcherActivityCallback.onActivityCreated(:0)
[debug] [EspressoDriver@fa76 (23b97af1)] at com.facebook.katana.app.LifecycleCallbacksTracer$Wrapper.onActivityCreated(:21)
[debug] [EspressoDriver@fa76 (23b97af1)] at android.app.Application.dispatchActivityCreated(Application.java:372)
[debug] [EspressoDriver@fa76 (23b97af1)] at android.app.Activity.dispatchActivityCreated(Activity.java:1374)
[debug] [EspressoDriver@fa76 (23b97af1)] at android.app.Activity.onCreate(Activity.java:1651)
[debug] [EspressoDriver@fa76 (23b97af1)] at com.facebook.katana.app.mainactivity.FbMainActivity.onCreate(:55)
[debug] [EspressoDriver@fa76 (23b97af1)] at android.app.Activity.performCreate(Activity.java:8290)
[debug] [EspressoDriver@fa76 (23b97af1)] at android.app.Activity.performCreate(Activity.java:8270)
[debug] [EspressoDriver@fa76 (23b97af1)] at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
[debug] [EspressoDriver@fa76 (23b97af1)] at androidx.test.runner.MonitoringInstrumentation.callActivityOnCreate(MonitoringInstrumentation.java:730)
[debug] [EspressoDriver@fa76 (23b97af1)] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4085)
[debug] [EspressoDriver@fa76 (23b97af1)] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4277)
[debug] [EspressoDriver@fa76 (23b97af1)] at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
[debug] [EspressoDriver@fa76 (23b97af1)] at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
[debug] [EspressoDriver@fa76 (23b97af1)] at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
[debug] [EspressoDriver@fa76 (23b97af1)] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
[debug] [EspressoDriver@fa76 (23b97af1)] at android.os.Handler.dispatchMessage(Handler.java:106)
[debug] [EspressoDriver@fa76 (23b97af1)] at android.os.Looper.loopOnce(Looper.java:226)
[debug] [EspressoDriver@fa76 (23b97af1)] at android.os.Looper.loop(Looper.java:313)
[debug] [EspressoDriver@fa76 (23b97af1)] at android.app.ActivityThread.main(ActivityThread.java:8751)
[debug] [EspressoDriver@fa76 (23b97af1)] at java.lang.reflect.Method.invoke(Native Method)
[debug] [EspressoDriver@fa76 (23b97af1)] at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
[debug] [EspressoDriver@fa76 (23b97af1)] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
[debug] [ADB] Getting connected devices
[debug] [ADB] Connected devices: [{"udid":"RR8T70235ZX","state":"device"}]
[device-farm] Android Device details for RR8T70235ZX already available
[Appium] Received SIGINT - shutting down
[debug] [AppiumDriver@ebbd] There are no active sessions for cleanup
[HTTP] Waiting until the server is closed
[HTTP] Received server close event

@KazuCocoa
Copy link
Member

What library has X.0P7? (Maybe it is not Android Espresso or general Android provided API thing...?)

@ouhadjilyes
Copy link
Author

and in that case ?

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