Android Fastlane fails while running on emulators

#1

Bitrise Build Issue Report template

Description of the issue

I’m trying to configure fastlane for Android.
Have configured the workflow as follows:

Git clone -> Launch AVD Manager -> Generate Gradle wrapper -> Install missing Android SDK components -> Android build for UI testing -> Added script to run ./gradlew assembleDebug assembleAndroidTest -> Fastlane step

The build gets failed at Fastlane step at this point:
/opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell echo $EXTERNAL_STORAGE

I tried to reconfigure in multiple ways based on your forums and other references, but in any way, it fails at this point. Really need your help to pass through this step as this is blocking our builds.
Also, tried to run this step manually as a script, still didn’t proceed further.

Environment:

Android

If on Bitrise.io: which stack? If not on Bitrise.io: on what operating system? (Plus any other information you can share)
Default ( Android & Docker, on Ubuntu 16.04)

Which build Step causes the issue and which version of the step?
Fastlane 2.4.0

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : Rebuild tried several times, didn’t work
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : YES/NO
  • Does the issue happen sporadically, or every time? : Every time
  • Does upgrading the build Step to the latest version help? : Using the latest version
  • When did the issue start? : From the time of adding fastlane step into workflow and starting emulators

Local reproduction

Can it be reproduced on your own Mac/PC by following our local debug guide? Please follow at least the first section (“Testing with a full clean git clone”) to make sure to test the state of the code what bitrise.io will get when it does a git clone in the clean environment! If possible please note which sections you tried.

– Locally fastlane works very well… just the bundle exec fastlane works everything fine.

Local reproduction: Linux / Android (docker based) stack builds

Can it be reproduced by running the build locally, after doing a new git clone of the repository into the /tmp directory and running the build from there with the Bitrise CLI ( https://www.bitrise.io/cli )? If no, can it be reproduced with Docker (using the same docker images / environment we use on bitrise.io)? Related guide: http://devcenter.bitrise.io/docker/run-your-build-locally-in-docker/ .

Build log

Please copy paste the build’s bitrise.io URL here (or if the issue happens somewhere else then the full logs), or if you can’t share the url / log here then send the url or full log through a private channel (e.g. email - https://www.bitrise.io/contact ), with a link to the related Discuss issue.

FYR:



https://app.bitrise.io/build/3010ddf52e81967f (Added that command as separate script)

0 Likes

#2

Latest build:

0 Likes

#3

emulators that got started in the initial step were turning offline when fastlane needed.

0 Likes

#4

Cache pull/push disabled; tried with single emulator. still it stucks at the same step:

0 Likes

#5

Tried this as well:

  • adb kill-server

  • adb start-server

  • daemon not running; starting now at tcp:5037

  • daemon started successfully

  • adb devices

List of devices attached

emulator-5554 offline

  • adb -s emulator-5554 shell echo ‘$EXTERNAL_STORAGE’

error: device offline

0 Likes