-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
🐛 bugSomething isn't workingSomething isn't working
Description
What's happening?
Reproduceable Code
import {Camera, useCameraDevice, useCameraPermission, useSkiaFrameProcessor} from 'react-native-vision-camera';
import { Skia } from '@shopify/react-native-skia';
import {View} from "react-native";
export default function Test(){
const device = useCameraDevice('front')
const { hasPermission, requestPermission } = useCameraPermission()
requestPermission()
const frameProcessor = useSkiaFrameProcessor((frame) => {
"worklet"
frame.render()
// 你也可以在其上继续绘制
const paint = Skia.Paint()
paint.setColor(Skia.Color('#ff0000'))
const rect = Skia.XYWHRect(frame.width * 0.25, frame.height * 0.25, 120, 80)
frame.drawRect(rect, paint)
}, [])
console.log("device",device)
if (device == null) return (<View></View>)
return (
<Camera
style={{width: "100%", height: "100%"}}
device={device}
isActive={true}
frameProcessor={frameProcessor}
/>
);
}Relevant log output
ERROR Error: Requiring unknown module "2850". If you are sure the module exists, try restarting Metro. You may also want to run `yarn` or `npm install`., js engine: hermes
ERROR Error: Requiring unknown module "2850". If you are sure the module exists, try restarting Metro. You may also want to run `yarn` or `npm install`., js engine: hermes
ERROR Warning: TypeError: Cannot convert undefined value to object
This error is located at:
Call Stack
ScreenContentWrapper (<anonymous>)
RNSScreenStack (<anonymous>)
RNCSafeAreaProvider (<anonymous>)
App (<anonymous>)
ErrorOverlay (<anonymous>)Camera Device
{"formats": [{"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 1944, "photoWidth": 2592, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 1080, "photoWidth": 1920, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 1200, "photoWidth": 1600, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 720, "photoWidth": 1280, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 640, "photoWidth": 640, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 480, "photoWidth": 640, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 288, "photoWidth": 352, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 240, "photoWidth": 320, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 720, "videoStabilizationModes": [Array], "videoWidth": 1280}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 1944, "photoWidth": 2592, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 1080, "photoWidth": 1920, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 1200, "photoWidth": 1600, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 720, "photoWidth": 1280, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 640, "photoWidth": 640, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 480, "photoWidth": 640, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 288, "photoWidth": 352, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 240, "photoWidth": 320, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 720}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 1944, "photoWidth": 2592, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 1080, "photoWidth": 1920, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 1200, "photoWidth": 1600, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 720, "photoWidth": 1280, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 640, "photoWidth": 640, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 480, "photoWidth": 640, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 288, "photoWidth": 352, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}, {"autoFocusSystem": "contrast-detection", "fieldOfView": 74.16322521852192, "maxFps": 30, "maxISO": 3200, "minFps": 6, "minISO": 0, "photoHeight": 240, "photoWidth": 320, "supportsDepthCapture": false, "supportsPhotoHdr": false, "supportsVideoHdr": false, "videoHeight": 480, "videoStabilizationModes": [Array], "videoWidth": 640}], "hardwareLevel": "limited", "hasFlash": false, "hasTorch": false, "id": "1", "isMultiCam": false, "maxExposure": 32, "maxZoom": 1, "minExposure": -32, "minFocusDistance": 100, "minZoom": 1, "name": "1 (FRONT) androidx.camera.camera2", "neutralZoom": 1, "physicalDevices": ["wide-angle-camera"], "position": "front", "sensorOrientation": "portrait", "supportsFocus": true, "supportsLowLightBoost": false, "supportsRawCapture": false}Device
Android13
VisionCamera Version
4.7.2
Can you reproduce this issue in the VisionCamera Example app?
I didn't try (
Additional information
- I am using Expo
- I have enabled Frame Processors (react-native-worklets-core)
- I have read the Troubleshooting Guide
- I agree to follow this project's Code of Conduct
- I searched for similar issues in this repository and found none.
Metadata
Metadata
Assignees
Labels
🐛 bugSomething isn't workingSomething isn't working