Prerequisites
Reproduction
margelo/nitro#1671 (fix in Nitro). Existing harness test in visioncamera.camera-view.harness.tsx, 'reconfigures when the Camera device position prop changes'
Steps to reproduce
- Build the example app and run the camera-view tests on an Android phone: bun run test:harness:android -- --testPathPatterns=camera-view
- Watch the test named "reconfigures when the Camera device position prop changes". It fails.
- Or in app: show , then show it again as with onPreviewStarted left out. It throws instead of switching camera.
What did you expect to happen?
Dropping an optional callback prop on a rerender is allowed and the view just stops calling it.
What actually happened?
The rerender drops onPreviewStarted, React Native passes it as null, and Nitro's ReactProp::fromRawValue calls asObject() on it before JSIConverter<std::optional> can treat it as absent. The throw from cloneNodeWithNewProps is caught by the ErrorBoundary and the rerender never completes.
Fix in Nitro: margelo/nitro PR #1671. With it the test passes on the A14.
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
[Error: Exception in HostFunction: PreviewView.onPreviewStarted: Value is null, expected an Object
Rerender timeout: Element did not update within 1000ms
Additional context
No response
Submission
Prerequisites
Reproduction
margelo/nitro#1671 (fix in Nitro). Existing harness test in visioncamera.camera-view.harness.tsx, 'reconfigures when the Camera device position prop changes'
Steps to reproduce
What did you expect to happen?
Dropping an optional callback prop on a rerender is allowed and the view just stops calling it.
What actually happened?
The rerender drops
onPreviewStarted, React Native passes it asnull, and Nitro'sReactProp::fromRawValuecallsasObject()on it beforeJSIConverter<std::optional>can treat it as absent. The throw fromcloneNodeWithNewPropsis caught by the ErrorBoundary and the rerender never completes.Fix in Nitro: margelo/nitro PR #1671. With it the test passes on the A14.
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
[Error: Exception in HostFunction: PreviewView.onPreviewStarted: Value is null, expected an Object Rerender timeout: Element did not update within 1000msAdditional context
No response
Submission