Open
Description
Versions
OS: Android 13
React: 18.3.1
React Native: 0.76.1
react-native-camera-kit: 14.0.0
Describe the bug
App crash after capture, Logcat mentions two main errors
getOrCreateModule(): Unable to create module "UIManager" (legacy: false, turbo: true)
and then
java.lang.NullPointerException: null cannot be cast to non-null type com.rncamerakit.CKCamera
at com.rncamerakit.RNCameraKitModule.capture$lambda$0(RNCameraKitModule.kt:70)
on line
val view = uiManager?.resolveView(viewTag) as CKCamera
I believe the main issue is that the UIManager is not created
To Reproduce
const CameraComponent = ({ setImageData, onClose }) => {
const cameraRef = useRef(null);
const handleOnPress = async () => {
if (cameraRef.current !== null) {
const image = await cameraRef.current.capture();
setImageData({
name: image.name,
type: "image/jpg",
uri: image.uri,
});
onClose();
}
};
return (
<>
<Camera style={{ aspectRatio: 3 / 4, width: "100%" }} ref={cameraRef} />
<Icon
onPress={() => onClose()}
name="arrow-back"
color={"white"}
size={80}
/>
<Icon onPress={handleOnPress} name="circle" color={"white"} size={80} />
<Icon name="arrow-back" color={"black"} size={80} />
</>
);
};
Metadata
Metadata
Assignees
Labels
No labels