luicfrr / react-native-vision-camera-face-detector

Vision Camera Frame Processor Plugin to detect faces using MLKit Face Detector
https://www.npmjs.com/package/react-native-vision-camera-face-detector
MIT License
77 stars 15 forks source link

camera mount error [unknown/unknown: [unknown/unknown] Compiling JS failed: 1:1:invalid empty parentheses '( )' Buffer size 3 starts with: 280a29] #16

Closed tarikdev1 closed 4 months ago

tarikdev1 commented 4 months ago

Describe the bug when i try this example https://github.com/nonam4/react-native-vision-camera-face-detector/blob/main/example/src/index.tsx

Env :

###  platform :ANDROID, 

 buildToolsVersion = "34.0.0"
        minSdkVersion = 26
        compileSdkVersion = 34
        targetSdkVersion = 33
        kotlinVersion = '1.8.0'
        ndkVersion = "23.1.7779620"

### React native 
- "react-native-vision-camera": "3.9.0",
- "react-native-vision-camera-face-detector": "1.3.5",
- "react-native": "0.72.3",
-  "react-native-reanimated": "^3.4.2",
- "react-native-worklets-core": "0.3.0",

### Babel config

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

any help please;

luicfrr commented 4 months ago

Please try to update both react-native and reanimated versions to minimum listed on package's readme, clear your app cache then see if this error keep happening.

tarikdev1 commented 4 months ago

thanks it work fine after the upgrade 👍

is there a way to take photo and record a 10 second video while the face is detected ? thanks for help

luicfrr commented 4 months ago

You should read vision camera documentation