react-native-vision-camera: 'RNReanimated/REAIOSErrorHandler.h' file not found🐛

What were you trying to do?

“react-native-reanimated”: “^3.4.0”, “react-native-vision-camera”: “^2.15.5”,

When I run it through xcode I get the 'RNReanimated/REAIOSErrorHandler.h’ file not found error.

Reproduceable Code

#ifndef VISION_CAMERA_DISABLE_FRAME_PROCESSORS
  #if __has_include(<RNReanimated/NativeReanimatedModule.h>)
    #if __has_include(<RNReanimated/RuntimeManager.h>)
      #import <RNReanimated/RuntimeManager.h>
      #import <RNReanimated/RuntimeDecorator.h>
      #import <RNReanimated/REAIOSErrorHandler.h>
      #import "VisionCameraScheduler.h"
      #define ENABLE_FRAME_PROCESSORS
    #else
      #warning Your react-native-reanimated version is not compatible with VisionCamera, Frame Processors are disabled. Make sure you're using reanimated 2.2.0 or above!
    #endif
  #else
    #warning The NativeReanimatedModule.h header could not be found, Frame Processors are disabled. If you want to use Frame Processors, make sure you install react-native-reanimated!
  #endif
#endif

#import "FrameProcessorUtils.h"
#import "FrameProcessorCallback.h"
#import "../React Utils/MakeJSIRuntime.h"
#import "../React Utils/JSIUtils.h"

What happened instead?

When I run it through xcode I get the 'RNReanimated/REAIOSErrorHandler.h’ file not found error.

Relevant log output

'**RNReanimated/REAIOSErrorHandler.h' file not found**

Device

Iphone 14

VisionCamera Version

2.15.5

Additional information

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 16
  • Comments: 18 (2 by maintainers)

Most upvoted comments

I seem to have worked my way around this issue by completely removing the code related to Frame Processors on iOS. Of course, in my case, I wasn’t using them anyway, so removing the code temporarily is good enough for now.

As @nn1900 stated, disabling the frame processors with the config flag wasn’t working either, the compiler seemed to ignore it and look for the file to import anyway.

To do this, add and configure patch-packge to your project and add this patch in the patches folder at the root of your project. You will then have to re-run yarn install && npx pod-install

Hopefully we won’t have to keep this workaround for long! 🤞🏼

I fixed the issue by downgrading the react-native-reanimated version to 3.3.0.

Same problem here.

I fixed the issue by downgrading the react-native-reanimated version to 3.3.0.

not working with RNAnimated version ‘3.3.0’

@mrousavy Can you please look into it, ASAP.

If you guys are planning to use react-native-vision-camera with frame processor [i.e. QR scanner ] then please use this version of packages:

react-native-reanimated: "2.17.0",
react-native-vision-camera: "2.15.4"

and it is working fine. for your information i am using React-Native: 0.70.12 ios: 16.6

I fixed the issue by downgrading the react-native version to 0.71.7.