Open luanamarquesf opened 1 year ago
updating: I added the following lines at android/app/build.gradle file and it seems to work just fine.
androidTestImplementation('com.wix:detox:+') {
Thank you @luanamarquesf. The decision works very well. If anyone uses gradle with kotlin, the code will be like:
androidTestImplementation("com.wix:detox:+") {
exclude(module = "protobuf-lite")
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back.
Thank you for your contributions!
For more information on bots in this repository, read this discussion.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back.
Thank you for your contributions!
For more information on bots in this repository, read this discussion.
What happened?
Hi, it seems that when we have the protobuf dependency within the project, the detox test fails with "Detox can't seem to connect to the test app on android" error message. In my case, it was caused by react-native-firebase-in-app-messaging library, which after I removed from the project, caused the Detox tests successfully run.
I don't know if this is a bug or just an incompatibility issue.
Here it is the device.log from the error execution:
--------- beginning of crash 07-07 15:13:05.541 8089 8089 E AndroidRuntime: FATAL EXCEPTION: main 07-07 15:13:05.541 8089 8089 E AndroidRuntime: Process: , PID: 8089 07-07 15:13:05.541 8089 8089 E AndroidRuntime: java.lang.NoSuchMethodError: No static method registerDefaultInstance(Ljava/lang/Class;Lcom/google/protobuf/GeneratedMessageLite;)V in class Lcom/google/protobuf/GeneratedMessageLite; or its super classes (declaration of 'com.google.protobuf.GeneratedMessageLite' appears in /data/app/~~szcG0vR4DtBwihAdR_lsFA==/br.com..test-2duuHeZ7MvYzK6FgSRZavw==/base.apk) 07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.internal.firebase.inappmessaging.v1.sdkserving.CampaignImpressionList.(CampaignImpressionList.java:491)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.internal.firebase.inappmessaging.v1.sdkserving.CampaignImpressionList.getDefaultInstance(CampaignImpressionList.java:496)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.internal.ImpressionStorageClient.(ImpressionStorageClient.java:38)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.internal.ImpressionStorageClient_Factory.newInstance(ImpressionStorageClient_Factory.java:33)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.internal.ImpressionStorageClient_Factory.get(ImpressionStorageClient_Factory.java:24)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.internal.ImpressionStorageClient_Factory.get(ImpressionStorageClient_Factory.java:7)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.internal.injection.components.DaggerUniversalComponent.impressionStorageClient(DaggerUniversalComponent.java:235)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.internal.injection.components.DaggerAppComponent$com_google_firebase_inappmessaging_internal_injection_components_UniversalComponent_impressionStorageClient.get(DaggerAppComponent.java:386)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.internal.injection.components.DaggerAppComponent$com_google_firebase_inappmessaging_internal_injection_components_UniversalComponent_impressionStorageClient.get(DaggerAppComponent.java:376)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.internal.InAppMessageStreamManager_Factory.get(InAppMessageStreamManager_Factory.java:85)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.internal.InAppMessageStreamManager_Factory.get(InAppMessageStreamManager_Factory.java:12)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.FirebaseInAppMessaging_Factory.get(FirebaseInAppMessaging_Factory.java:56)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.FirebaseInAppMessaging_Factory.get(FirebaseInAppMessaging_Factory.java:14)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.internal.injection.components.DaggerAppComponent.providesFirebaseInAppMessaging(DaggerAppComponent.java:192)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.FirebaseInAppMessagingRegistrar.providesFirebaseInAppMessaging(FirebaseInAppMessagingRegistrar.java:130)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.FirebaseInAppMessagingRegistrar.$r8$lambda$yuRjTv1KXsUvxlnapxQ_8E9rSoY(Unknown Source:0)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.FirebaseInAppMessagingRegistrar$$ExternalSyntheticLambda0.create(Unknown Source:2)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.tracing.ComponentMonitor.lambda$processRegistrar$0(ComponentMonitor.java:38)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.tracing.ComponentMonitor$$ExternalSyntheticLambda0.create(Unknown Source:4)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.components.ComponentRuntime.lambda$discoverComponents$0$com-google-firebase-components-ComponentRuntime(ComponentRuntime.java:140)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.components.ComponentRuntime$$ExternalSyntheticLambda1.get(Unknown Source:4)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.components.Lazy.get(Lazy.java:53)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.components.ComponentContainer$-CC.$default$get(ComponentContainer.java:48)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.components.ComponentRuntime.get(Unknown Source:0)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.components.ComponentContainer$-CC.$default$get(ComponentContainer.java:24)
07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.firebase.components.ComponentRuntime.get(Unknown Source:0)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at com.google.firebase.components.RestrictedComponentContainer.get(RestrictedComponentContainer.java:89)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplayRegistrar.buildFirebaseInAppMessagingUI(FirebaseInAppMessagingDisplayRegistrar.java:61)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplayRegistrar.$r8$lambda$mFT7XCE3YJXhnGdhKohfXnpd5DM(Unknown Source:0)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at com.google.firebase.inappmessaging.display.FirebaseInAppMessagingDisplayRegistrar$$ExternalSyntheticLambda0.create(Unknown Source:2)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at com.google.firebase.tracing.ComponentMonitor.lambda$processRegistrar$0(ComponentMonitor.java:38)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at com.google.firebase.tracing.ComponentMonitor$$ExternalSyntheticLambda0.create(Unknown Source:4)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at com.google.firebase.components.ComponentRuntime.lambda$discoverComponents$0$com-google-firebase-components-ComponentRuntime(ComponentRuntime.java:140)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at com.google.firebase.components.ComponentRuntime$$ExternalSyntheticLambda1.get(Unknown Source:4)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at com.google.firebase.components.Lazy.get(Lazy.java:53)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at com.google.firebase.components.ComponentRuntime.doInitializeEagerComponents(ComponentRuntime.java:302)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at com.google.firebase.components.ComponentRuntime.initializeEagerComponents(ComponentRuntime.java:292)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at com.google.firebase.FirebaseApp.initializeAllApis(FirebaseApp.java:606)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:299)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:263)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:248)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at com.google.firebase.provider.FirebaseInitProvider.onCreate(FirebaseInitProvider.java:69)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:2388)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:2358)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at com.google.firebase.provider.FirebaseInitProvider.attachInfo(FirebaseInitProvider.java:61)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:7239)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:6780)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6697)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at android.app.ActivityThread.access$1300(ActivityThread.java:237)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at android.os.Looper.loop(Looper.java:223)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7656)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
07-07 15:13:05.543 8089 8089 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
07-07 15:13:05.552 8089 8089 I Process : Sending signal. PID: 8089 SIG: 9
What was the expected behaviour?
Connecting "detox" to the application and successfully passing the tests
Was it tested on latest Detox?
Did your test throw out a timeout?
Help us reproduce this issue!
Make a RN project and install @react-native-firebase/in-app-messaging lib. I should lead to the error while testing with the command: detox test --configuration android.emu.debug --record-logs all
In what environment did this happen?
Detox version: "^20.11.0" React Native version: "0.69.9" Has Fabric (React Native's new rendering system) enabled: N Test-runner (select one): jest
Detox logs
Detox logs
``` --------- beginning of crash 07-07 15:13:05.541 8089 8089 E AndroidRuntime: FATAL EXCEPTION: main 07-07 15:13:05.541 8089 8089 E AndroidRuntime: Process: , PID: 8089 07-07 15:13:05.541 8089 8089 E AndroidRuntime: java.lang.NoSuchMethodError: No static method registerDefaultInstance(Ljava/lang/Class;Lcom/google/protobuf/GeneratedMessageLite;)V in class Lcom/google/protobuf/GeneratedMessageLite; or its super classes (declaration of 'com.google.protobuf.GeneratedMessageLite' appears in /data/app/~~szcG0vR4DtBwihAdR_lsFA==/br.com..test-2duuHeZ7MvYzK6FgSRZavw==/base.apk) 07-07 15:13:05.541 8089 8089 E AndroidRuntime: at com.google.internal.firebase.inappmessaging.v1.sdkserving.CampaignImpressionList.Device logs
Device logs
``` paste your device.log here! ```More data, please!
No response