react-native-reanimated: iOS: Version 2.17.0 fails to build on React Native 0.72.0+

Description

Version 2.17.0 of this library encounters C++ dialect-related build errors on React Native 0.72.0-rc.5:

❌  /Users/jeff/Projects/groove/deps/react-native-app/RNReanimated2/ios/Pods/Headers/Public/React-cxxreact/cxxreact/NativeModule.h:28:26: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?

using MethodCallResult = std::optional<folly::dynamic>;
                                  ^
❌  /Users/jeff/Projects/groove/deps/react-native-app/RNReanimated2/ios/Pods/Headers/Public/React-cxxreact/cxxreact/ModuleRegistry.h:50:3: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?

  std::optional<ModuleConfig> getConfig(const std::string &name);
      ^
❌  /Users/jeff/Projects/groove/deps/react-native-app/RNReanimated2/ios/Pods/Headers/Public/React-jsiexecutor/jsireact/JSINativeModules.h:30:3: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?

  std::optional<jsi::Function> m_genNativeModuleJS;
      ^
❌  /Users/jeff/Projects/groove/deps/react-native-app/RNReanimated2/ios/Pods/Headers/Public/React-jsiexecutor/jsireact/JSINativeModules.h:34:3: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?

  std::optional<jsi::Object> createModule(
      ^
❌  /Users/jeff/Projects/groove/deps/react-native-app/RNReanimated2/ios/Pods/Headers/Public/React-jsiexecutor/jsireact/JSIExecutor.h:131:3: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?

  std::optional<jsi::Function> callFunctionReturnFlushedQueue_;
      ^
❌  /Users/jeff/Projects/groove/deps/react-native-app/RNReanimated2/ios/Pods/Headers/Public/React-jsiexecutor/jsireact/JSIExecutor.h:132:3: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?

  std::optional<jsi::Function> invokeCallbackAndReturnFlushedQueue_;
      ^
❌  /Users/jeff/Projects/groove/deps/react-native-app/RNReanimated2/ios/Pods/Headers/Public/React-jsiexecutor/jsireact/JSIExecutor.h:133:3: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?

  std::optional<jsi::Function> flushedQueue_;
      ^

Changing the C++ dialect setting to match the new React Native c++17 default seems to resolve this issue. We, like others, are stuck on Reanimated 2.x due to react-native-vision-camera.

Steps to reproduce

  1. Create a bare React Native project on 0.72.0-rc.5
  2. Ensure that it build successfully on iOS
  3. Install Reanimated 2.17.0
  4. Attempt to build on iOS again

Snack or a link to a repository

https://github.com/jbrowning/RN072Reanimated2

Reanimated version

2.17.0

React Native version

0.72.0-rc.5

Platforms

iOS

JavaScript runtime

None

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 15
  • Comments: 67 (19 by maintainers)

Most upvoted comments

Are there plans to add support for react-native v0.72 in reanimated v2? Currently I cannot update reanimated to v3 in my projects as vision-camera is not yet compatible with that version.

@tomekzaw Do you have any plans to add RN 0.72 support for Reanimated 2? My project won’t be able to upgrade to Reanimated 3 any time soon but we would like to keep using the latest RN version.

Similar to @camilossantos2809 I cannot update reanimated to v3 in my project due to react-native-vision-camera and its plugin vision-camera-code-scanner.

Similar to @arshak-kahnputers I’m blocked by reanimated v3 and my project cannot be built successfully cuz I’m using react-native-vision-camera too.

Simply changing the dialect fixes the issue image

I can confirm this does fix it. Only issue is when you have a remote CI server that does a pod install it can’t change the pod file dialect. Can this be a minor release just to change this?

In my project I’m also using is vision-camera

You can update your Podfile to override this build setting during pod install:

installer.generated_projects.each do |project|
  project.targets.each do |target|
    target.build_configurations.each do |config|
      if target.name === "RNReanimated"
        config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17'
      end
      ...
    end
  end
end

On my side, this does not fix the problem. The project now builds on iOS but triggers an error at runtime:

 ERROR  [Reanimated] Couldn't determine the version of the native part of Reanimated. Did you forget to re-build the app after upgrading react-native-reanimated? If you use Expo Go, you must use the exact version which is bundled into Expo SDK.
 ERROR  TypeError: Cannot read property 'installCoreFunctions' of undefined, js engine: hermes

Everything is ready from our side, we just preparing for the release - most probably next week.

also stacked because of react-native-vision-camera.

any updates?

  1. Upgrade Reanimated to 3.5.1
yarn add react-native-reanimated@^3.5.1
  1. Install RNVisionCamera from this PR: https://github.com/mrousavy/react-native-vision-camera/pull/1759
yarn add tomekzaw/react-native-vision-camera#e323a61d360ba70d30ecf8522e515a6270225db0
  1. Don’t forget to run pod install and yarn start --reset-cache.

Simply changing the dialect fixes the issue

image

@tomekzaw We are also in the VisionCamera situation.

Simply changing the dialect fixes the issue image

I can confirm this does fix it. Only issue is when you have a remote CI server that does a pod install it can’t change the pod file dialect. Can this be a minor release just to change this? In my project I’m also using is vision-camera

The fix for iOS should be on version v2.17.0

# RNReanimated.podspec

  s.pod_target_xcconfig = {
    "USE_HEADERMAP" => "YES",
    "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/#{folly_prefix}Folly\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\" ",
    "FRAMEWORK_SEARCH_PATHS" => "\"${PODS_CONFIGURATION_BUILD_DIR}/React-hermes\"",
    "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
  }

This work for me. patch-package generate this diff file:

diff --git a/node_modules/react-native-reanimated/RNReanimated.podspec b/node_modules/react-native-reanimated/RNReanimated.podspec
index 1cbeafc..1db5841 100644
--- a/node_modules/react-native-reanimated/RNReanimated.podspec
+++ b/node_modules/react-native-reanimated/RNReanimated.podspec
@@ -40,6 +40,7 @@ Pod::Spec.new do |s|
     "USE_HEADERMAP" => "YES",
     "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/#{folly_prefix}Folly\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\" ",
     "FRAMEWORK_SEARCH_PATHS" => "\"${PODS_CONFIGURATION_BUILD_DIR}/React-hermes\"",
+    "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
   }
   s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
   s.xcconfig               = {

Anyone can add and use for fix temporary this issue.

To sum up:

  • Reanimated 2.17.0 doesn’t support react-native@0.72
  • Reanimated 3+ supports react-native@0.72
  • Reanimated 3.5.4 supports react-native-vision-camera@^2.16.1

Hi @tomekzaw, I got this error running on latest react-native@0.72.4, react-native-reanimated@3.5.2 and react-native-vision-camera@2.16.0 that should support reanimated@V3. It works fine for iOS build, but fails on Android build.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-vision-camera:buildCMakeDebug[arm64-v8a]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `/Users/user/project/node_modules/react-native-vision-camera/android/.cxx/Debug/4s5y5b3c/arm64-v8a'
  [1/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/java-bindings/JHashMap.cpp.o
  [2/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/java-bindings/JImageProxy.cpp.o
  [3/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/java-bindings/JFrameProcessorPlugin.cpp.o
  [4/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCameraScheduler.cpp.o
  [5/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o
  [6/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/FrameHostObject.cpp.o
  [7/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/JSIJNIConversion.cpp.o
  FAILED: CMakeFiles/VisionCamera.dir/src/main/cpp/JSIJNIConversion.cpp.o 
  /Users/user/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android21 --sysroot=/Users/user/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -DVisionCamera_EXPORTS -I/Users/user/project/node_modules/react-native/ReactAndroid/src/main/jni/react/turbomodule -I/Users/user/project/node_modules/react-native/ReactCommon -I/Users/user/project/node_modules/react-native/ReactCommon/callinvoker -I/Users/user/project/node_modules/react-native/ReactCommon/jsi -I/Users/user/project/node_modules/react-native/ReactCommon/react/renderer/graphics/platform/cxx -I/Users/user/project/node_modules/react-native/ReactCommon/runtimeexecutor -I/Users/user/project/node_modules/react-native/ReactCommon/yoga -I/Users/user/project/node_modules/react-native-vision-camera/android/src/main/cpp -isystem /Users/user/.gradle/caches/transforms-3/00f2500bc865ce1c87c6a8f62f269c59/transformed/jetified-hermes-android-0.72.4-debug/prefab/modules/libhermes/include -isystem /Users/user/.gradle/caches/transforms-3/53f4b2980c6436229b017cee53292244/transformed/jetified-react-android-0.72.4-debug/prefab/modules/folly_runtime/include -isystem /Users/user/.gradle/caches/transforms-3/53f4b2980c6436229b017cee53292244/transformed/jetified-react-android-0.72.4-debug/prefab/modules/glog/include -isystem /Users/user/.gradle/caches/transforms-3/53f4b2980c6436229b017cee53292244/transformed/jetified-react-android-0.72.4-debug/prefab/modules/jsi/include -isystem /Users/user/.gradle/caches/transforms-3/53f4b2980c6436229b017cee53292244/transformed/jetified-react-android-0.72.4-debug/prefab/modules/reactnativejni/include -isystem /Users/user/.gradle/caches/transforms-3/eeb7a76cc0d2c5a8cc81cab965bba0b1/transformed/jetified-fbjni-0.3.0/prefab/modules/fbjni/include -isystem /Users/user/project/node_modules/react-native-reanimated/android/build/prefab-headers/reanimated -fexceptions -frtti -std=c++1y -DONANDROID -DFOR_HERMES=1 -g  -fno-limit-debug-info -fPIC -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DFOLLY_HAVE_RECVMMSG=1 -DFOLLY_HAVE_PTHREAD=1 -DFOLLY_HAVE_XSI_STRERROR_R=1 -MD -MT CMakeFiles/VisionCamera.dir/src/main/cpp/JSIJNIConversion.cpp.o -MF CMakeFiles/VisionCamera.dir/src/main/cpp/JSIJNIConversion.cpp.o.d -o CMakeFiles/VisionCamera.dir/src/main/cpp/JSIJNIConversion.cpp.o -c /Users/user/project/node_modules/react-native-vision-camera/android/src/main/cpp/JSIJNIConversion.cpp
  In file included from /Users/user/project/node_modules/react-native-vision-camera/android/src/main/cpp/JSIJNIConversion.cpp:17:
  /Users/user/.gradle/caches/transforms-3/53f4b2980c6436229b017cee53292244/transformed/jetified-react-android-0.72.4-debug/prefab/modules/reactnativejni/include/react/jni/ReadableNativeMap.h:41:3: error: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?
    std::optional<folly::dynamic> keys_;
    ^~~~~
  /Users/user/.gradle/caches/transforms-3/53f4b2980c6436229b017cee53292244/transformed/jetified-react-android-0.72.4-debug/prefab/modules/folly_runtime/include/folly/Optional.h:102:7: note: 'folly::Optional' declared here
  class Optional {
        ^
  1 error generated.
  [8/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/FrameProcessorRuntimeManager.cpp.o
  [9/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/CameraView.cpp.o
  ninja: build stopped: subcommand failed.
  
  C++ build system [build] failed while executing:
      /Users/user/Library/Android/sdk/cmake/3.22.1/bin/ninja \
        -C \
        /Users/user/project/node_modules/react-native-vision-camera/android/.cxx/Debug/4s5y5b3c/arm64-v8a \
        VisionCamera
    from /Users/user/project/node_modules/react-native-vision-camera/android

Any news on this? Still waiting for this fix to be able to update to 0.72 😦

I am also having this problem and it will likely prevent me from updating to react-native 0.72.3 until this can be fixed! I don’t think updating to v3 is practical but I can try.

I’m facing the same issue, would love to have the support for 0.72 with reanimated v2 @elliottkember

Same for me … HELP !

react-native-vision-camera doesn’t work with Reanimated v3 and block the upgrade for many

same, is there a patch to add support for v2 ?

@tomekzaw Hi, thanks for your work. I tried the PR build and reanimated version you suggested and ios is working fine now but i am getting error while trying to run android.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-vision-camera:buildCMakeDebug[arm64-v8a]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `/Users/hemantgogia/Documents/hemant/umee/crm/packages/mobile/node_modules/react-native-vision-camera/android/.cxx/Debug/1k4n4t6j/arm64-v8a'
  [1/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/java-bindings/JHashMap.cpp.o
  [2/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/java-bindings/JImageProxy.cpp.o
  [3/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/java-bindings/JFrameProcessorPlugin.cpp.o
  [4/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCameraScheduler.cpp.o
  [5/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o
  [6/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/FrameHostObject.cpp.o
  [7/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/JSIJNIConversion.cpp.o
  FAILED: CMakeFiles/VisionCamera.dir/src/main/cpp/JSIJNIConversion.cpp.o 
  /Users/hemantgogia/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android21 --sysroot=/Users/hemantgogia/Library/Android/sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -DVisionCamera_EXPORTS -I/Users/hemantgogia/Documents/hemant/umee/crm/packages/mobile/node_modules/react-native/ReactAndroid/src/main/jni/react/turbomodule -I/Users/hemantgogia/Documents/hemant/umee/crm/packages/mobile/node_modules/react-native/ReactCommon -I/Users/hemantgogia/Documents/hemant/umee/crm/packages/mobile/node_modules/react-native/ReactCommon/callinvoker -I/Users/hemantgogia/Documents/hemant/umee/crm/packages/mobile/node_modules/react-native/ReactCommon/jsi -I/Users/hemantgogia/Documents/hemant/umee/crm/packages/mobile/node_modules/react-native/ReactCommon/react/renderer/graphics/platform/cxx -I/Users/hemantgogia/Documents/hemant/umee/crm/packages/mobile/node_modules/react-native/ReactCommon/runtimeexecutor -I/Users/hemantgogia/Documents/hemant/umee/crm/packages/mobile/node_modules/react-native/ReactCommon/yoga -I/Users/hemantgogia/Documents/hemant/umee/crm/packages/mobile/node_modules/react-native-vision-camera/android/src/main/cpp -isystem /Users/hemantgogia/.gradle/caches/transforms-3/0eba9a168eb8819dccb7829f2ba40fb2/transformed/jetified-hermes-android-0.72.4-debug/prefab/modules/libhermes/include -isystem /Users/hemantgogia/.gradle/caches/transforms-3/6fe00d6361b0f0c55549aec89a7f6742/transformed/jetified-react-android-0.72.4-debug/prefab/modules/folly_runtime/include -isystem /Users/hemantgogia/.gradle/caches/transforms-3/6fe00d6361b0f0c55549aec89a7f6742/transformed/jetified-react-android-0.72.4-debug/prefab/modules/glog/include -isystem /Users/hemantgogia/.gradle/caches/transforms-3/6fe00d6361b0f0c55549aec89a7f6742/transformed/jetified-react-android-0.72.4-debug/prefab/modules/jsi/include -isystem /Users/hemantgogia/.gradle/caches/transforms-3/6fe00d6361b0f0c55549aec89a7f6742/transformed/jetified-react-android-0.72.4-debug/prefab/modules/reactnativejni/include -isystem /Users/hemantgogia/.gradle/caches/transforms-3/34c2120d0d3cd8dc97826fc02c9e8fc4/transformed/jetified-fbjni-0.3.0/prefab/modules/fbjni/include -isystem /Users/hemantgogia/Documents/hemant/umee/crm/packages/mobile/node_modules/react-native-reanimated/android/build/prefab-headers/reanimated -fexceptions -frtti -std=c++1y -DONANDROID -DFOR_HERMES=1 -g  -fno-limit-debug-info -fPIC -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DFOLLY_HAVE_RECVMMSG=1 -DFOLLY_HAVE_PTHREAD=1 -DFOLLY_HAVE_XSI_STRERROR_R=1 -MD -MT CMakeFiles/VisionCamera.dir/src/main/cpp/JSIJNIConversion.cpp.o -MF CMakeFiles/VisionCamera.dir/src/main/cpp/JSIJNIConversion.cpp.o.d -o CMakeFiles/VisionCamera.dir/src/main/cpp/JSIJNIConversion.cpp.o -c /Users/hemantgogia/Documents/hemant/umee/crm/packages/mobile/node_modules/react-native-vision-camera/android/src/main/cpp/JSIJNIConversion.cpp
  In file included from /Users/hemantgogia/Documents/hemant/umee/crm/packages/mobile/node_modules/react-native-vision-camera/android/src/main/cpp/JSIJNIConversion.cpp:17:
  /Users/hemantgogia/.gradle/caches/transforms-3/6fe00d6361b0f0c55549aec89a7f6742/transformed/jetified-react-android-0.72.4-debug/prefab/modules/reactnativejni/include/react/jni/ReadableNativeMap.h:41:3: error: no template named 'optional' in namespace 'std'; did you mean 'folly::Optional'?
    std::optional<folly::dynamic> keys_;
    ^~~~~
  /Users/hemantgogia/.gradle/caches/transforms-3/6fe00d6361b0f0c55549aec89a7f6742/transformed/jetified-react-android-0.72.4-debug/prefab/modules/folly_runtime/include/folly/Optional.h:102:7: note: 'folly::Optional' declared here
  class Optional {
        ^
  1 error generated.
  [8/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/CameraView.cpp.o
  [9/10] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/FrameProcessorRuntimeManager.cpp.o
  ninja: build stopped: subcommand failed.
  
  C++ build system [build] failed while executing:
      /Users/hemantgogia/Library/Android/sdk/cmake/3.22.1/bin/ninja \
        -C \
        /Users/hemantgogia/Documents/hemant/umee/crm/packages/mobile/node_modules/react-native-vision-camera/android/.cxx/Debug/1k4n4t6j/arm64-v8a \
        VisionCamera
    from /Users/hemantgogia/Documents/hemant/umee/crm/packages/mobile/node_modules/react-native-vision-camera/android

Any idea what am i missing here? Thanks.

@lexer Thanks for the response. We’re actively working on it. Reanimated 3.5.0 will expose API that RNVisionCamera v2/v3 will use for frame processors. Any other libraries?

@CelinaJa The PR was merged so you can use react-native-vision-camera@2.16.5.

Just checked latest react-native-vision-camera@2.16.1 and react-native-reanimated@3.5.2 and it works for me! Thank you @tomekzaw for updating C++14 to C++17!

@tomekzaw I wasn’t aware of that. I’ll try to use the carousel library with reanimated 3 and see if that works. Thanks for the answer!

@tomekzaw I’m aware that supporting v2 for 0.72 is quite an effort but I believe there are still quite a bit of issues around v3 which will block upgrading v3 for quite some time… I found another two blocking issues since my last reported issue which I still need to find the time to provide with example projects… These range from random reanimated related crashes to blank screens when navigating between certain screens in my project.

Simply changing the dialect fixes the issue image

I can confirm this does fix it. Only issue is when you have a remote CI server that does a pod install it can’t change the pod file dialect. Can this be a minor release just to change this?

In my project I’m also using is vision-camera

The fix for iOS should be on version v2.17.0

# RNReanimated.podspec

  s.pod_target_xcconfig = {
    "USE_HEADERMAP" => "YES",
    "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/#{folly_prefix}Folly\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\" ",
    "FRAMEWORK_SEARCH_PATHS" => "\"${PODS_CONFIGURATION_BUILD_DIR}/React-hermes\"",
    "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
  }

@tomekzaw We found another blocker for updating to v3… it seems like that the useAnimatedProps hook is broken in v3. I will try to create an issue for that in the next days including an example to reproduce that.

@AlexanderEggers Thanks for quick response. I think it’s way easier for us to resolve this issue than to backport support for 0.72 to v2 😄 Will take a look at it again soon.

any updates?

  1. Upgrade Reanimated to 3.5.1
yarn add react-native-reanimated@^3.5.1
  1. Install RNVisionCamera from this PR: feat: Reanimated v3 support in RNVisionCamera v2 mrousavy/react-native-vision-camera#1759
yarn add tomekzaw/react-native-vision-camera#e323a61d360ba70d30ecf8522e515a6270225db0
  1. Don’t forget to run pod install and yarn start --reset-cache.

For me, this resulted in error Couldn't find match for "e323a61d360ba70d30ecf8522e515a6270225db0" Using yarn add tomekzaw/react-native-vision-camera#refs/heads/v2 instead worked for me! Probably because the PR has been merged.

Bump

For me it is still not working with react-native-vision-camera@2.16.1 and react-native-reanimated@3.5.2 and react-native@0.72.4 , similar to @Romick2005 , but I tried with react-native@0.72.0 and it worked

@hemantgogia09 std::optional was introduced in C++17, can you confirm you’re using it and not C++14? Which version of react-native are you using?

i am using react-native 0.72.4. How do i check which C++ version am i using?

Thanks @tomekzaw

I have tested 3.4.1 and still having the same issue when using react navigation on web with the permanent drawer.

useAnimatedStyle.ts:429 Uncaught Error: useAnimatedStyle was used without a dependency array or Babel plugin. Please explicitly pass a dependency array, or enable the Babel/SWC plugin.

https://github.com/react-navigation/react-navigation/issues/11483

Also created a PR on react navigation but nobody is reviewing it. https://github.com/react-navigation/react-navigation/pull/11496

Is there anything we can do on react-native-reanimated library side?

Cheers

This is also a blocker for us. Any news or workarounds?

I’m seeing the same as @felginep on 0.72.1 and 2.17.0. Looks like that was updated on the main branch in this commit but it was in with all the new-architecture changes so I had trouble finding any clues there

Simply changing the dialect fixes the issue

image

I can confirm this does fix it. Only issue is when you have a remote CI server that does a pod install it can’t change the pod file dialect. Can this be a minor release just to change this?

In my project I’m also using is vision-camera

@tomekzaw I successfully upgraded to v3 (on RN 0.71) so all good for me (I must have already upgraded other packages that had issues with v3 in the past or it’s the latest v3 that fixed it)

Hi @tomekzaw , If I remember well, I think in my case it was an issue with https://github.com/dohooo/react-native-reanimated-carousel maybe with react-native-gesture-handler too