-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 android examples fail in Linux #1058
Comments
As far as I am aware Detox doesnt officially support Android, and I suspect by reading over some of the code its been primirally developed on a Mac for IOS and expanded out to Android so I'm, unsure if linux is officially supported. I know IOS stuff will never work on Linux but I thought it should be possible with android and I see some people seem to be having success with it, any tricks? I'm happy to take a look at some of the issues / linux + android but some guidance would help alot. |
Related: |
@mmmguitar Small correction, we do support Android, we don't officially support Linux. The Linux support effort has been community-driven, and we are happy to help, but we do not have the resources to maintain Linux or Windows solely by ourselves. |
Just a note for those that google later, I've managed to get Detox working on Android with RN 0.57.4 and React Native Navigation v2 on elementary OS 0.4.1 (thats a debian flavour of linux so should work with ubuntu as well) Aiming to do an update of setup instructions but in the meantime feel free to @mention me. |
Android E2E runs on Linux in CI @LeoNatan |
Actually @noomorph works mostly on Linux when developing for Android |
Guys, I think we might want to check if things really work there. The projects in So, our issue reporters might be right that there's an issue with those example projects. Fixes are ongoing in branch: https://github.com/wix/Detox/tree/noomorph/fix/demo-react-native-jest |
|
Description
I'm trying to run the examples in the Detox git repo on a linux machine and I can't get a single one to work. Obviously the IOS ones arnt going to work given the lack of xcode and the IOS simulator + driver, but I thought the android ones should. Long story short, I'm trying to get an expo app I'm working on to run but failing, trying to simplify by running the examples first.
Steps to Reproduce
The examples are located in the root of the Detox git repository in the /examples directory, the ones I am trying to run are the android ones.
For exmaples/demo-native-android, exmaples/demo-react-native exmaples/demo-react-native-jest:
I've gone through setup the documentation, i.e. setting some global installs for detox and such. I can run an android emulator fine as well.
What went wrong
I just get an error message:
Seems a striaght up detox issue, not sure how to fix / proceed.
First issue: There seems to be no script defined in the package.json to run the tests, I fixed this by copying over a similar line from the demo-react-native-jest to invoke the correct detox configuration.
After tweaking that the app builds, android starts, the app is installed and run but striaght into error.
Second issue: App starts to a red error screen: Unable to load script from asses 'index.android.bundle' Make sure your bundle is packaged correctly or you're running a packager server. CatalystInstaceImpl jniLoadScriptFromAssets.
Seems something to do with how the app is being started and react-native javascripts are being loaded. Again my knowledge of detox here is very small so unsure.
First issue: "pushd command not found"
Seems in the package.json there is a build command that assumes its being run in bash whereas I think on defult linux install its getting run in a default sh of some description. Either way, putting bash -lic 'build command' fixed that. Possible extraction here into a script with an appropriate shebang may help compatibility.
Second issue: The example android app doesnt build / dependency issues
I've tried to fix this but always ends in dependencies issues.
Detox, Node, Device, Xcode and macOS Versions
These are defined in the examples:
These defined on my system:
These are not applicable because I am on Linux:
I'll add this one:
Device and verbose Detox logs
For 2 exmaples/demo-react-native:
emulator: Android qemu version 28.0.16.0 (build_id 5112988) (CL:09d5defb2d25158a7e757ec46512f28e6d9656fd)
I can past the QEMU options list if that is helpful, it should be default / standard. Thelast line of thes logs looks interesting but unsure what the root cause could be.
I'm trying to figure some of these out but new to Android / IOS dev and at a point where I think a little guiding could help alot.
The text was updated successfully, but these errors were encountered: