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

Detox 6.0.0 does not work with react native 0.50.1 #440

Closed
emilcardell opened this issue Nov 28, 2017 · 13 comments
Closed

Detox 6.0.0 does not work with react native 0.50.1 #440

emilcardell opened this issue Nov 28, 2017 · 13 comments

Comments

@emilcardell
Copy link

Description

Running the Detox example jest project.
It builds successfully. Both android and ios.
The tests stops after
: Searching for device matching iPhone 7 Plus...
: Booting device 8EDD9483-869F-45F8-969C-8808905E4353

And then it does nothing until the tests times out.

Steps to Reproduce

Clone Detox project.
Go to the example jest project.
Change package json to use react native 0.50.1
Install packages with yarn.
Run yarn test-ios or android.

@LeoNatan
Copy link
Contributor

Please add logs as requested in the issue template. Also, please follow "Identifying which synchronization mechanism causes us to wait too much" in https://github.com/wix/detox/blob/master/docs/Troubleshooting.Synchronization.md

@LeoNatan
Copy link
Contributor

@emilcardell Any news on the logs?

@emilcardell
Copy link
Author

An update.
Upgrading to 6.0.2 solved the jest example for IOS.
Android is still not working. The logs are not giving me much. I'll try to post them soon.

@emilcardell
Copy link
Author

Going to post as I go along. I've set the sync time to 60000 don't not if that to short.
Console is saying

INSTRUMENTATION_STATUS: numtests=1 INSTRUMENTATION_STATUS: stream= com.demoreactnativejest.DetoxTest: INSTRUMENTATION_STATUS: id=AndroidJUnitRunner INSTRUMENTATION_STATUS: test=runDetoxTests INSTRUMENTATION_STATUS: class=com.demoreactnativejest.DetoxTest INSTRUMENTATION_STATUS: current=1 INSTRUMENTATION_STATUS_CODE: 1 nstrumentation stdout: INSTRUMENTATION_RESULT: shortMsg=Process crashed. INSTRUMENTATION_CODE: 0 nstrumentation stdout: nstrumentationProcess terminated due to receipt of signal null send: {"type":"invoke","params":{"target":{"type":"Class","value":"com.wix.detox.espresso.DetoxAssertion"},"method":"assertMatcher","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"android.support.test.espresso.Espresso"},"method":"onView","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"com.wix.detox.espresso.DetoxMatcher"},"method":"matcherForTestId","args":["welcome"]}}]}},{"type":"Invocation","value":{"target":{"type":"Class","value":"com.wix.detox.espresso.DetoxMatcher"},"method":"matcherForSufficientlyVisible","args":[]}}]},"messageId":1}
The red screen of death say that the packager is missing. yarn test-android in the project.
I'm trying out some more configurations. More to come.

@sibelius
Copy link

sibelius commented Dec 1, 2017

for android follow this thread #96

there are some part undocumented yet

@emilcardell
Copy link
Author

Just to add some more logs. I rand the example agains the release build.
Needed to set the apk name to unsigned.apk in the end.

: stderr:
Exception occurred while dumping:
java.lang.IllegalArgumentException: Unknown package: com.demoreactnativejest
: stderat com.android.server.pm.Settings.isOrphaned(Settings.java:4134)
: stderat com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:18091)
: stderat com.android.server.pm.PackageManagerService.deletePackage(PackageManagerService.java:15508)
: stderat com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:888)
: stderat com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:792)
: stderat com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:118)
: stderat android.os.ShellCommand.exec(ShellCommand.java:94)
: stderat com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:18349)
: stderat android.os.Binder.shellCommand(Binder.java:468)
: stderat android.os.Binder.onTransact(Binder.java:367)
: stderat android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2387)
: stderat com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3031)
: stderat android.os.Binder.execTransact(Binder.java:565)
: stderr:
: /usr/local/Caskroom/android-sdk/25.2.3/platform-tools/adb -s emulator-5554 uninstall com.demoreactnativejest.test
: stderr:
Exception occurred while dumping:
java.lang.IllegalArgumentException: Unknown package: com.demoreactnativejest.test
: stderat com.android.server.pm.Settings.isOrphaned(Settings.java:4134)
: stderat com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:18091)
: stderat com.android.server.pm.PackageManagerService.deletePackage(PackageManagerService.java:15508)
: stderat com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:888)
: stderat com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:792)
: stderat com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:118)
: stderat android.os.ShellCommand.exec(ShellCommand.java:94)
: stderat com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:18349)
: stderat android.os.Binder.shellCommand(Binder.java:468)
: stderat android.os.Binder.onTransact(Binder.java:367)
: stderat android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2387)
: stderat com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3031)
: stderat android.os.Binder.execTransact(Binder.java:565)
: stderr:
10: /usr/local/Caskroom/android-sdk/25.2.3/platform-tools/adb -s emulator-5554 install -r -g /Users/emil.cardell/rep /detox/examples/demo-react-native-jest/android/app/build/outputs/apk/app-release-unsigned.apk
send: {"type":"invoke","params":{"target":{"type":"Class","value":"com.wix.detox.espresso.DetoxAssertion"},"method":"assertMatcher","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"android.support.test.espresso.Espresso"},"method":"onView","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"com.wix.detox.espresso.DetoxMatcher"},"method":"matcherForTestId","args":["welcome"]}}]}},{"type":"Invocation","value":{"target":{"type":"Class","value":"com.wix.detox.espresso.DetoxMatcher"},"method":"matcherForSufficientlyVisible","args":[]}}]},"messageId":1}

@emilcardell
Copy link
Author

Starting the packager before running the debug version seams to fix the problem.
Still can't get the release to work.

@LeoNatan
Copy link
Contributor

LeoNatan commented Dec 1, 2017

@sibelius Specific Android problems can have their own issues.

Thanks for the logs.

@LeoNatan
Copy link
Contributor

LeoNatan commented Dec 1, 2017

@rotemmiz ^

@grabbou
Copy link

grabbou commented Dec 6, 2017

Also experiencing this. I think it would be great to update all examples to follow latest React Native for compatibility.

Update: I actually had to run detox build and I was able to go past the "Server listening" step. Weird I didn't get any better information.

@rotemmiz
Copy link
Contributor

rotemmiz commented Jan 8, 2018

Just to make some sense in this thread here, was the iOS issue solved ?
Is the Android issue still open ? if so please provide the requested info (the one that's in the issue template) in a new issue.

@stale
Copy link

stale bot commented Mar 7, 2018

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.

@stale stale bot added the 🏚 stale label Mar 7, 2018
@stale stale bot removed the 🏚 stale label Mar 12, 2018
@stale
Copy link

stale bot commented Apr 26, 2018

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.

@stale stale bot added the 🏚 stale label Apr 26, 2018
@wix wix locked and limited conversation to collaborators Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants