Skip to content

Conversation

@dulmandakh
Copy link
Contributor

Summary

In react-native-community/docker-android@b9ea45f, we bumped Buck to 2020.05.14.01, NDK to 20.1.5948944.

Changelog

[Internal] [Changed] - CI: use react-native-android:2020-6-4 docker image, with Buck 2020.05.14.01 and Android NDK 20.1.5948944

Test Plan

CI must be green

@dulmandakh dulmandakh requested a review from hramos as a code owner June 4, 2020 07:44
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor. labels Jun 4, 2020
@dulmandakh dulmandakh force-pushed the android-docker-2020-6-4 branch from 59ef9a6 to a8f764b Compare June 4, 2020 07:49
@analysis-bot
Copy link

analysis-bot commented Jun 4, 2020

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: abff021

@gengjiawen
Copy link
Contributor

test_android is failing since the avd not start, I am restarting it to see retry result.

@fabOnReact
Copy link
Contributor

fabOnReact commented Jun 8, 2020

The error circle-ci is experiencing now is:

#!/bin/bash -eo pipefail
source scripts/android-setup.sh && waitForAVD
Waiting for Android Virtual Device to finish booting...
Exited with code exit status 1
CircleCI received exit code 1

The emulator starts without issue in the job Launch Android Virtual Device in Background:

#!/bin/bash -eo pipefail
source scripts/android-setup.sh && launchAVD
emulator: WARNING: encryption is off
emulator: ERROR: AdbHostServer.cpp:102: Unable to connect to adb daemon on port: 5037
E0608 01:55:04.623296305     598 socket_utils_common_posix.cc:201] check for SO_REUSEPORT: {"created":"@1591581304.623273827","description":"SO_REUSEPORT unavailable on compiling system","file":"/mnt/tmpfs/src/android/emu-master-dev/external/grpc/src/core/lib/iomgr/socket_utils_common_posix.cc","file_line":169}
Your emulator is out of date, please update by launching Android Studio:
 - Start Android Studio
 - Select menu "Tools > Android > SDK Manager"
 - Click "SDK Tools" tab
 - Check "Android Emulator" checkbox
 - Click "OK"
saving arm snapshot.... !!!
emulator: Saving state on exit with session uptime 948997 ms
Build was canceled

Maybe the issue is connected to waitForAVD ?

function waitForAVD {
echo "Waiting for Android Virtual Device to finish booting..."
local bootanim=""
export PATH=$(dirname $(dirname $(command -v android)))/platform-tools:$PATH
until [[ "$bootanim" =~ "stopped" ]]; do
sleep 5
bootanim=$(adb -e shell getprop init.svc.bootanim 2>&1)
echo "boot animation status=$bootanim"
done
echo "Android Virtual Device is ready."
}

Thanks a lot
I wish you a good day
Fabrizio

@fabOnReact
Copy link
Contributor

fabOnReact commented Jun 8, 2020

I checkout out your branch head 57993a5110 and I run locally

➜  react-native git:(57993a5110) source scripts/android-setup.sh && launchAVD
emulator: WARNING: encryption is off
emulator: INFO: VideoFrameSharer.cpp:76: Initialized handle: videmulator5554
emulator: INFO: WebRtcBridge.cpp:263: Launching: /home/fabrizio/Android/Sdk/emulator/goldfish-webrtc-bridge --daemon --logdir /tmp/android-fabrizio --port 34377 --handle videmulator5554 --turn
emulator: INFO: WebRtcBridge.cpp:273: Launched /home/fabrizio/Android/Sdk/emulator/goldfish-webrtc-bridge --daemon --logdir /tmp/android-fabrizio --port 34377 --handle videmulator5554 --turn  , pid:21958
emulator: WARNING: EmulatorService.cpp:448: Cannot find certfile: /home/fabrizio/.android/emulator-grpc.cer security will be disabled.
E0608 11:23:49.186321122   21941 socket_utils_common_posix.cc:201] check for SO_REUSEPORT: {"created":"@1591608229.186287598","description":"SO_REUSEPORT unavailable on compiling system","file":"/mnt/tmpfs/src/android/emu-master-dev/external/grpc/src/core/lib/iomgr/socket_utils_common_posix.cc","file_line":169}
Started GRPC server at 127.0.0.1:8554

At the same time I run in another session waitForAVD and it works fine

➜  react-native git:(57993a5110) source scripts/android-setup.sh && waitForAVD
Waiting for Android Virtual Device to finish booting...
boot animation status=stopped
Android Virtual Device is ready.

Output without running launchAvd command

➜  react-native git:(57993a5110) ✗ source scripts/android-setup.sh && waitForAVD
Waiting for Android Virtual Device to finish booting...
boot animation status=adb: no emulators found
boot animation status=adb: no emulators found
boot animation status=adb: no emulators found

All this commands are run after createAVD.

@hramos
Copy link
Contributor

hramos commented Sep 25, 2020

I've rebased on top of master. test_android failing at the AVD creation step, it looks like we might need to adjust that:

source scripts/android-setup.sh && launchAVD
emulator: WARNING: encryption is off
emulator: ERROR: AdbHostServer.cpp:102: Unable to connect to adb daemon on port: 5037
E0925 00:22:26.296880951     586 socket_utils_common_posix.cc:201] check for SO_REUSEPORT: {"created":"@1600993346.296870234","description":"SO_REUSEPORT unavailable on compiling system","file":"/mnt/tmpfs/src/android/emu-master-dev/external/grpc/src/core/lib/iomgr/socket_utils_common_posix.cc","file_line":169}
Your emulator is out of date, please update by launching Android Studio:
 - Start Android Studio
 - Select menu "Tools > Android > SDK Manager"
 - Click "SDK Tools" tab
 - Check "Android Emulator" checkbox
 - Click "OK"

https://app.circleci.com/pipelines/github/facebook/react-native/6481/workflows/495a3e4d-ce2b-4604-8a24-d6afa2338339/jobs/169310

@fkgozali
Copy link
Contributor

fkgozali commented Oct 2, 2020

@dulmandakh let's update this per @hramos' comment, then we can merge other pending PRs that are waiting for this.

Also, should we update the image to include NDK v21 based on discussion in #29013?

@dulmandakh
Copy link
Contributor Author

I'll add NDK 21 on top of 20 to facilitate migration, and update this PR very soon. Thanks

fkgozali added a commit to fkgozali/react-native that referenced this pull request Oct 27, 2020
Summary:
Pull Request resolved: facebook#30259

Before side-by-side NDK is supported by the Circle CI image, pending facebook#29050 & facebook#29987, this local.properties file forces Gradle to use the specified SDK/NDK path. We do this internally at FB CI as well.

This addresses the following failure:
https://app.circleci.com/pipelines/github/facebook/react-native/6851/workflows/9fd91d5d-3f05-4521-93fc-95abd5c84227/jobs/173735

Also, this fixed bad src copy for Buck-building: `//packages/react-native-codegen:setup_cli`

Changelog: [Internal]

Reviewed By: hramos

Differential Revision: D24577333

fbshipit-source-id: 93f11c3e3a3f699415739d0760ee10909eb748ed
@dulmandakh dulmandakh closed this Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Contributor A React Native contributor.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants