Prerequisites
Reproduction
#4206 (existing harness test in visioncamera.frame.harness.ts, 'reports native buffers and conditionally reads pixel buffers')
Steps to reproduce
- Build the example app and run the frame tests on a Galaxy A14: bun run test:harness:android -- --testPathPatterns=frame
- Watch the test named "reports native buffers and conditionally reads pixel buffers". It fails.
- Or in app: create a frame output with pixelFormat 'native'. In the frame callback frame.hasPixelBuffer says true, then frame.getPixelBuffer() throws.
What did you expect to happen?
If hasPixelBuffer is true, getPixelBuffer() returns a buffer. If the native buffer has no readable pixel layout, hasPixelBuffer is false and the caller uses getNativeBuffer().
What actually happened?
The HAL delivers PRIVATE images backed by a HardwareBuffer with format 0x22 (IMPLEMENTATION_DEFINED), usage 0x20133 (includes USAGE_CPU_READ_OFTEN), 0 planes. ImageProxy.hasPixelBuffer only checks the CPU-read usage bits and returns true. getPixelBuffer() takes the ArrayBuffer.wrap(hardwareBuffer) fast path and Nitro throws because an implementation-defined format has no bytes-per-pixel.
So I found this by running the full harness suite on a Galaxy A14 (SM-A145F, Android 15).
Fix in #4206: and it require a format with a fixed pixel layout as well as the usage bits, frame suite 15/15 on the A14 with it.
Affected platforms
Android (device)
Device(s) affected
Samsung Galaxy A14 (SM-A145F), Android 15, security patch 2026-05-05
VisionCamera version
5.2.3 (main at 91bae1f)
React Native version
0.85.3
React Native architecture
New Architecture (Fabric / bridgeless)
Features being used
Relevant logs / stack trace
Frame.getPixelBuffer(...): Cannot get bytes per pixel: Unknown HardwareBuffer format!
Additional context
No response
Submission
Prerequisites
Reproduction
#4206 (existing harness test in visioncamera.frame.harness.ts, 'reports native buffers and conditionally reads pixel buffers')
Steps to reproduce
What did you expect to happen?
If
hasPixelBufferis true,getPixelBuffer()returns a buffer. If the native buffer has no readable pixel layout,hasPixelBufferis false and the caller usesgetNativeBuffer().What actually happened?
The HAL delivers PRIVATE images backed by a HardwareBuffer with format 0x22 (IMPLEMENTATION_DEFINED), usage 0x20133 (includes USAGE_CPU_READ_OFTEN), 0 planes.
ImageProxy.hasPixelBufferonly checks the CPU-read usage bits and returns true.getPixelBuffer()takes theArrayBuffer.wrap(hardwareBuffer)fast path and Nitro throws because an implementation-defined format has no bytes-per-pixel.So I found this by running the full harness suite on a Galaxy A14 (SM-A145F, Android 15).
Fix in #4206: and it require a format with a fixed pixel layout as well as the usage bits, frame suite 15/15 on the A14 with it.
Affected platforms
Android (device)
Device(s) affected
Samsung Galaxy A14 (SM-A145F), Android 15, security patch 2026-05-05
VisionCamera version
5.2.3 (main at 91bae1f)
React Native version
0.85.3
React Native architecture
New Architecture (Fabric / bridgeless)
Features being used
Relevant logs / stack trace
Frame.getPixelBuffer(...): Cannot get bytes per pixel: Unknown HardwareBuffer format!Additional context
No response
Submission