rodgomesc / vision-camera-face-detector

VisionCamera Frame Processor Plugin to detect faces using MLKit Vision Face Detector
MIT License
89 stars 65 forks source link

Android ReferenceError: Property '__scanFaces' doesn't exist, js engine: hermes #5

Closed inpendio closed 2 years ago

inpendio commented 2 years ago

Hi, trying out your lib. and getting the above error. scanFaces is not found in global scope. Several errors pop up: `ReferenceError: Property 'scanFaces' doesn't exist, js engine: hermes Error: Requiring module "node_modules/vision-camera-face-detector/src/index.ts", which threw an exception: ReferenceError: Property '__scanFaces' doesn't exist, js engine: hermes`

Env:

"react": "17.0.2",
"react-native": "0.66.0",
"react-native-vision-camera": "^2.9.3",
"vision-camera-face-detector": "^0.1.8",
"react-native-reanimated": "^2.3.0-beta.2",
// hermes: true

Tested on 2 real devices.

iAmGhost commented 2 years ago

Did you set babel plugin correctly? see guide but you have to add __scanFaces.

rodgomesc commented 2 years ago

closing due inactivity

rahulmishra1991 commented 2 years ago

@iAmGhost I tried the same guide but still getting "Property '_scanFaces' doesn't exist" issue. Can anyone please help me into this?

    "react": "17.0.2",
    "react-native": "0.68.0",
    "react-native-reanimated": "^2.7.0",
    "react-native-vision-camera": "^2.13.2",
    "vision-camera-face-detector": "^0.1.8"
bilalattari commented 2 years ago

__scanFaces

Facing same issue

rizbud commented 2 years ago

try using this in package.json

"vision-camera-face-detector": "rodgomesc/vision-camera-face-detector#master"

then run yarn install or npm install again

references BenHurMartins/react-native-face-detection/package.json

AjayParambath commented 2 years ago

I am also facing the same issue babel.config : image

My import image image

error on metro image

AjayParambath commented 2 years ago

try using this in package.json

"vision-camera-face-detector": "rodgomesc/vision-camera-face-detector#master"

then run yarn install or npm install again

references BenHurMartins/react-native-face-detection/package.json

I tried like you have quoted : package,json file: image

I got this error :

none of the files were detected: image

wilav-dev commented 1 year ago

Same issue, any idea? Already added __scanFaces to babel file

iAmGhost commented 1 year ago

I don't have time for investigating but here's some suggestions:

Dhruv2110 commented 1 year ago

'import 'react-native-reanimated';'....on top of your index file.

enzzoperez commented 1 year ago

try using this in package.json

"vision-camera-face-detector": "rodgomesc/vision-camera-face-detector#master"

then run yarn install or npm install again

references BenHurMartins/react-native-face-detection/package.json

this worked for me I was try to add the reanimated import in my index.js file (didnt work), I could delete that line after installing from github repo