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

App is not opening while running test case in detox after react native 0.68 upgrade #4002

Closed
1 of 2 tasks
CHANDRU-WMH opened this issue Apr 3, 2023 · 11 comments
Closed
1 of 2 tasks

Comments

@CHANDRU-WMH
Copy link

CHANDRU-WMH commented Apr 3, 2023

What happened?

Detox builds and test case runs successfully in ios but in android it is not working getting the below error. While downgrading to react native 0.67 test cases are working in android.

Screenshot 2023-04-03 at 11 38 09 PM

What was the expected behaviour?

No response

Was it tested on latest Detox?

  • I have tested this issue on the latest Detox release and it still reproduces.

Did your test throw out a timeout?

Help us reproduce this issue!

No response

In what environment did this happen?

Detox version:
React Native version:
Has Fabric (React Native's new rendering system) enabled: (yes/no)
Node version:
Device model:
Android version:
Test-runner (select one): jest / other

Detox logs

Detox logs
paste logs here!

Device logs

Device logs
paste your device.log here!

More data, please!

No response

@asafkorem
Copy link
Contributor

Hey @CHANDRU-WMH, thanks for the report. Can you please provide us the device logs and the detox logs from the failing run? Otherwise, it will be very hard to investigate this issue.

@CHANDRU-WMH
Copy link
Author

CHANDRU-WMH commented Apr 4, 2023

@asafkorem Thanks for the reply, attached the logs.
detox.log
emulator-5554 2023-04-04 06-39-41Z.startup.log

@asafkorem
Copy link
Contributor

asafkorem commented Apr 4, 2023

@CHANDRU-WMH Based on the logs, it seems that the crash is caused by a java.lang.NoClassDefFoundError exception, which indicates that the class com.reactnativecommunity.art.ARTPackage could not be found at runtime. This issue might be caused by a missing dependency.

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/reactnativecommunity/art/ARTPackage

Please make sure you installed react-native-community/art correctly.

@asafkorem
Copy link
Contributor

I don't think that this error is caused by Detox in any way. Is it working when running the app regularly?

This might be related to some change on React Native 0.68. If it happens locally, try to clean and rebuild your project.

@CHANDRU-WMH
Copy link
Author

Yea test cases work in android when I downgrade the native version to 0.67, facing this error only on rn 0.68.

@lmasneri
Copy link

lmasneri commented Apr 4, 2023

I am facing same issue on react-native 0.71.4

Working on iOS but not launching on android

@CHANDRU-WMH
Copy link
Author

@lmasneri I upgraded the flipper version in gradle.properties to FLIPPER_VERSION=0.171.1 and the app is launching now.

@lmasneri
Copy link

lmasneri commented Apr 5, 2023

@CHANDRU-WMH I still can not launch the application using detox:

Error: a BeforeAll hook errored, process exiting: e2e/hooks.ts:7: Failed to run application on the device

HINT: Most likely, your main activity has crashed prematurely.

The e2e/hooks.ts:7 is device.launchApp()

@lmasneri
Copy link

lmasneri commented Apr 5, 2023

@CHANDRU-WMH I still can not launch the application using detox:

Error: a BeforeAll hook errored, process exiting: e2e/hooks.ts:7: Failed to run application on the device

HINT: Most likely, your main activity has crashed prematurely.

The e2e/hooks.ts:7 is device.launchApp()

Working with adb reverse tcp:8081 tcp:8081

@stale
Copy link

stale bot commented May 8, 2023

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.

@stale stale bot added the 🏚 stale label May 8, 2023
@stale
Copy link

stale bot commented May 20, 2023

The issue has been closed for inactivity.

@stale stale bot closed this as completed May 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants