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

❓ Is reanimated v3 supported yet?

Open jzxchiang1 opened this issue 2 years ago • 7 comments

Question

I tried using reanimated v3 with react-native-vision-camera v2.11.2.

It generally works but frame processors in particular do not work on Android. (It works on iOS.)

Specifically, I am trying to use vision-camera-code-scanner v0.2.0, which relies on frame processors.

The device logs I'm seeing in Flipper are:

Setting new Frame Processor...
Found CameraView!
Adapting Shareable value from function (conversion to worklet)...
Successfully created worklet!
Called Frame Processor callback, but `frameProcessor` is null!
Called Frame Processor callback, but `frameProcessor` is null!
Called Frame Processor callback, but `frameProcessor` is null!
...
Removing Frame Processor...
Frame Processor removed!

Nothing crashes, but the frameProcessor is null warnings get logged very often (equal to my frameProcessorFps value of 5). Did reanimated v3 at HEAD break the frame processor code in this library? Thanks!

What I tried

No response

VisionCamera Version

2.11.2

Additional information

jzxchiang1 avatar Jun 04 '22 18:06 jzxchiang1

Hey! That's interesting, I didn't try REA 3 yet. Let me know if you find anything that might be the cause of this issue!

mrousavy avatar Jun 13 '22 08:06 mrousavy

Are there any logs or specifically areas of the codebase I should be looking at? I'm not too familiar with how to debug why frameProcessor is null. Thanks!

jzxchiang1 avatar Jun 14 '22 06:06 jzxchiang1

Vision camera fails to be build on rn 69. few issues. react-native directory used to have only react-native aar, but now it has hermes aar too. This leads finding rnAAR to fail.

If that is fixed the next error comes due to REA no longer containing pre-built aar, this leads extractJNI to fail

heroic avatar Jun 20 '22 04:06 heroic

Can you share the folder structure on RN <0.68 and RN 0.69 for comparison?

mrousavy avatar Jun 20 '22 11:06 mrousavy

This is 69 image

This is 68 image

similarly, REA doesn't have AAR anymore with 3.0.0

heroic avatar Jun 20 '22 12:06 heroic

And what's inside of hermes-engine and react-native?

I'll have to update VisionCamera to Fabric/TurboModule to be compatible with the new system - not sure when I have some free time to do that

mrousavy avatar Jun 20 '22 14:06 mrousavy

image

I was able to get the react native and android AAR paths to work. Couldn't get REA to work. Couldn't find the jni headers you were requiring earlier anymore in REA 3.

heroic avatar Jun 22 '22 02:06 heroic

Hey - yep REA 3 is supported now! Both in V3 and V2 of VisionCamera

mrousavy avatar Sep 30 '23 09:09 mrousavy