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

Add android example / support #2

Open
xcarpentier opened this issue Sep 13, 2017 · 19 comments
Open

Add android example / support #2

xcarpentier opened this issue Sep 13, 2017 · 19 comments

Comments

@xcarpentier
Copy link
Contributor

xcarpentier commented Sep 13, 2017

@brentvatne Add android example / support, please 🐱 ...

@xcarpentier xcarpentier changed the title Add android example Add android example / support Sep 14, 2017
@brentvatne
Copy link
Member

can you try to figure it out? on vacation for 2 weeks. let me know :)

@conblem
Copy link

conblem commented Oct 24, 2017

I have been trying to figure this out, but i'm currently stuck on this error.
Repo

  console.error node_modules\react-native\Libraries\Core\ExceptionsManager.js:73
    Unhandled error

  console.error node_modules\react-native\Libraries\Core\ExceptionsManager.js:73
    Error: spawn adb ENOENT
        at _errnoException (util.js:1021:11)
        at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19)
        at onErrorNT (internal/child_process.js:374:16)
        at _combinedTickCallback (internal/process/next_tick.js:138:11)
        at process._tickCallback (internal/process/next_tick.js:180:9)

To make it, to this error the Expo APK needs to be placed into the root of the project, with the original name and also as a duplicate, with the name Exponent-2.0.0-androidTest.apk.

The APK for Expo can be found on their website.
Exponent-2.0.0.apk

Some help would be appreciated :).

@conblem
Copy link

conblem commented Nov 9, 2017

@brentvatne

@brentvatne
Copy link
Member

@conblem - not familiar with that error, looks like adb isn't in your PATH

@conblem
Copy link

conblem commented Nov 16, 2017

@brentvatne Yeah thats what i thought too but its definitely in my path.

@ararog
Copy link

ararog commented Jan 16, 2018

At first I had only ANDROID_HOME set, but once I've added $ANDROID_HOME/platform-tools to the path I could get rid of this message about adb.

@conblem
Copy link

conblem commented Jan 16, 2018

@ararog will try this out, thanks for the hint 👍

@brentvatne
Copy link
Member

we're investigating this currently, I think it's not so straightforward, cc @esamelson

@esamelson
Copy link

yeah the plan is to PR a few things to detox to make it work better with expo. Currently detox makes a number of assumptions about RN apps that expo doesn't follow, which makes it difficult to integrate as it is. Hopefully we'll get to this soon, so stay tuned 👍

@nykolaslima
Copy link

@esamelson do you have any update on this?
If you have any guide about how to help implementing this, we're starting a expo/react native application but we're worried about how to run e2e tests and Detox looks like a better solution but not supported by expo/android apps.

@esamelson
Copy link

Hi @nykolaslima - no update unfortunately 😞 We have simply not had the time and ability to prioritize this. We'd like to pick this up at some point but it's not on the roadmap at the moment. You'll need to either dig into this yourself or find a different solution for Android for now.

@maitriyogin
Copy link

maitriyogin commented Apr 29, 2019

Hi, I'm trying to get detox running on android with expo sdk 32.
My basic config is such

"android.emu.debug": {
        "binaryPath": "bin/Exponent.apk",
        "type": "android.emulator",
        "name": "Nexus_5X_API_27"
      }

Then to run I :

download latest Exponent.apk from expo using a variant of brents script

#!/bin/bash -e

# query expo.io to find most recent ipaUrl
IPA_URL=`curl https://expo.io/--/api/v2/versions |  python -c 'import sys, json; print json.load(sys.stdin)["androidUrl"]'`

# download tar.gz
TMP_PATH=bin/Exponent.apk
wget -O $TMP_PATH $IPA_URL

expo start
detox test -c android.emu.debug

Emulator starts up but then nothing...
The setup is the same as with-detox-test and the getting started.
All works amazingly on iOS ...

So, just wondering if I'm being totally nieve or if anyone else out there has managed to get expo working with detox on android ...?
or even where I could start to help out?

Many thanks,
Stephen.

@aarshaw
Copy link

aarshaw commented Jun 13, 2019

@maitriyogin were you able to get anything working on Android?

@maitriyogin
Copy link

Nope, looks like the expo team are working on it or at least aware of it..

@maitriyogin
Copy link

any news on this expo masters?
/Stephen

@CorinneKelly
Copy link

@esamelson @brentvatne @conblem (you guys seem to be working on this). Any updates on getting e2e testing on android with expo?

@esamelson
Copy link

Hey there, this is not something we're actively working on at the moment. Apologies if any previous stale activity in this issue was misleading. You're welcome to dig into this yourself, though, and we're definitely open to accepting a high quality PR or set of PRs adding this functionality!

@brentvatne
Copy link
Member

brentvatne commented Jan 9, 2020

indeed, i suggest using the bare workflow if you need to run tests with detox.

@AizenSousuke
Copy link

Anyone got a solution to this issue on Windows?

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