Failing tests (FrameBuffer.cpp: Failed to find ColorBuffer)
I'm trying to get our instrumentation tests running using this action. So far it looks like the emulator is starting up correctly, but when the tests start, they all fail.
The tests do pass on my local computer, when running the emulator in headless mode.
Action console output
[...]
Starting 121 tests on Nexus_9_API_29(AVD) - 10
E1212 20:55:45.356540 c752000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:40
E1212 20:55:45.364145 c752000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:43
E1212 20:55:45.364194 c752000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:42
sequoia.gui.test.app.HomeScreenMessageTest > testReplaceDaysAway[Nexus_9_API_29(AVD) - 10] FAILED
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object androidx.test.uiautomator.OurUiObject2.clickAndWait(androidx.test.uiautomator.EventCondition, long)' on a null object reference
at sequoia.gui.test.common.Navigation.goToHome(Navigation.java:48)
E1212 20:55:52.827230 c752000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:70
sequoia.gui.test.app.HomeScreenMessageTest > testReplaceDaysAway2[Nexus_9_API_29(AVD) - 10] FAILED
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object androidx.test.uiautomator.OurUiObject2.clickAndWait(androidx.test.uiautomator.EventCondition, long)' on a null object reference
at sequoia.gui.test.common.Navigation.goToHome(Navigation.java:48)
sequoia.gui.test.app.HomeScreenMessageTest > testReplaceDaysAway3[Nexus_9_API_29(AVD) - 10] FAILED
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object androidx.test.uiautomator.OurUiObject2.clickAndWait(androidx.test.uiautomator.EventCondition, long)' on a null object reference
at sequoia.gui.test.common.Navigation.goToHome(Navigation.java:48)
[...]
Action
jobs:
test:
runs-on: macos-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: Use a specific version of Java
uses: actions/setup-java@v2
with:
distribution: 'microsoft'
java-version: '11.0.13'
- name: Install Python & requirements
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip' # caching pip dependencies
- run: pip install -r build/Common/CSV_Parser/requirements.txt
- name: Run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
working-directory: ./source/Project/GUI/
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -camera-front none -selinux permissive
disable-animations: true
arch: x86_64
target: default
sdcard-path-or-size: 1024M
avd-name: Nexus_9_API_29
profile: Nexus 9
script: ./gradlew connectedCheck --no-daemon --stacktrace
Local emulator command
emulator -avd API_33 -noaudio -no-boot-anim -camera-back none -camera-front none -selinux permissive -feature -Vulkan -no-window -gpu off
I do realize that since there are so many moving pieces, this may not be a problem with your runner, but I figured it was worth asking.
Same's happening to me. Tests run fine locally but not on the CI.
Job log:
Run reactivecircus/android-emulator-runner@v2
Configure emulator
Install Android SDK
Launch Emulator
/bin/sh -c npx detox test -c android.emu.debug
[1] <removed URL> B jest --config e2e/jest.config.js
15:42:32.868 detox[10928] i starter.test.js is assigned to emulator-5554 (Pixel_7_API_30)
E1217 15:42:[41] <removed URL> Failed to find ColorBuffer:44
E1217 15:42:41.474882 3937000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:17
E1217 15:42:41.474890 3937000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:20
E1217 15:42:41.474897 3937000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:19
E1217 15:42:41.47[49]<removed URL> Failed to find ColorBuffer:46
E1217 15:42:41.474921 3937000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:44
E1217 15:42:41.474927 3937000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:46
E1217 15:42:41.474935 3937000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:17
E1217 15:42:41.474940 3937000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:20
E1217 15:42:41.474945 3937000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:19
E1217 15:42:41.474951 3937000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:17
E1217 15:42:41.474956 3937000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:20
E1217 15:42:41.474961 3937000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:44
E1217 15:42:41.474966 3937000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:19
E1217 15:42:41.474971 3937000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:17
E1217 15:42:41.474975 3937000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:48
WARNING | /etc/localtime does not point to zoneinfo-compatible timezone name
15:42:52.956 detox[10928] i <removed test name> Test 1
E1217 15:43:08.546487 3937000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:69
E1217 15:43:08.546545 3937000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:74
E1217 15:43:08.546552 3937000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:67
E1217 15:43:08.546559 3937000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:78
E1217 15:43:08.546564 3937000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:70
E1217 15:43:08.546569 3937000 FrameBuffer.cpp:3765] Failed to find ColorBuffer:69
15:43:12.575 detox[10928] i <removed test name> Test 1 [FAIL]
15:43:12.576 detox[10928] i <removed test name> 2
15:43:20.[297]<removed URL >i Test 2 [FAIL]
FAIL e2e/starter.test.js (59.414 s)
<removed title> Title
✕ <removed test name> Test 1(19619 ms)
✕ <removed test name Test 2> (7721 ms)
Workflow YML:
run-e2e-tests:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install Java
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: "adopt"
- name: Cache Detox build
id: cache-detox-build
uses: actions/cache@v3
with:
path: android/app/build
key: ${{ runner.os }}-detox-build
restore-keys: |
${{ runner.os }}-detox-build
- name: Install npm dependencies
run: npm install -force
- name: Bundle app
run: |
mkdir -p android/app/src/main/assets/
npx react-native bundle --verbose --platform android --dev true --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle
- name: Detox build
run: npm run detox-build
- name: Get device name
id: device
run: node -e "console.log('AVD_NAME=' + require('./.detoxrc').devices.emulator.device.avdName)" >> $GITHUB_OUTPUT
- name: Detox test
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 30
arch: x86_64
avd-name: ${{ steps.device.outputs.AVD_NAME }}
script: npx detox test -c android.emu.debug
- name: Upload artifacts
if: failure()
uses: actions/upload-artifact@v3
with:
name: detox-artifacts
path: artifacts
Same for me
a18f000 FrameBuffer.cpp:3765] Failed to find ColorBuffer using the latest reactivecircus/[email protected]
FWIW, we see these logs in our CI runs but they don't seem to be the source of test failures, with that typically being unrelated (e.g., tests not being written to work with smaller screen sizes, while our local devices/emulators have large screens).
Any updates on this issue? I have the same problem.
I've got this error too, AVD started up and I can see the device frame with gray screen when I hover over the icon on the taskbar but the actual window doesn't show up! Does anyone know the answer for this Issue?
I've got this error too, AVD started up and I can see the device frame with gray screen when I hover over the icon on the taskbar but the actual window doesn't show up! Does anyone know the answer for this Issue?
You can try this solution https://github.com/facebook/react-native/issues/43320. It works for me
I've got this error too, AVD started up and I can see the device frame with gray screen when I hover over the icon on the taskbar but the actual window doesn't show up! Does anyone know the answer for this Issue?
You can try this solution https://github.com/facebook/react-native/issues/43320. It works for me
I have looking for the solution for weeks and finally, this works for me. tqsm!
