Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.🐛 #588

Closed
3 of 4 tasks
arn3342 opened this issue Nov 15, 2021 · 52 comments · Fixed by #694 or #1466
Closed
3 of 4 tasks
Labels
🐛 bug Something isn't working

Comments

@arn3342
Copy link

arn3342 commented Nov 15, 2021

What were you trying to do?

I have a simple RN project which utilises different libraries, one of them being the react-native-vision-camera. I am using the latest version 2.9.3. While building the project for android (both with run-android command or directly from android studio), i am getting a series of errors, whereas it was supposed to build without any issues.

Reproduceable Code

Not exactly sure, but can be reproduced in any blank app.

What happened instead?

When building on Android, with the following gradle settings:

buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 31
ndkVersion = "24.0.7856742"

... the build fails with CMAKE errors stating that some of the variables used by the project are set to NOTFOUND

Relevant log output

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FBJNI_LIB
linked by target "VisionCamera" in directory /Users/myuser/Documents/RN Projects/proj-v2/node_modules/react-native-vision-camera/android
FOLLY_JSON_LIB
linked by target "VisionCamera" in directory /Users/myuser/Documents/RN Projects/proj-v2/node_modules/react-native-vision-camera/android
JSI_LIB
linked by target "VisionCamera" in directory /Users/myuser/Documents/RN Projects/proj-v2/node_modules/react-native-vision-camera/android
JS_ENGINE_LIB
 linked by target "VisionCamera" in directory /Users/myuser/Documents/RN Projects/proj-v2/node_modules/react-native-vision-camera/android
REACT_NATIVE_JNI_LIB
linked by target "VisionCamera" in directory /Users/myuser/Documents/RN Projects/proj-v2/node_modules/react-native-vision-camera/android
REANIMATED_LIB
linked by target "VisionCamera" in directory /Users/myuser/Documents/RN Projects/proj-v2/node_modules/react-native-vision-camera/android

Device

On Android (Build fails on both M1 + Windows machine)

VisionCamera Version

2.9.3

Additional information

@arn3342 arn3342 added the 🐛 bug Something isn't working label Nov 15, 2021
@dragma
Copy link

dragma commented Nov 15, 2021

Same here :/

@mAdutskevich
Copy link

have react-native: 0.64.0, M1 and the same error with JSI_LIB

@ToJuHB
Copy link

ToJuHB commented Nov 16, 2021

Same

@jackstudd
Copy link

Same here with RN 0.64.2

@swizes
Copy link

swizes commented Nov 17, 2021

Same error with RN 0.65.1 and react-native-vision-camera 2.9.3

Intel based Mac

  buildToolsVersion = "30.0.2"
  minSdkVersion = 21
  compileSdkVersion = 30
  targetSdkVersion = 30
  ndkVersion = "20.1.5948944"
  playServicesVersion = "17.0.0" //google maps
  androidMapsUtilsVersion = "2.2.6" //google maps
  //Only using Android Support libraries
  supportLibVersion = "28.0.0"

@jackstudd
Copy link

jackstudd commented Nov 18, 2021

I got it working by reading related issues #388, #338 and #513.

@Sewb21
Copy link

Sewb21 commented Dec 7, 2021

I am experiencing this also, any updates as to when an official fix may get published?

@brunofrigeri
Copy link

Same here.

@mrousavy
Copy link
Owner

mrousavy commented Dec 8, 2021

Let me quickly explain the problems:

Problem A

JSI_LIB (libjsi.so) is only available in React Native 0.65 (or 66?) and higher. VisionCamera relies on that, so either upgrade to React Native 0.66 or higher, or create a PR that adds support for older RN versions.

To add support for older RN versions, remove this and this, and add jsi.cpp below this line. (find the full path by browsing node modules)

Problem B

Your Gradle Version is 7.0.0 or higher. In that case, we might need to change this line:

