react-native-vision-camera icon indicating copy to clipboard operation
react-native-vision-camera copied to clipboard

🐛 ReanimatedError: Property '__scanFaces' doesn't exist, js engine: reanimated

Open michelorth opened this issue 3 years ago • 10 comments

What's happening?

When activating the camera using

frameProcessor={frameProcessor}

Gives the following error: ReanimatedError: Property '__scanFaces' doesn't exist, js engine: reanimated

if I remove the frameProcessor it works

My dependencies are:

"react-native-worklets-core": "^0.2.2", "vision-camera-face-detector": "^0.1.8", "react-native-vision-camera": "^2.16.2", "react-native-reanimated": "^3.5.3",

My babel.config

module.exports = { presets: ['module:metro-react-native-babel-preset'], plugins: [ ['react-native-worklets-core/plugin'], [ 'react-native-reanimated/plugin', { globals: ['__scanFaces'], }, ], ], };

Reproduceable Code

const frameProcessor = useFrameProcessor((frame) => {
    'worklet';
    const scannedFaces = scanFaces(frame);
    runOnJS(setFaces)(scannedFaces);
  }, []);

<Camera
        ref={camera}
        style={StyleSheet.absoluteFill}
        onInitialized={onInitialized}
        frameProcessor={frameProcessor}
        frameProcessorFps={5}
        takePhoto={() => takePhoto(props.isConnectedInternet)}
        id="camera"
        preset="medium"
        device={device}
        isActive={isActive}
        enableZoomGesture={false}
        orientation="portrait"
        photo
        zoom={0}
      />

Relevant log output

ReanimatedError: Property '__scanFaces' doesn't exist, js engine: reanimated

Camera Device

{
  "minZoom": 1,
  "isMultiCam": false,
  "supportsLowLightBoost": false,
  "supportsDepthCapture": false,
  "neutralZoom": 1,
  "supportsRawCapture": false,
  "supportsFocus": false,
  "position": "front",
  "devices": [
    "wide-angle-camera"
  ],
  "hasTorch": false,
  "supportsParallelVideoProcessing": true,
  "hasFlash": true,
  "name": "Front Camera",
  "id": "com.apple.avfoundation.avcapturedevice.built-in_video:1",
  "maxZoom": 189
}

Device

Iphone 12 - 17.0.3

VisionCamera Version

2.16.2

Can you reproduce this issue in the VisionCamera Example app?

I didn't try (⚠️ your issue might get ignored & closed if you don't try this)

Additional information

michelorth avatar Oct 09 '23 22:10 michelorth

I get a similar issue after updating to v2.16.2 when trying to use vision-camera-code-scanner for qr code scanning. The error I get is __scancodes does not exist. Only occurs on iOS

I've tried updating to v3 and using Frame Processors there, but looks like the minimum API version for android is 29 when using frame processors which unfortunately too much of a leap for my project

(regarding my particular issue; I know rn camera vision v3 now comes shipped with qr scanning, but there is this android lagging issue which is why I tried to continue using frame processors and ran into the above issue)

sacha-c avatar Oct 10 '23 13:10 sacha-c

RN Face Detector also need a update, any alternative?

ronix1020 avatar Oct 10 '23 13:10 ronix1020

I have same issues, It works on previous versions but not on "react-native-vision-camera": "2.16.2"

nhatnguyen95 avatar Oct 11 '23 07:10 nhatnguyen95

It's looks' with updated react-native-reanimated globals in plugin not works anymore. Same issue for __scanOCR https://github.com/aarongrider/vision-camera-ocr

Can't update to V3 because no working OCR plugin for v3

Spikus avatar Oct 11 '23 12:10 Spikus

Same issue here, ReanimatedError: Property '__scanCodes' doesn't exist, js engine: reanimated, on iOS, after updating vision-camera to "2.16.2" and reanimated to "3.5.4".

It was working fine with vision-camera "2.15.4" and reanimated "2.14.4"... I had to upgrade because of the #1840

CaioQuirinoMedeiros avatar Oct 11 '23 15:10 CaioQuirinoMedeiros

It's looks' with updated react-native-reanimated globals in plugin not works anymore. Same issue for __scanOCR https://github.com/aarongrider/vision-camera-ocr

Can't update to V3 because no working OCR plugin for v3

https://github.com/mrousavy/react-native-vision-camera/issues/1987

When I introduced these plugins, I encountered an error when compiling the camera version 3.3.0

suwu150 avatar Oct 12 '23 14:10 suwu150

same.

"react-native": "0.71.14",
 "react-native-reanimated": "^3.5.4",
 "react-native-vision-camera": "^2.16.2",

Simoon-F avatar Oct 13 '23 06:10 Simoon-F

To test dependency on Xcode15 I've downgraded my Xcode to 14.3.1 (latest 14) and check app with following versions:

This version has no issue: "react-native-reanimated": "3.5.4", "react-native-vision-camera": "2.16.1" and "react-native-vision-camera": "2.16.0",

This version has issue using both Xcode14 and 15. "react-native-reanimated": "3.5.4", "react-native-vision-camera": "2.16.2"

sommcz avatar Oct 13 '23 09:10 sommcz

So this is happening because the face-detector hasn't upgraded to V3 yet. Wait for the plugin from Aaron to upgrade to V3, then try again - there is a PR with that.

Not a VisionCamera issue

mrousavy avatar Oct 16 '23 14:10 mrousavy

any solution for this?.This issue still exist

abdulRafay2003 avatar Jan 17 '24 15:01 abdulRafay2003