Closed xts-bit closed 1 year ago
same issue
Same problem for a week :( Did you manage to solve the problem @syblus446 ?
@GaylordP import 'react-native-reanimated' to the top of the file when using useFrameProcessor. Fixed my issue
Thank you for your answer, the error is still there for me after this addition :/
For me this also does not fix the error.
Related issue in react-native-reanimated: https://github.com/software-mansion/react-native-reanimated/pull/3853
I have the same situation. Is there another version which does not have this bug? I've tested this library 2 weeks ago but didn't have this issue. My mistake removing that test project :(
I mean, maybe is something with react-native-reanimated
latest version (3.0.2) released 3 days ago...
From our investigation, useFrameProcessor
hook uses _setGlobalConsole
global method from react-native-reanimated
library, but it was removed in the latest version (3.0.2) of react-native-reanimated
.
using react-native-reanimated version 2.14.4 fixed my issue
@mrousavy I have the same situation,and I got a location on the relevant file:node_modules\react-native-vision-camera\src\hooks\useFrameProcessor.ts
but when I comment out this line of code,the program will throw an error and crashes
I don't know how to solve it
using react-native-reanimated version 2.14.4 fixed my issue
Thanks, @syblus446 - I can confirm that it is working with react-native-reanimated@2.14.4
.
I'm trying to downgrade using react-native-reanimated@2.14.4
but my app crashes
Btw i use:
"react-native": "0.71.4",
"react": "18.2.0",
I'm trying to downgrade using
react-native-reanimated@2.14.4
but my app crashesBtw i use:
"react-native": "0.71.4", "react": "18.2.0",
Try running react-native start --reset-cache
and clean other cache on android/ios folders. I use the following settings, consider a downgrade to this:
"react": "18.1.0",
"react-native": "0.70.6",
I'm trying to downgrade using
react-native-reanimated@2.14.4
but my app crashes Btw i use:"react-native": "0.71.4", "react": "18.2.0",
Try running
react-native start --reset-cache
and clean other cache on android/ios folders. I use the following settings, consider a downgrade to this:"react": "18.1.0", "react-native": "0.70.6",
I have a lot of error after trying to downgrade react & react native like your suggestion
I'm trying to downgrade using
react-native-reanimated@2.14.4
but my app crashes Btw i use:"react-native": "0.71.4", "react": "18.2.0",
Try running
react-native start --reset-cache
and clean other cache on android/ios folders. I use the following settings, consider a downgrade to this:"react": "18.1.0", "react-native": "0.70.6",
I have a lot of error after trying to downgrade react & react native like your suggestion
Ugh. Sorry. Did you clean your cache? Try this:
watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* &&
rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean --force &&
npm install && npm start -- --reset-cache
using react-native-reanimated version 2.14.4 fixed my issue
Thanks, @syblus446 - I can confirm that it is working with
react-native-reanimated@2.14.4
.
It's work for me after 'npx react-native start --reset-cache'
"react": "17.0.2",
"react-native": "0.68.2",
"react-native-reanimated": "2.14.4",
"react-native-vision-camera": "2.15.4",
"vision-camera-code-scanner": "0.2.0"
Thanks a lot. Everything ok.
This issue still persists. I am using reanimated v3.0.2 . It appears that reanimated team has removed _setGlobalConsole. https://github.com/software-mansion/react-native-reanimated/pull/3853/files
@mrousavy I have the same situation,and I got a location on the relevant file:
node_modules\react-native-vision-camera\src\hooks\useFrameProcessor.ts
but when I comment out this line of code,the program will throw an error and crashes I don't know how to solve it
Apparently they (reanimated) changed _setGlobalConsole to global.console. I've assigned console reference to global.console: And get the same error as you.
https://github.com/mrousavy/react-native-vision-camera/issues/1210#issuecomment-1457776475
vision-camera V2 only works with reanimated v2. On vision-camera v3 it will not use reanimated anymore and the incompatibility will be resolved. So until the release we should use reanimated v2
I was also facing this issue but it resolved with below step:
step1: I downgraded "react-native-reanimated": "^3.1.0" to "react-native-reanimated": "2.14.4".
step2: Added import 'react-native-reanimated'
in index.js which is our entry file.
step3: yarn start --reset-cache
After above step run your project. It should run without any issue.
My packages details:
"react": "18.2.0",
"react-native": "0.71.3",
"react-native-reanimated": "2.14.4",
"react-native-vision-camera": "2.15.4",
"vision-camera-code-scanner": "0.2.0"
Thanks, that worked for me with "react": "17.0.2", "react-native": "0.68.0", but I noticed a significant bug in react-native-vision-camera of > 2.13.0 version. If I go to the next screen which uses Camera component from react-native-vision-camera, the component displays a part of previous screen for a second (when it is mounting as far as I understand). Same when that next screen goes out of focus. With react-native-vision-camera 2.13.0 nothing of that kind was observed. Any ideas how to workaround it?
And can't build with react-native-animated version you mentioned and react-native-vision-camera >= 2.15.0. Maybe you know react-native-reanimated version that is compatible with react-native-vision-camera 2.13.0. Thank you in advance!
trying to downgrade reanimated gives me this error:
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
When I set the version of reanimated to 2.14.4, I get the issue
eerror Failed to install the app. Command failed with exit code 1: gradlew.bat tasks FAILURE: Build failed with an exception. * Where: Build file 'C:\Users\maste\Documents\GitHub\SplitTheTank\node_modules\react-native-reanimated\android\build.gradle' line: 292 * What went wrong: A problem occurred evaluating project ':react-native-reanimated'. > Could not get unknown property 'minor' for project ':react-native-reanimated' of type org.gradle.api.Project
2.17.0 seems to build further:
Execution failed for task ':react-native-vision-camera:extractJNIFiles'. > Cannot expand ZIP 'C:\Users\maste\Documents\GitHub\SplitTheTank\node_modules\react-native-reanimated\android\react-native-reanimated-72-hermes.aar
To fix this, I removed node_modules/react-native-reanimated
and ran yarn
again to reinstall the package.
Now I get error: index.js: Cannot find module 'react-native-reanimated/plugin'
Then I did yarn add react-native-reanimated@2.17.0
THen I got the same build errors.
Execution failed for task ':react-native-vision-camera:extractJNIFiles'.
Cannot expand ZIP 'C:\Users\maste\Documents\GitHub\SplitTheTank\node_modules\react-native-reanimated\android\react-native-reanimated-72-hermes.aar' as it does not exist.
I have the same situation in my application
lib versions
"expo": "~49.0.5",
"react": "18.2.0",
"react-native": "0.72.3",
"vision-camera-code-scanner": "^0.2.0",
"react-native-vision-camera": "^2.15.4",
"react-native-reanimated": "^2.17.0"
i remove this part
add this
upgrade gradle.properties to
these were the things i did and i got the same error, in case anyone knows how to fix
On react native v0.72, the downgrade to 2.14.4, is not working. :( For a quick fix, I have made a change in node_module react -native-vision-camera the below changes.
_setGlobalConsole(console);
react-native start --reset-cache
Its just a quick fix. Everytime run yarn command, it will be replaced. For persistant change, please apply patch-package
https://www.npmjs.com/package/patch-package
If I install the patch-package, I make the change inside the library installed in my application, I run the command npx patch-package react-native-vision-camera? @umusicanumothu
On react native v0.72, the downgrade to 2.14.4, is not working. :( For a quick fix, I have made a change in node_module react -native-vision-camera the below changes.
- go to node_modules->react-native-vision-camera->src->hooks->useFrameProcessor.ts
- comment the code
_setGlobalConsole(console);
- restart the metro with reset cache.
react-native start --reset-cache
Its just a quick fix. Everytime run yarn command, it will be replaced. For persistant change, please apply
patch-package
https://www.npmjs.com/package/patch-package
I got an error : ERROR frame-processor/unavailable: Frame Processors are not enabled. See https://react-native-vision-camera.com/docs/guides/troubleshooting, js engine: hermes
I still haven't tested this way as he said, I used expo's own library to expo-barcode-scanner to solve the temporary problem, probably in the future in version 3 of this library that will no longer use react-native-reanimated I'll come back to use her @truongto
@mrousavy I have the same issue with my project.
Please anyone help with this? Thank you in advance.
"react": "18.2.0", "react-native": "0.72.3", "react-native-reanimated": "3.0.2" "react-native-vision-camera": "^2.15.4",
Anyone able to solve the issues
"react": "18.2.0", "react-native": "0.72.3", "react-native-vision-camera": "^2.15.4", "react-native-reanimated": "3.3.0", "vision-camera-code-scanner": "^0.2.0"
A PR is underway on this subject :
https://github.com/mrousavy/react-native-vision-camera/pull/1623
(But no release date :/ )
FWIW, downgrading worked for me. I was using react-native 72 but it wasnt working. Aside from the warnings I get, it seems to work. I had to install the package that Creating a new application says to remove...
react 18.2 react-native 71.3 react native renimated 2.14.4 react-native-community/cli-platform-ios 11.3.7 react-native-vision-camera 2.15.4
Also, if your downgrading react-native version like me the Podfile needs require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' at the top.
Did anyone figure out how to solve the issue. I tried downgrading as per above suggestions but getting too many errors. please help i have been stuck on it from 2 weeks. i am working on android project.
// _setGlobalConsole(console); //comment global.didSetConsole = false;
//make false
still having this issue, are you guys able to resolve this?
Closing as this is a stale issue - this might have been fixed with the full rewrite in VisionCamera V3 (🥳) - if not, please create a new issue.
If your issue has been fixed, consider sponsoring me on GitHub to say thanks 💖
Question
I am facing a error that error says ERROR ReferenceError: Property '_setGlobalConsole' doesn't exist any idea how can i fix this issue with react-native-vision-camera?
What I tried
VisionCamera Version
2.15.4
Additional information