if (task.name == 'externalNativeBuildDebug' || task.name == 'externalNativeBuildRelease') {

to something like this:

    if (task.name.contains('externalNative') || task.name.contains('CMake')) {

but I haven't tested this.

I am rolling VisionCamera in 4 production apps for clients of my app development agency (Margelo), and it works on all 4 apps. So it surely must be the older RN versions, since all of those apps are RN 0.65 and higher. I try to maintain backwards compatibility as good as I can, but I'm a single developer with 5 big open source projects to maintain, CEO at an agency and app developer - I don't have enough time to maintain support for everything.

I would greatly appreciate PRs that fix this, and am also willing to test if a PR works in all 4 of my production apps. If it does work and does not introduce a lot of complexity just for having older RN version support, I am willing to merge it.

@willcray
Copy link

willcray commented Dec 8, 2021

Upgrading from react-native 0.64.2 -> 0.66.3 and following the guide from @jackstudd worked for me!

@Sewb21
Copy link

Sewb21 commented Dec 15, 2021

I am using Expo SDK 43 so upgrading React Native versions isn't an option, unfortunately. The fixes for adding older support doesn't work either, I will keep an eye on the issue.
Are there any older, stable versions of the package that work with React Native 0.64?

@hirbod
Copy link
Contributor

hirbod commented Dec 20, 2021

This error is still happening for me on 2.10.0 (Expo SDK 44, Custom Dev Client)

@sandlands
Copy link

@hirbod I finally managed to build version 2.9.4 for Android using eas build (Expo SDK 44, Dev Client). See this comment.

@arn3342
Copy link
Author

arn3342 commented Dec 27, 2021

I should've commented this earlier. I am on RN 0.66.2 so the assumption that my RN being of an old version is causing this issue is wrong! I did try the workoarounds mentioned in other threads but nothing seem to work properly. Sometimes even if the build succeeds, the application crashes on launch on Android (somehow it works on iOS, but i only tested on emulator)

@Sewb21
Copy link

Sewb21 commented Jan 5, 2022

I still seem to be getting this error when I refresh Gradle dependencies before building, I am using ejected Expo SDK 43 and React Native Vision v2.11.2

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FBJNI_LIB
FOLLY_JSON_LIB
JS_ENGINE_LIB
REACT_NATIVE_JNI_LIB
REANIMATED_LIB

@jhoanborges
Copy link

same issue

@AdamSheaHewett
Copy link

Same here

@faustaleonardo
Copy link

Same issue here.

"react": "17.0.2",
"react-native": "0.65.1",
"react-native-reanimated": "^2.2.0",
"react-native-vision-camera": "2.10.0",

@dittmarconsulting
Copy link

dittmarconsulting commented May 26, 2022

Same issue

"react": "^17.0.2",
"react-native": "^0.67.0",
"react-native-reanimated": "^2.8.0",
"react-native-vision-camera": "2.13.1",
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FBJNI_LIB
linked by target "VisionCamera" in directory /../node_modules/react-native-vision-camera/android
FOLLY_JSON_LIB
linked by target "VisionCamera" in directory /../node_modules/react-native-vision-camera/android
JSI_LIB
linked by target "VisionCamera" in directory /../node_modules/react-native-vision-camera/android
JS_ENGINE_LIB
linked by target "VisionCamera" in directory /../node_modules/react-native-vision-camera/android
REACT_NATIVE_JNI_LIB
linked by target "VisionCamera" in directory /../node_modules/react-native-vision-camera/android
REANIMATED_LIB
linked by target "VisionCamera" in directory /../node_modules/react-native-vision-camera/android

@maurorusso002
Copy link

Same issue

"react": "^17.0.2",
"react-native": "0.68.2",
"react-native-reanimated": "2.5.0",
"react-native-vision-camera": "^2.13.3",

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FBJNI_LIB
linked by target "VisionCamera" in directory C:/Users/mauro.a.russo/Documents/projects/react-native/COIMA/node_modules/react-native-vision-camera/android
FOLLY_JSON_LIB
linked by target "VisionCamera" in directory C:/Users/mauro.a.russo/Documents/projects/react-native/COIMA/node_modules/react-native-vision-camera/android
JSI_LIB
linked by target "VisionCamera" in directory C:/Users/mauro.a.russo/Documents/projects/react-native/COIMA/node_modules/react-native-vision-camera/android
JS_ENGINE_LIB
linked by target "VisionCamera" in directory C:/Users/mauro.a.russo/Documents/projects/react-native/COIMA/node_modules/react-native-vision-camera/android
REACT_NATIVE_JNI_LIB
linked by target "VisionCamera" in directory C:/Users/mauro.a.russo/Documents/projects/react-native/COIMA/node_modules/react-native-vision-camera/android
REANIMATED_LIB
linked by target "VisionCamera" in directory C:/Users/mauro.a.russo/Documents/projects/react-native/COIMA/node_modules/react-native-vision-camera/android

@zienna
Copy link

zienna commented Jun 8, 2022

Same issue with RN 0.68.2
Any update @mrousavy ?

@praveenbalajia
Copy link

@mrousavy Same issue in RN 0.68.1

@dittmarconsulting
Copy link

Can we please reopen this issue @mrousavy? There are now 8 people with the same issue.

@mrousavy mrousavy reopened this Jun 13, 2022
@dittmarconsulting
Copy link

Thank you @mrousavy 🙏

@tgreco
Copy link

tgreco commented Jul 17, 2022

disable frame processors

The biggest selling point of this library is the frame processor 🙃

@mrousavy
Copy link
Owner

Hey guys! I was on vacation, I'm catching up with Margelo stuff today and if I have some time left I'll check out the issue for you. Maybe I can find a quick fix.

@twcyao
Copy link

twcyao commented Aug 20, 2022

same issue, i created a new project to reproduce it.

  "dependencies": {
    "react": "17.0.2",
    "react-native": "0.68.2",
    "react-native-reanimated": "2.9.1",
    "react-native-vision-camera": "2.14.1"
  },

sync error in android studio

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FBJNI_LIB
linked by target "VisionCamera" in directory /Users/myuser/Documents/RN Projects/proj-v2/node_modules/react-native-vision-camera/android
FOLLY_JSON_LIB
linked by target "VisionCamera" in directory /Users/myuser/Documents/RN Projects/proj-v2/node_modules/react-native-vision-camera/android
JSI_LIB
linked by target "VisionCamera" in directory /Users/myuser/Documents/RN Projects/proj-v2/node_modules/react-native-vision-camera/android
JS_ENGINE_LIB
 linked by target "VisionCamera" in directory /Users/myuser/Documents/RN Projects/proj-v2/node_modules/react-native-vision-camera/android
REACT_NATIVE_JNI_LIB
linked by target "VisionCamera" in directory /Users/myuser/Documents/RN Projects/proj-v2/node_modules/react-native-vision-camera/android
REANIMATED_LIB
linked by target "VisionCamera" in directory /Users/myuser/Documents/RN Projects/proj-v2/node_modules/react-native-vision-camera/android

but i have some finding

do ./gradlew build from command line seems build VisionCamera successfully, then run app in android studio works.

@dittmarconsulting
Copy link

Upgraded react-native-vision-camera but still the same error. Why can't that be fixed?

"dependencies": {
  "react": "17.0.2",
  "react-native": "0.67.0,
  "react-native-reanimated": "2.8.0",
  "react-native-vision-camera": "2.14.1"
},

@HorbachAndrii
Copy link

HorbachAndrii commented Sep 13, 2022

I fixed it after update

"react-native": "0.68.3",

...
buildscript {
    ext {
        buildToolsVersion = "32.0.0"
        minSdkVersion = 24
        compileSdkVersion = 32
        targetSdkVersion = 32
        
        if (System.properties['os.arch'] == "aarch64") {
            // For M1 Users we need to use the NDK 24 which added support for aarch64
            ndkVersion = "24.0.8215888"
        } else {
            // Otherwise we default to the side-by-side NDK version from AGP.
            ndkVersion = "21.4.7075529"
        }
     }

@archcorsair
Copy link

archcorsair commented Sep 24, 2022

I fixed it after update

...
buildscript {
    ext {
        buildToolsVersion = "32.0.0"
        compileSdkVersion = 32
        targetSdkVersion = 32
        ....

This did not work for me.

Edit: This worked for me (I believe the order is important)

  1. Run ./gradlew clean in the /android directory
  2. Nuke your node_modules and install deps fresh again
  3. npx react-native run-android

@sheikx1221
Copy link

Not for vision camera because I am not using it
expo-av and expo-core--modules also have the same issue

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FBJNI_LIB
    linked by target "expo-av" in directory E:/CoolApp/coolconnect-app-driver/node_modules/expo-av/android
JSI_LIB
    linked by target "expo-av" in directory E:/CoolApp/coolconnect-app-driver/node_modules/expo-av/android
REACT_NATIVE_JNI_LIB
    linked by target "expo-av" in directory E:/CoolApp/coolconnect-app-driver/node_modules/expo-av/android

CMake Generate step failed.  Build files cannot be regenerated correctly.

I think when we use hermes as js-engine, it excludes these libraries if you see this line

    if (enableHermes) {
        //noinspection GradleDynamicVersion
        implementation("com.facebook.react:hermes-engine:+") { // From node_modules
            exclude group:'com.facebook.fbjni'
        }
    } else {
        implementation jscFlavor
    }

but if removed this, it throws duplicate libraries error, it means they are loaded but not available or path is not set in CMake.

expo run:android and expo prebuild did not made a CMake.txt file for me

Windows 10
Node 16.17.0
React-Native 0.69.5
Expo 46
expo-av 12.0.4

@HorbachAndrii
Copy link

I fixed it after update

...
buildscript {
    ext {
        buildToolsVersion = "32.0.0"
        compileSdkVersion = 32
        targetSdkVersion = 32
        ....

This did not work for me.

Edit: This worked for me (I believe the order is important)

  1. Run ./gradlew clean in the /android directory
  2. Nuke your node_modules and install deps fresh again
  3. npx react-native run-android

What is your ndkVersion ?
I use next

if (System.properties['os.arch'] == "aarch64") {
    // For M1 Users we need to use the NDK 24 which added support for aarch64
    ndkVersion = "24.0.8215888"
} else {
    // Otherwise we default to the side-by-side NDK version from AGP.
    ndkVersion = "21.4.7075529"
}

@namti
Copy link

namti commented Oct 4, 2022

"File" -> "Invalidate Caches..." works

@hengkx
Copy link

hengkx commented Oct 20, 2022

0.70.3 same error

@alfredarcifa
Copy link

0.70.3 same error

Me too, on the .70.3

CMake Warning (dev) in CMakeLists.txt:
No project() command is present.  The top-level CMakeLists.txt file must
contain a literal, direct call to the project() command.  Add a line of
code such as....

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FBJNI_LIB
linked by target "VisionCamera" in directory /Users/user/Projects/bennet/node_modules/react-native-vision-camera/android
FOLLY_LIB
linked by target "VisionCamera" in directory /Users/user/Projects/bennet/node_modules/react-native-vision-camera/android
JSI_LIB
linked by target "VisionCamera" in directory /Users/user/Projects/bennet/node_modules/react-native-vision-camera/android
REACT_NATIVE_JNI_LIB
linked by target "VisionCamera" in directory /Users/user/Projects/bennet/node_modules/react-native-vision-camera/android
REANIMATED_LIB
linked by target "VisionCamera" in directory /Users/user/Projects/bennet/node_modules/react-native-vision-camera/android

@Sewb21
Copy link

Sewb21 commented Nov 3, 2022

Still experiencing this vision 2.15.1, react native 0.69.5

@prateekjain98
Copy link

Not for vision camera because I am not using it expo-av and expo-core--modules also have the same issue

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FBJNI_LIB
    linked by target "expo-av" in directory E:/CoolApp/coolconnect-app-driver/node_modules/expo-av/android
JSI_LIB
    linked by target "expo-av" in directory E:/CoolApp/coolconnect-app-driver/node_modules/expo-av/android
REACT_NATIVE_JNI_LIB
    linked by target "expo-av" in directory E:/CoolApp/coolconnect-app-driver/node_modules/expo-av/android

CMake Generate step failed.  Build files cannot be regenerated correctly.

I think when we use hermes as js-engine, it excludes these libraries if you see this line

    if (enableHermes) {
        //noinspection GradleDynamicVersion
        implementation("com.facebook.react:hermes-engine:+") { // From node_modules
            exclude group:'com.facebook.fbjni'
        }
    } else {
        implementation jscFlavor
    }

but if removed this, it throws duplicate libraries error, it means they are loaded but not available or path is not set in CMake.

expo run:android and expo prebuild did not made a CMake.txt file for me

Windows 10 Node 16.17.0 React-Native 0.69.5 Expo 46 expo-av 12.0.4

I am also facing issue in expo. Did you get any solution for it?

@andreasheick-isobar
Copy link

andreasheick-isobar commented Nov 7, 2022

Using version 2.15.2, react native 0.70.5 and still getting this issue.

On react native 0.70.4 it worked with these steps:

  • cd to the android folder and run ./gradlew clean
  • nuke node_modules and reinstall
  • Android Studio -> Build -> Clean Project
  • Android Studio -> File -> Invalidate Caches / Restart

But now I can't fix it with this method anymore.

EDIT:
I managed to get rid of the error by running ./gradlew assembleDebug and then could run the app in Android Studio and sync gradle once again.

@martin-gudmundson
Copy link

Updating Android Studio's CMake version to 3.22.1 via the SDK Manager and then clean and rebuild resolved the issue for me.

@2sem
Copy link

2sem commented Jan 27, 2023

Same here
0.63.4 -> 0.63.5
gradle plugin 4.1.2 -> 4.2.2
gradle 6.5 -> 6.7.1

@bohdan-sharkz
Copy link

Using version 2.15.2, react native 0.70.5 and still getting this issue.

On react native 0.70.4 it worked with these steps:

  • cd to the android folder and run ./gradlew clean
  • nuke node_modules and reinstall
  • Android Studio -> Build -> Clean Project
  • Android Studio -> File -> Invalidate Caches / Restart

But now I can't fix it with this method anymore.

EDIT: I managed to get rid of the error by running ./gradlew assembleDebug and then could run the app in Android Studio and sync gradle once again.

I'm surprised this comment doesn't have any thumb-ups as only ./gradlew assembleDebug solved my issue and i've tried all of the above comments solutions

@mrousavy
Copy link
Owner

Hey! I've rewritten the entire Android codebase of VisionCamera from CameraX to Camera2 in the efforts of ✨ VisionCamera V3.

I just now completed the Camera2 rewrite and I believe the core structure is running, but there might be some edge cases to iron out. Can you try and test the PR #1674 for me to see if you can still reproduce this issue here?

Here's an instruction on how you can test that: #1674 (comment)

If the issue cannot be reproduced with that version/PR anymore, then hoorayy, I fixed it! 🎉
Otherwise please let me know and I'll keep this issue open to keep track of it.

Thank you!

mrousavy added a commit that referenced this issue Sep 1, 2023
See #1376

## Breaking Changes

* Frame Processors are now **synchronous**. Previously they ran on a
separate Thread. If you want to run something on a separate Thread now,
use `runAsync` inside a Frame Processor
* Frame Processor Plugins are no longer in the global object with the
`__` prefix, but rather stored directly in the `FrameProcessorPlugins`
object exported by react-native-vision-camera. (e.g. replace
`__scanQRCodes(frame)` with `FrameProcessorPlugins.scanQRCodes(frame)`)
* `frameProcessorFps` no longer exists. Use `runAtTargetFps` inside a
Frame Processor to throttle some calls.
* `onFrameProcessorPerformanceSuggestionAvailable` no longer exists. Use
the FPS display (`enableFpsGraph={true}`) to see how your Frame
Processor performs over time. This is more in-line with how React Native
works (Dev Tools / Perf Monitor)
* VisionCamera V3 will not work on RN 0.70 or below. You need to use RN
0.71. This is because the build script got way simpler and smaller,
making it faster to build and way less error prone. Backwards
compatibility is just too complex here.
* Reanimated is no longer used as a Worklet Runtime. Instead,
VisionCamera now uses
[react-native-worklets-core](https://github.com/margelo/react-native-worklets-core).

## Progress

You can test the latest V3 release by creating a new RN project with RN
0.71 and installing VisionCamera + RNWorklets:

```sh
yarn add [email protected]
yarn add react-native-worklets-core
yarn add @shopify/react-native-skia
```

Things to test:

* TensorFlow Lite plugin to load any `.tflite` model!! ✨ (see [this PR
for more
info](#1633),
will be a separate library soon)
* Drawing onto a Frame using Skia!! 🎉 
* Using `frame.toArrayBuffer()` to get the Frame's byte content in JS
* New Android build script. This should drastically speed up the build
time! 💨
* New Worklet library. This replaces Reanimated Worklets. Should be
faster and more stable :)
* New synchronous Frame Processors. Should be faster :)
* `runAtTargetFps` and `runAsync` in Frame Processors
* Using HostObjects or HostFunctions (like models from PyTorch) inside a
Frame Processor. This will probably require a few native bindings on
PyTorch's end to make the integration work (cc @raedle)

Overall V3 is close to completion. I have a few things to do the coming
days so not sure how much work I can put into this. **If anyone wants to
support the development of v3, I'd appreciate donations / sponsors:
https://github.com/sponsors/mrousavy** ❤️ :)


## Related issues 

features

- resolves
#1376
- fixes
#281
- resolves
#211
- resolves
#130
- resolves
#117
- fixes #76
- resolves
#75
- resolves
#562
- resolves
#565
- fixes
#570
- fixes
#287
- resolves
#311
- fixes
#315
- resolves
#323
- fixes
#340
- fixes
#354
- resolves
#420
- fixes
#434
- fixes
#452
- fixes
#496
- fixes
#497
- resolves
#499
- fixes
#516
- fixes
#527
- fixes
#542
- fixes
#548
- fixes
#561
- fixes
#740
- fixes
#770


...and then pretty much every Android issue lol

- fixes
#1675
(**maybe**, please test @PrernaBudhraja)
- fixes
#1671

.. maybe also (not tested):

- fixes
#1698
- fixes
#1687
- fixes
#1685
- fixes
#1681
- fixes
#1650
- fixes
#1646
- fixes
#1635
- fixes
#1631
- fixes
#1621
- fixes
#1615
- fixes
#1612
- fixes
#1605
- fixes
#1599
- fixes
#1585
- fixes
#1581
- fixes
#1569
- fixes
#1568
- fixes
#1565
- fixes
#1561
- fixes
#1558
- fixes
#1554
- fixes
#1551
- fixes
#1547
- fixes
#1543
- fixes
#1538
- fixes
#1536
- fixes
#1534
- fixes
#1528
- fixes
#1520
- fixes
#1498
- fixes
#1489
- fixes
#1477
- fixes
#1474
- fixes
#1463
- fixes
#1462
- fixes
#1449
- fixes
#1443
- fixes
#1437
- fixes
#1431
- fixes
#1429
- fixes
#1427
- fixes
#1423
- fixes
#1416
- fixes
#1407
- fixes
#1403
- fixes
#1402
- fixes
#1398
- fixes
#1396
- fixes
#1395
- fixes
#1379
- fixes
#1377
- fixes
#1374
- fixes
#1373
- fixes
#1365
- fixes
#1356
- fixes
#1353
- fixes
#1352
- fixes
#1351
- fixes
#1343
- fixes
#1340
- fixes
#1334
- fixes
#1330
- fixes
#1322
- fixes
#1296
- fixes
#1283
- fixes
#1260
- fixes
#1253
- fixes
#1251
- fixes
#1245
- fixes
#1238
- fixes
#1227
- fixes
#1226
- fixes
#1225
- fixes
#1222
- fixes
#1211
- fixes
#1208
- fixes
#1193
- fixes
#1191
- fixes
#1184
- fixes
#1164
- fixes
#1143
- fixes
#1128
- fixes
#1122
- fixes
#1120
- fixes
#1110
- fixes
#1097
- fixes
#1081
- fixes
#1080
- fixes
#1064
- fixes
#1053
- fixes
#1047
- fixes
#1044
- fixes
#1032
- fixes
#1026
- fixes
#1023
- fixes
#1015
- fixes
#1012
- fixes
#997
- fixes
#960
- fixes
#959
- fixes
#954
- fixes
#946
- fixes
#945
- fixes
#922
- fixes
#908
- fixes
#907
- fixes
#868
- fixes
#855
- fixes
#834
- fixes
#793
- fixes
#779
- fixes
#746
- fixes
#740
- fixes
#727
- fixes
#671
- fixes
#613
- fixes
#595
- fixes
#588
- fixes
#570
- fixes
#569
- fixes
#542
- fixes
#516
- fixes
#515
- fixes
#434
- fixes
#354
- fixes
#323
- fixes
#315
- fixes
#281
- fixes
#211
- fixes #76
@TassainRasool
Copy link

react-native version =0.68.5
I have updated the react-native-reanimated: 2.17.0 to react-native-reanimated: 3.0.0-rc.0 now my project build is getting failed I tried so many solutions none of them worked .
help me in this

austinbh1003 pushed a commit to austinbh1003/vision-camera that referenced this issue Jul 11, 2024
See mrousavy/react-native-vision-camera#1376

## Breaking Changes

* Frame Processors are now **synchronous**. Previously they ran on a
separate Thread. If you want to run something on a separate Thread now,
use `runAsync` inside a Frame Processor
* Frame Processor Plugins are no longer in the global object with the
`__` prefix, but rather stored directly in the `FrameProcessorPlugins`
object exported by react-native-vision-camera. (e.g. replace
`__scanQRCodes(frame)` with `FrameProcessorPlugins.scanQRCodes(frame)`)
* `frameProcessorFps` no longer exists. Use `runAtTargetFps` inside a
Frame Processor to throttle some calls.
* `onFrameProcessorPerformanceSuggestionAvailable` no longer exists. Use
the FPS display (`enableFpsGraph={true}`) to see how your Frame
Processor performs over time. This is more in-line with how React Native
works (Dev Tools / Perf Monitor)
* VisionCamera V3 will not work on RN 0.70 or below. You need to use RN
0.71. This is because the build script got way simpler and smaller,
making it faster to build and way less error prone. Backwards
compatibility is just too complex here.
* Reanimated is no longer used as a Worklet Runtime. Instead,
VisionCamera now uses
[react-native-worklets-core](https://github.com/margelo/react-native-worklets-core).

## Progress

You can test the latest V3 release by creating a new RN project with RN
0.71 and installing VisionCamera + RNWorklets:

```sh
yarn add [email protected]
yarn add react-native-worklets-core
yarn add @shopify/react-native-skia
```

Things to test:

* TensorFlow Lite plugin to load any `.tflite` model!! ✨ (see [this PR
for more
info](mrousavy/react-native-vision-camera#1633),
will be a separate library soon)
* Drawing onto a Frame using Skia!! 🎉 
* Using `frame.toArrayBuffer()` to get the Frame's byte content in JS
* New Android build script. This should drastically speed up the build
time! 💨
* New Worklet library. This replaces Reanimated Worklets. Should be
faster and more stable :)
* New synchronous Frame Processors. Should be faster :)
* `runAtTargetFps` and `runAsync` in Frame Processors
* Using HostObjects or HostFunctions (like models from PyTorch) inside a
Frame Processor. This will probably require a few native bindings on
PyTorch's end to make the integration work (cc @raedle)

Overall V3 is close to completion. I have a few things to do the coming
days so not sure how much work I can put into this. **If anyone wants to
support the development of v3, I'd appreciate donations / sponsors:
https://github.com/sponsors/mrousavy** ❤️ :)


## Related issues 

features

- resolves
mrousavy/react-native-vision-camera#1376
- fixes
mrousavy/react-native-vision-camera#281
- resolves
mrousavy/react-native-vision-camera#211
- resolves
mrousavy/react-native-vision-camera#130
- resolves
mrousavy/react-native-vision-camera#117
- fixes mrousavy/react-native-vision-camera#76
- resolves
mrousavy/react-native-vision-camera#75
- resolves
mrousavy/react-native-vision-camera#562
- resolves
mrousavy/react-native-vision-camera#565
- fixes
mrousavy/react-native-vision-camera#570
- fixes
mrousavy/react-native-vision-camera#287
- resolves
mrousavy/react-native-vision-camera#311
- fixes
mrousavy/react-native-vision-camera#315
- resolves
mrousavy/react-native-vision-camera#323
- fixes
mrousavy/react-native-vision-camera#340
- fixes
mrousavy/react-native-vision-camera#354
- resolves
mrousavy/react-native-vision-camera#420
- fixes
mrousavy/react-native-vision-camera#434
- fixes
mrousavy/react-native-vision-camera#452
- fixes
mrousavy/react-native-vision-camera#496
- fixes
mrousavy/react-native-vision-camera#497
- resolves
mrousavy/react-native-vision-camera#499
- fixes
mrousavy/react-native-vision-camera#516
- fixes
mrousavy/react-native-vision-camera#527
- fixes
mrousavy/react-native-vision-camera#542
- fixes
mrousavy/react-native-vision-camera#548
- fixes
mrousavy/react-native-vision-camera#561
- fixes
mrousavy/react-native-vision-camera#740
- fixes
mrousavy/react-native-vision-camera#770


...and then pretty much every Android issue lol

- fixes
mrousavy/react-native-vision-camera#1675
(**maybe**, please test @PrernaBudhraja)
- fixes
mrousavy/react-native-vision-camera#1671

.. maybe also (not tested):

- fixes
mrousavy/react-native-vision-camera#1698
- fixes
mrousavy/react-native-vision-camera#1687
- fixes
mrousavy/react-native-vision-camera#1685
- fixes
mrousavy/react-native-vision-camera#1681
- fixes
mrousavy/react-native-vision-camera#1650
- fixes
mrousavy/react-native-vision-camera#1646
- fixes
mrousavy/react-native-vision-camera#1635
- fixes
mrousavy/react-native-vision-camera#1631
- fixes
mrousavy/react-native-vision-camera#1621
- fixes
mrousavy/react-native-vision-camera#1615
- fixes
mrousavy/react-native-vision-camera#1612
- fixes
mrousavy/react-native-vision-camera#1605
- fixes
mrousavy/react-native-vision-camera#1599
- fixes
mrousavy/react-native-vision-camera#1585
- fixes
mrousavy/react-native-vision-camera#1581
- fixes
mrousavy/react-native-vision-camera#1569
- fixes
mrousavy/react-native-vision-camera#1568
- fixes
mrousavy/react-native-vision-camera#1565
- fixes
mrousavy/react-native-vision-camera#1561
- fixes
mrousavy/react-native-vision-camera#1558
- fixes
mrousavy/react-native-vision-camera#1554
- fixes
mrousavy/react-native-vision-camera#1551
- fixes
mrousavy/react-native-vision-camera#1547
- fixes
mrousavy/react-native-vision-camera#1543
- fixes
mrousavy/react-native-vision-camera#1538
- fixes
mrousavy/react-native-vision-camera#1536
- fixes
mrousavy/react-native-vision-camera#1534
- fixes
mrousavy/react-native-vision-camera#1528
- fixes
mrousavy/react-native-vision-camera#1520
- fixes
mrousavy/react-native-vision-camera#1498
- fixes
mrousavy/react-native-vision-camera#1489
- fixes
mrousavy/react-native-vision-camera#1477
- fixes
mrousavy/react-native-vision-camera#1474
- fixes
mrousavy/react-native-vision-camera#1463
- fixes
mrousavy/react-native-vision-camera#1462
- fixes
mrousavy/react-native-vision-camera#1449
- fixes
mrousavy/react-native-vision-camera#1443
- fixes
mrousavy/react-native-vision-camera#1437
- fixes
mrousavy/react-native-vision-camera#1431
- fixes
mrousavy/react-native-vision-camera#1429
- fixes
mrousavy/react-native-vision-camera#1427
- fixes
mrousavy/react-native-vision-camera#1423
- fixes
mrousavy/react-native-vision-camera#1416
- fixes
mrousavy/react-native-vision-camera#1407
- fixes
mrousavy/react-native-vision-camera#1403
- fixes
mrousavy/react-native-vision-camera#1402
- fixes
mrousavy/react-native-vision-camera#1398
- fixes
mrousavy/react-native-vision-camera#1396
- fixes
mrousavy/react-native-vision-camera#1395
- fixes
mrousavy/react-native-vision-camera#1379
- fixes
mrousavy/react-native-vision-camera#1377
- fixes
mrousavy/react-native-vision-camera#1374
- fixes
mrousavy/react-native-vision-camera#1373
- fixes
mrousavy/react-native-vision-camera#1365
- fixes
mrousavy/react-native-vision-camera#1356
- fixes
mrousavy/react-native-vision-camera#1353
- fixes
mrousavy/react-native-vision-camera#1352
- fixes
mrousavy/react-native-vision-camera#1351
- fixes
mrousavy/react-native-vision-camera#1343
- fixes
mrousavy/react-native-vision-camera#1340
- fixes
mrousavy/react-native-vision-camera#1334
- fixes
mrousavy/react-native-vision-camera#1330
- fixes
mrousavy/react-native-vision-camera#1322
- fixes
mrousavy/react-native-vision-camera#1296
- fixes
mrousavy/react-native-vision-camera#1283
- fixes
mrousavy/react-native-vision-camera#1260
- fixes
mrousavy/react-native-vision-camera#1253
- fixes
mrousavy/react-native-vision-camera#1251
- fixes
mrousavy/react-native-vision-camera#1245
- fixes
mrousavy/react-native-vision-camera#1238
- fixes
mrousavy/react-native-vision-camera#1227
- fixes
mrousavy/react-native-vision-camera#1226
- fixes
mrousavy/react-native-vision-camera#1225
- fixes
mrousavy/react-native-vision-camera#1222
- fixes
mrousavy/react-native-vision-camera#1211
- fixes
mrousavy/react-native-vision-camera#1208
- fixes
mrousavy/react-native-vision-camera#1193
- fixes
mrousavy/react-native-vision-camera#1191
- fixes
mrousavy/react-native-vision-camera#1184
- fixes
mrousavy/react-native-vision-camera#1164
- fixes
mrousavy/react-native-vision-camera#1143
- fixes
mrousavy/react-native-vision-camera#1128
- fixes
mrousavy/react-native-vision-camera#1122
- fixes
mrousavy/react-native-vision-camera#1120
- fixes
mrousavy/react-native-vision-camera#1110
- fixes
mrousavy/react-native-vision-camera#1097
- fixes
mrousavy/react-native-vision-camera#1081
- fixes
mrousavy/react-native-vision-camera#1080
- fixes
mrousavy/react-native-vision-camera#1064
- fixes
mrousavy/react-native-vision-camera#1053
- fixes
mrousavy/react-native-vision-camera#1047
- fixes
mrousavy/react-native-vision-camera#1044
- fixes
mrousavy/react-native-vision-camera#1032
- fixes
mrousavy/react-native-vision-camera#1026
- fixes
mrousavy/react-native-vision-camera#1023
- fixes
mrousavy/react-native-vision-camera#1015
- fixes
mrousavy/react-native-vision-camera#1012
- fixes
mrousavy/react-native-vision-camera#997
- fixes
mrousavy/react-native-vision-camera#960
- fixes
mrousavy/react-native-vision-camera#959
- fixes
mrousavy/react-native-vision-camera#954
- fixes
mrousavy/react-native-vision-camera#946
- fixes
mrousavy/react-native-vision-camera#945
- fixes
mrousavy/react-native-vision-camera#922
- fixes
mrousavy/react-native-vision-camera#908
- fixes
mrousavy/react-native-vision-camera#907
- fixes
mrousavy/react-native-vision-camera#868
- fixes
mrousavy/react-native-vision-camera#855
- fixes
mrousavy/react-native-vision-camera#834
- fixes
mrousavy/react-native-vision-camera#793
- fixes
mrousavy/react-native-vision-camera#779
- fixes
mrousavy/react-native-vision-camera#746
- fixes
mrousavy/react-native-vision-camera#740
- fixes
mrousavy/react-native-vision-camera#727
- fixes
mrousavy/react-native-vision-camera#671
- fixes
mrousavy/react-native-vision-camera#613
- fixes
mrousavy/react-native-vision-camera#595
- fixes
mrousavy/react-native-vision-camera#588
- fixes
mrousavy/react-native-vision-camera#570
- fixes
mrousavy/react-native-vision-camera#569
- fixes
mrousavy/react-native-vision-camera#542
- fixes
mrousavy/react-native-vision-camera#516
- fixes
mrousavy/react-native-vision-camera#515
- fixes
mrousavy/react-native-vision-camera#434
- fixes
mrousavy/react-native-vision-camera#354
- fixes
mrousavy/react-native-vision-camera#323
- fixes
mrousavy/react-native-vision-camera#315
- fixes
mrousavy/react-native-vision-camera#281
- fixes
mrousavy/react-native-vision-camera#211
- fixes mrousavy/react-native-vision-camera#76
max71126 added a commit to max71126/react-native-vision-camera that referenced this issue Sep 19, 2024
See mrousavy/react-native-vision-camera#1376

## Breaking Changes

* Frame Processors are now **synchronous**. Previously they ran on a
separate Thread. If you want to run something on a separate Thread now,
use `runAsync` inside a Frame Processor
* Frame Processor Plugins are no longer in the global object with the
`__` prefix, but rather stored directly in the `FrameProcessorPlugins`
object exported by react-native-vision-camera. (e.g. replace
`__scanQRCodes(frame)` with `FrameProcessorPlugins.scanQRCodes(frame)`)
* `frameProcessorFps` no longer exists. Use `runAtTargetFps` inside a
Frame Processor to throttle some calls.
* `onFrameProcessorPerformanceSuggestionAvailable` no longer exists. Use
the FPS display (`enableFpsGraph={true}`) to see how your Frame
Processor performs over time. This is more in-line with how React Native
works (Dev Tools / Perf Monitor)
* VisionCamera V3 will not work on RN 0.70 or below. You need to use RN
0.71. This is because the build script got way simpler and smaller,
making it faster to build and way less error prone. Backwards
compatibility is just too complex here.
* Reanimated is no longer used as a Worklet Runtime. Instead,
VisionCamera now uses
[react-native-worklets-core](https://github.com/margelo/react-native-worklets-core).

## Progress

You can test the latest V3 release by creating a new RN project with RN
0.71 and installing VisionCamera + RNWorklets:

```sh
yarn add [email protected]
yarn add react-native-worklets-core
yarn add @shopify/react-native-skia
```

Things to test:

* TensorFlow Lite plugin to load any `.tflite` model!! ✨ (see [this PR
for more
info](mrousavy/react-native-vision-camera#1633),
will be a separate library soon)
* Drawing onto a Frame using Skia!! 🎉 
* Using `frame.toArrayBuffer()` to get the Frame's byte content in JS
* New Android build script. This should drastically speed up the build
time! 💨
* New Worklet library. This replaces Reanimated Worklets. Should be
faster and more stable :)
* New synchronous Frame Processors. Should be faster :)
* `runAtTargetFps` and `runAsync` in Frame Processors
* Using HostObjects or HostFunctions (like models from PyTorch) inside a
Frame Processor. This will probably require a few native bindings on
PyTorch's end to make the integration work (cc @raedle)

Overall V3 is close to completion. I have a few things to do the coming
days so not sure how much work I can put into this. **If anyone wants to
support the development of v3, I'd appreciate donations / sponsors:
https://github.com/sponsors/mrousavy** ❤️ :)


## Related issues 

features

- resolves
mrousavy/react-native-vision-camera#1376
- fixes
mrousavy/react-native-vision-camera#281
- resolves
mrousavy/react-native-vision-camera#211
- resolves
mrousavy/react-native-vision-camera#130
- resolves
mrousavy/react-native-vision-camera#117
- fixes mrousavy/react-native-vision-camera#76
- resolves
mrousavy/react-native-vision-camera#75
- resolves
mrousavy/react-native-vision-camera#562
- resolves
mrousavy/react-native-vision-camera#565
- fixes
mrousavy/react-native-vision-camera#570
- fixes
mrousavy/react-native-vision-camera#287
- resolves
mrousavy/react-native-vision-camera#311
- fixes
mrousavy/react-native-vision-camera#315
- resolves
mrousavy/react-native-vision-camera#323
- fixes
mrousavy/react-native-vision-camera#340
- fixes
mrousavy/react-native-vision-camera#354
- resolves
mrousavy/react-native-vision-camera#420
- fixes
mrousavy/react-native-vision-camera#434
- fixes
mrousavy/react-native-vision-camera#452
- fixes
mrousavy/react-native-vision-camera#496
- fixes
mrousavy/react-native-vision-camera#497
- resolves
mrousavy/react-native-vision-camera#499
- fixes
mrousavy/react-native-vision-camera#516
- fixes
mrousavy/react-native-vision-camera#527
- fixes
mrousavy/react-native-vision-camera#542
- fixes
mrousavy/react-native-vision-camera#548
- fixes
mrousavy/react-native-vision-camera#561
- fixes
mrousavy/react-native-vision-camera#740
- fixes
mrousavy/react-native-vision-camera#770


...and then pretty much every Android issue lol

- fixes
mrousavy/react-native-vision-camera#1675
(**maybe**, please test @PrernaBudhraja)
- fixes
mrousavy/react-native-vision-camera#1671

.. maybe also (not tested):

- fixes
mrousavy/react-native-vision-camera#1698
- fixes
mrousavy/react-native-vision-camera#1687
- fixes
mrousavy/react-native-vision-camera#1685
- fixes
mrousavy/react-native-vision-camera#1681
- fixes
mrousavy/react-native-vision-camera#1650
- fixes
mrousavy/react-native-vision-camera#1646
- fixes
mrousavy/react-native-vision-camera#1635
- fixes
mrousavy/react-native-vision-camera#1631
- fixes
mrousavy/react-native-vision-camera#1621
- fixes
mrousavy/react-native-vision-camera#1615
- fixes
mrousavy/react-native-vision-camera#1612
- fixes
mrousavy/react-native-vision-camera#1605
- fixes
mrousavy/react-native-vision-camera#1599
- fixes
mrousavy/react-native-vision-camera#1585
- fixes
mrousavy/react-native-vision-camera#1581
- fixes
mrousavy/react-native-vision-camera#1569
- fixes
mrousavy/react-native-vision-camera#1568
- fixes
mrousavy/react-native-vision-camera#1565
- fixes
mrousavy/react-native-vision-camera#1561
- fixes
mrousavy/react-native-vision-camera#1558
- fixes
mrousavy/react-native-vision-camera#1554
- fixes
mrousavy/react-native-vision-camera#1551
- fixes
mrousavy/react-native-vision-camera#1547
- fixes
mrousavy/react-native-vision-camera#1543
- fixes
mrousavy/react-native-vision-camera#1538
- fixes
mrousavy/react-native-vision-camera#1536
- fixes
mrousavy/react-native-vision-camera#1534
- fixes
mrousavy/react-native-vision-camera#1528
- fixes
mrousavy/react-native-vision-camera#1520
- fixes
mrousavy/react-native-vision-camera#1498
- fixes
mrousavy/react-native-vision-camera#1489
- fixes
mrousavy/react-native-vision-camera#1477
- fixes
mrousavy/react-native-vision-camera#1474
- fixes
mrousavy/react-native-vision-camera#1463
- fixes
mrousavy/react-native-vision-camera#1462
- fixes
mrousavy/react-native-vision-camera#1449
- fixes
mrousavy/react-native-vision-camera#1443
- fixes
mrousavy/react-native-vision-camera#1437
- fixes
mrousavy/react-native-vision-camera#1431
- fixes
mrousavy/react-native-vision-camera#1429
- fixes
mrousavy/react-native-vision-camera#1427
- fixes
mrousavy/react-native-vision-camera#1423
- fixes
mrousavy/react-native-vision-camera#1416
- fixes
mrousavy/react-native-vision-camera#1407
- fixes
mrousavy/react-native-vision-camera#1403
- fixes
mrousavy/react-native-vision-camera#1402
- fixes
mrousavy/react-native-vision-camera#1398
- fixes
mrousavy/react-native-vision-camera#1396
- fixes
mrousavy/react-native-vision-camera#1395
- fixes
mrousavy/react-native-vision-camera#1379
- fixes
mrousavy/react-native-vision-camera#1377
- fixes
mrousavy/react-native-vision-camera#1374
- fixes
mrousavy/react-native-vision-camera#1373
- fixes
mrousavy/react-native-vision-camera#1365
- fixes
mrousavy/react-native-vision-camera#1356
- fixes
mrousavy/react-native-vision-camera#1353
- fixes
mrousavy/react-native-vision-camera#1352
- fixes
mrousavy/react-native-vision-camera#1351
- fixes
mrousavy/react-native-vision-camera#1343
- fixes
mrousavy/react-native-vision-camera#1340
- fixes
mrousavy/react-native-vision-camera#1334
- fixes
mrousavy/react-native-vision-camera#1330
- fixes
mrousavy/react-native-vision-camera#1322
- fixes
mrousavy/react-native-vision-camera#1296
- fixes
mrousavy/react-native-vision-camera#1283
- fixes
mrousavy/react-native-vision-camera#1260
- fixes
mrousavy/react-native-vision-camera#1253
- fixes
mrousavy/react-native-vision-camera#1251
- fixes
mrousavy/react-native-vision-camera#1245
- fixes
mrousavy/react-native-vision-camera#1238
- fixes
mrousavy/react-native-vision-camera#1227
- fixes
mrousavy/react-native-vision-camera#1226
- fixes
mrousavy/react-native-vision-camera#1225
- fixes
mrousavy/react-native-vision-camera#1222
- fixes
mrousavy/react-native-vision-camera#1211
- fixes
mrousavy/react-native-vision-camera#1208
- fixes
mrousavy/react-native-vision-camera#1193
- fixes
mrousavy/react-native-vision-camera#1191
- fixes
mrousavy/react-native-vision-camera#1184
- fixes
mrousavy/react-native-vision-camera#1164
- fixes
mrousavy/react-native-vision-camera#1143
- fixes
mrousavy/react-native-vision-camera#1128
- fixes
mrousavy/react-native-vision-camera#1122
- fixes
mrousavy/react-native-vision-camera#1120
- fixes
mrousavy/react-native-vision-camera#1110
- fixes
mrousavy/react-native-vision-camera#1097
- fixes
mrousavy/react-native-vision-camera#1081
- fixes
mrousavy/react-native-vision-camera#1080
- fixes
mrousavy/react-native-vision-camera#1064
- fixes
mrousavy/react-native-vision-camera#1053
- fixes
mrousavy/react-native-vision-camera#1047
- fixes
mrousavy/react-native-vision-camera#1044
- fixes
mrousavy/react-native-vision-camera#1032
- fixes
mrousavy/react-native-vision-camera#1026
- fixes
mrousavy/react-native-vision-camera#1023
- fixes
mrousavy/react-native-vision-camera#1015
- fixes
mrousavy/react-native-vision-camera#1012
- fixes
mrousavy/react-native-vision-camera#997
- fixes
mrousavy/react-native-vision-camera#960
- fixes
mrousavy/react-native-vision-camera#959
- fixes
mrousavy/react-native-vision-camera#954
- fixes
mrousavy/react-native-vision-camera#946
- fixes
mrousavy/react-native-vision-camera#945
- fixes
mrousavy/react-native-vision-camera#922
- fixes
mrousavy/react-native-vision-camera#908
- fixes
mrousavy/react-native-vision-camera#907
- fixes
mrousavy/react-native-vision-camera#868
- fixes
mrousavy/react-native-vision-camera#855
- fixes
mrousavy/react-native-vision-camera#834
- fixes
mrousavy/react-native-vision-camera#793
- fixes
mrousavy/react-native-vision-camera#779
- fixes
mrousavy/react-native-vision-camera#746
- fixes
mrousavy/react-native-vision-camera#740
- fixes
mrousavy/react-native-vision-camera#727
- fixes
mrousavy/react-native-vision-camera#671
- fixes
mrousavy/react-native-vision-camera#613
- fixes
mrousavy/react-native-vision-camera#595
- fixes
mrousavy/react-native-vision-camera#588
- fixes
mrousavy/react-native-vision-camera#570
- fixes
mrousavy/react-native-vision-camera#569
- fixes
mrousavy/react-native-vision-camera#542
- fixes
mrousavy/react-native-vision-camera#516
- fixes
mrousavy/react-native-vision-camera#515
- fixes
mrousavy/react-native-vision-camera#434
- fixes
mrousavy/react-native-vision-camera#354
- fixes
mrousavy/react-native-vision-camera#323
- fixes
mrousavy/react-native-vision-camera#315
- fixes
mrousavy/react-native-vision-camera#281
- fixes
mrousavy/react-native-vision-camera#211
- fixes mrousavy/react-native-vision-camera#76
isaaccolson pushed a commit to isaaccolson/deliveries-mobile that referenced this issue Oct 30, 2024
See mrousavy#1376

## Breaking Changes

* Frame Processors are now **synchronous**. Previously they ran on a
separate Thread. If you want to run something on a separate Thread now,
use `runAsync` inside a Frame Processor
* Frame Processor Plugins are no longer in the global object with the
`__` prefix, but rather stored directly in the `FrameProcessorPlugins`
object exported by react-native-vision-camera. (e.g. replace
`__scanQRCodes(frame)` with `FrameProcessorPlugins.scanQRCodes(frame)`)
* `frameProcessorFps` no longer exists. Use `runAtTargetFps` inside a
Frame Processor to throttle some calls.
* `onFrameProcessorPerformanceSuggestionAvailable` no longer exists. Use
the FPS display (`enableFpsGraph={true}`) to see how your Frame
Processor performs over time. This is more in-line with how React Native
works (Dev Tools / Perf Monitor)
* VisionCamera V3 will not work on RN 0.70 or below. You need to use RN
0.71. This is because the build script got way simpler and smaller,
making it faster to build and way less error prone. Backwards
compatibility is just too complex here.
* Reanimated is no longer used as a Worklet Runtime. Instead,
VisionCamera now uses
[react-native-worklets-core](https://github.com/margelo/react-native-worklets-core).

## Progress

You can test the latest V3 release by creating a new RN project with RN
0.71 and installing VisionCamera + RNWorklets:

```sh
yarn add [email protected]
yarn add react-native-worklets-core
yarn add @shopify/react-native-skia
```

Things to test:

* TensorFlow Lite plugin to load any `.tflite` model!! ✨ (see [this PR
for more
info](mrousavy#1633),
will be a separate library soon)
* Drawing onto a Frame using Skia!! 🎉 
* Using `frame.toArrayBuffer()` to get the Frame's byte content in JS
* New Android build script. This should drastically speed up the build
time! 💨
* New Worklet library. This replaces Reanimated Worklets. Should be
faster and more stable :)
* New synchronous Frame Processors. Should be faster :)
* `runAtTargetFps` and `runAsync` in Frame Processors
* Using HostObjects or HostFunctions (like models from PyTorch) inside a
Frame Processor. This will probably require a few native bindings on
PyTorch's end to make the integration work (cc @raedle)

Overall V3 is close to completion. I have a few things to do the coming
days so not sure how much work I can put into this. **If anyone wants to
support the development of v3, I'd appreciate donations / sponsors:
https://github.com/sponsors/mrousavy** ❤️ :)


## Related issues 

features

- resolves
mrousavy#1376
- fixes
mrousavy#281
- resolves
mrousavy#211
- resolves
mrousavy#130
- resolves
mrousavy#117
- fixes mrousavy#76
- resolves
mrousavy#75
- resolves
mrousavy#562
- resolves
mrousavy#565
- fixes
mrousavy#570
- fixes
mrousavy#287
- resolves
mrousavy#311
- fixes
mrousavy#315
- resolves
mrousavy#323
- fixes
mrousavy#340
- fixes
mrousavy#354
- resolves
mrousavy#420
- fixes
mrousavy#434
- fixes
mrousavy#452
- fixes
mrousavy#496
- fixes
mrousavy#497
- resolves
mrousavy#499
- fixes
mrousavy#516
- fixes
mrousavy#527
- fixes
mrousavy#542
- fixes
mrousavy#548
- fixes
mrousavy#561
- fixes
mrousavy#740
- fixes
mrousavy#770


...and then pretty much every Android issue lol

- fixes
mrousavy#1675
(**maybe**, please test @PrernaBudhraja)
- fixes
mrousavy#1671

.. maybe also (not tested):

- fixes
mrousavy#1698
- fixes
mrousavy#1687
- fixes
mrousavy#1685
- fixes
mrousavy#1681
- fixes
mrousavy#1650
- fixes
mrousavy#1646
- fixes
mrousavy#1635
- fixes
mrousavy#1631
- fixes
mrousavy#1621
- fixes
mrousavy#1615
- fixes
mrousavy#1612
- fixes
mrousavy#1605
- fixes
mrousavy#1599
- fixes
mrousavy#1585
- fixes
mrousavy#1581
- fixes
mrousavy#1569
- fixes
mrousavy#1568
- fixes
mrousavy#1565
- fixes
mrousavy#1561
- fixes
mrousavy#1558
- fixes
mrousavy#1554
- fixes
mrousavy#1551
- fixes
mrousavy#1547
- fixes
mrousavy#1543
- fixes
mrousavy#1538
- fixes
mrousavy#1536
- fixes
mrousavy#1534
- fixes
mrousavy#1528
- fixes
mrousavy#1520
- fixes
mrousavy#1498
- fixes
mrousavy#1489
- fixes
mrousavy#1477
- fixes
mrousavy#1474
- fixes
mrousavy#1463
- fixes
mrousavy#1462
- fixes
mrousavy#1449
- fixes
mrousavy#1443
- fixes
mrousavy#1437
- fixes
mrousavy#1431
- fixes
mrousavy#1429
- fixes
mrousavy#1427
- fixes
mrousavy#1423
- fixes
mrousavy#1416
- fixes
mrousavy#1407
- fixes
mrousavy#1403
- fixes
mrousavy#1402
- fixes
mrousavy#1398
- fixes
mrousavy#1396
- fixes
mrousavy#1395
- fixes
mrousavy#1379
- fixes
mrousavy#1377
- fixes
mrousavy#1374
- fixes
mrousavy#1373
- fixes
mrousavy#1365
- fixes
mrousavy#1356
- fixes
mrousavy#1353
- fixes
mrousavy#1352
- fixes
mrousavy#1351
- fixes
mrousavy#1343
- fixes
mrousavy#1340
- fixes
mrousavy#1334
- fixes
mrousavy#1330
- fixes
mrousavy#1322
- fixes
mrousavy#1296
- fixes
mrousavy#1283
- fixes
mrousavy#1260
- fixes
mrousavy#1253
- fixes
mrousavy#1251
- fixes
mrousavy#1245
- fixes
mrousavy#1238
- fixes
mrousavy#1227
- fixes
mrousavy#1226
- fixes
mrousavy#1225
- fixes
mrousavy#1222
- fixes
mrousavy#1211
- fixes
mrousavy#1208
- fixes
mrousavy#1193
- fixes
mrousavy#1191
- fixes
mrousavy#1184
- fixes
mrousavy#1164
- fixes
mrousavy#1143
- fixes
mrousavy#1128
- fixes
mrousavy#1122
- fixes
mrousavy#1120
- fixes
mrousavy#1110
- fixes
mrousavy#1097
- fixes
mrousavy#1081
- fixes
mrousavy#1080
- fixes
mrousavy#1064
- fixes
mrousavy#1053
- fixes
mrousavy#1047
- fixes
mrousavy#1044
- fixes
mrousavy#1032
- fixes
mrousavy#1026
- fixes
mrousavy#1023
- fixes
mrousavy#1015
- fixes
mrousavy#1012
- fixes
mrousavy#997
- fixes
mrousavy#960
- fixes
mrousavy#959
- fixes
mrousavy#954
- fixes
mrousavy#946
- fixes
mrousavy#945
- fixes
mrousavy#922
- fixes
mrousavy#908
- fixes
mrousavy#907
- fixes
mrousavy#868
- fixes
mrousavy#855
- fixes
mrousavy#834
- fixes
mrousavy#793
- fixes
mrousavy#779
- fixes
mrousavy#746
- fixes
mrousavy#740
- fixes
mrousavy#727
- fixes
mrousavy#671
- fixes
mrousavy#613
- fixes
mrousavy#595
- fixes
mrousavy#588
- fixes
mrousavy#570
- fixes
mrousavy#569
- fixes
mrousavy#542
- fixes
mrousavy#516
- fixes
mrousavy#515
- fixes
mrousavy#434
- fixes
mrousavy#354
- fixes
mrousavy#323
- fixes
mrousavy#315
- fixes
mrousavy#281
- fixes
mrousavy#211
- fixes mrousavy#76
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet