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

🔧 Every now and then vision camera stops building #3360

Open
5 tasks done
agoransson opened this issue Jan 10, 2025 · 2 comments
Open
5 tasks done

🔧 Every now and then vision camera stops building #3360

agoransson opened this issue Jan 10, 2025 · 2 comments
Labels
🔧 build error Issue is related to building VisionCamera in your project

Comments

@agoransson
Copy link

How were you trying to build the app?

npx expo run:android

It seems to me that the project is very fragile; even though it builds at one time. From one day to the other, if the expo server has been shut down in the afternoon - the morning after it will just not build any more. Often with this linking error.

Really stops working without having changed anything. Very odd behavior I think.

Full build logs

 Building app...
Configuration on demand is an incubating feature.

> Configure project :app
 ℹ️  Applying gradle plugin 'expo-dev-launcher-gradle-plugin' (expo-dev-launcher@5.0.21)

> Configure project :shopify_react-native-skia
react-native-skia: node_modules/ found at: /Users/agoransson/Projects/ReactNativeProject/my-app/node_modules
react-native-skia: RN Version: 76 / 0.76.5
react-native-skia: isSourceBuild: false
react-native-skia: PrebuiltDir: /Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/@shopify/react-native-skia/android/build/react-native-0*/jni
react-native-skia: buildType: debug
react-native-skia: buildDir: /Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/@shopify/react-native-skia/android/build
react-native-skia: node_modules: /Users/agoransson/Projects/ReactNativeProject/my-app/node_modules
react-native-skia: Enable Prefab: true
react-native-skia: aar state post 70, do nothing

> Configure project :expo

Using expo modules
  - expo-asset (11.0.1)
  - expo-constants (17.0.3)
  - expo-crypto (14.0.1)
  - expo-dev-client (5.0.8)
  - expo-dev-launcher (5.0.21)
  - expo-dev-menu (6.0.15)
  - expo-file-system (18.0.6)
  - expo-font (13.0.2)
  - expo-image-loader (5.0.0)
  - expo-image-manipulator (13.0.5)
  - expo-json-utils (0.14.0)
  - expo-keep-awake (14.0.1)
  - expo-linear-gradient (14.0.1)
  - expo-manifests (0.15.4)
  - expo-modules-core (2.1.2)


> Configure project :react-native-reanimated
Android gradle plugin: 8.6.0
Gradle: 8.10.2

> Configure project :react-native-vision-camera
[VisionCamera] Thank you for using VisionCamera ❤️
[VisionCamera] If you enjoy using VisionCamera, please consider sponsoring this project: https://github.com/sponsors/mrousavy
[VisionCamera] node_modules found at /Users/agoransson/Projects/ReactNativeProject/my-app/node_modules
[VisionCamera] VisionCamera_enableFrameProcessors is set to true!
[VisionCamera] react-native-worklets-core found, Frame Processors are enabled!
[VisionCamera] VisionCamera_enableCodeScanner is set to false!

> Task :react-native-vision-camera:generateCodegenSchemaFromJavaScript
No modules to process in combine-js-to-schema-cli. If this is unexpected, please check if you set up your NativeComponent correctly. See combine-js-to-schema.js for how codegen finds modules.
The Daemon will expire after the build after running out of JVM Metaspace.
The project memory settings are likely not configured or are configured to an insufficient value.
The daemon will restart for the next build, which may increase subsequent build times.
These settings can be adjusted by setting 'org.gradle.jvmargs' in 'gradle.properties'.
The currently configured max heap space is '2 GiB' and the configured max metaspace is '512 MiB'.
For more information on how to set these values, please refer to https://docs.gradle.org/8.10.2/userguide/build_environment.html#sec:configuring_jvm_memory in the Gradle documentation.
To disable this warning, set 'org.gradle.daemon.performance.disable-logging=true'.
Daemon will be stopped at the end of the build after running out of JVM Metaspace

> Task :react-native-vision-camera:configureCMakeDebug[arm64-v8a]
C/C++: VisionCamera: Frame Processors: ON!
C/C++: VisionCamera: Linking react-native-worklets...

> Task :shopify_react-native-skia:configureCMakeDebug[arm64-v8a]
C/C++: -- ABI     : arm64-v8a
C/C++: -- PREBUILT: /Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/@shopify/react-native-skia/android/build/react-native-0*/jni
C/C++: -- BUILD   : /Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/@shopify/react-native-skia/android/build
C/C++: -- LIBRN   : 
C/C++: -- LOG     : /Users/agoransson/Library/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/aarch64-linux-android/30/liblog.so
C/C++: -- JSI     : ReactAndroid::jsi
C/C++: -- REACT   : ReactAndroid::reactnative
C/C++: -- FBJNI   : fbjni::fbjni
C/C++: -- REACTNATIVEJNI   : 
C/C++: -- RUNTIMEEXECUTOR   : 
C/C++: -- TURBO   : 

> Task :react-native-vision-camera:buildCMakeDebug[arm64-v8a] FAILED
C/C++: ninja: Entering directory `/Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-vision-camera/android/.cxx/Debug/ik5j2822/arm64-v8a'
C/C++: : && /Users/agoransson/Library/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android30 --sysroot=/Users/agoransson/Library/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -O2 -frtti -fexceptions -Wall -Wno-unused-variable -fstack-protector-all -fno-limit-debug-info  -Wl,--build-id=sha1 -Wl,--no-undefined-version -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments -shared -Wl,-soname,libVisionCamera.so -o ../../../../build/intermediates/cxx/Debug/ik5j2822/obj/arm64-v8a/libVisionCamera.so CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/MutableJByteBuffer.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/FrameHostObject.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/FrameProcessorPluginHostObject.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/JSIJNIConversion.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/VisionCameraProxy.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JSharedArray.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JFrame.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JFrameProcessor.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JFrameProcessorPlugin.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraScheduler.cpp.o  /Users/agoransson/Library/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/aarch64-linux-android/30/liblog.so  -landroid  /Users/agoransson/.gradle/caches/8.10.2/transforms/2d3383677a20abf09e73ba3033a9c3f2/transformed/react-android-0.76.5-debug/prefab/modules/jsi/libs/android.arm64-v8a/libjsi.so  /Users/agoransson/.gradle/caches/8.10.2/transforms/5eafb776107853e45c4ec8a0eea020f9/transformed/fbjni-0.6.0/prefab/modules/fbjni/libs/android.arm64-v8a/libfbjni.so  /Users/agoransson/.gradle/caches/8.10.2/transforms/2d3383677a20abf09e73ba3033a9c3f2/transformed/react-android-0.76.5-debug/prefab/modules/reactnative/libs/android.arm64-v8a/libreactnative.so  -latomic -lm && :
C/C++: ld.lld: error: undefined symbol: RNWorklet::JsiWorkletContext::getWorkletRuntime()
C/C++: >>> referenced by JFrameProcessor.cpp:37 (/Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-vision-camera/android/src/main/cpp/frameprocessors/java-bindings/JFrameProcessor.cpp:37)
C/C++: >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JFrameProcessor.cpp.o:(vision::JFrameProcessor::callWithFrameHostObject(std::__ndk1::shared_ptr<vision::FrameHostObject> const&) const)
C/C++: >>> referenced by JVisionCameraProxy.h:42 (/Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-vision-camera/android/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.h:42)
C/C++: >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JSharedArray.cpp.o:(vision::JSharedArray::JSharedArray(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<vision::JSharedArray, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*> const&, facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<vision::JVisionCameraProxy, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*> const&, facebook::jni::alias_ref<facebook::jni::JByteBuffer>))
C/C++: ld.lld: error: undefined symbol: RNWorklet::JsiWorkletContext::initialize(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::jsi::Runtime*, std::__ndk1::function<void (std::__ndk1::function<void ()>&&)>, std::__ndk1::function<void (std::__ndk1::function<void ()>&&)>)
C/C++: >>> referenced by JVisionCameraProxy.cpp:45 (/Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-vision-camera/android/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp:45)
C/C++: >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o:(vision::JVisionCameraProxy::JVisionCameraProxy(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<vision::JVisionCameraProxy, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*> const&, facebook::jsi::Runtime*, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&, facebook::jni::basic_strong_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<vision::JVisionCameraScheduler, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*, facebook::jni::GlobalReferenceAllocator> const&))
C/C++: ld.lld: error: undefined symbol: RNWorklet::RuntimeLifecycleMonitor::addListener(facebook::jsi::Runtime&, RNWorklet::RuntimeLifecycleListener*)
C/C++: >>> referenced by WKTRuntimeAwareCache.h:46 (/Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-worklets-core/android/build/headers/rnworklets/react-native-worklets-core/WKTRuntimeAwareCache.h:46)
C/C++: >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JFrameProcessor.cpp.o:(RNWorklet::RuntimeAwareCache<std::__ndk1::shared_ptr<facebook::jsi::Function>>::get(facebook::jsi::Runtime&))
C/C++: ld.lld: error: undefined symbol: RNWorklet::RuntimeLifecycleMonitor::removeListener(facebook::jsi::Runtime&, RNWorklet::RuntimeLifecycleListener*)
C/C++: >>> referenced by WKTRuntimeAwareCache.h:37 (/Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-worklets-core/android/build/headers/rnworklets/react-native-worklets-core/WKTRuntimeAwareCache.h:37)
C/C++: >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JFrameProcessor.cpp.o:(RNWorklet::RuntimeAwareCache<std::__ndk1::shared_ptr<facebook::jsi::Function>>::~RuntimeAwareCache())
C/C++: ld.lld: error: undefined symbol: RNWorklet::JsiWorkletContext::JsiWorkletContext(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&)
C/C++: >>> referenced by shared_ptr.h:279 (/Users/agoransson/Library/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/__memory/shared_ptr.h:279)
C/C++: >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o:(std::__ndk1::__shared_ptr_emplace<RNWorklet::JsiWorkletContext, std::__ndk1::allocator<RNWorklet::JsiWorkletContext>>::__shared_ptr_emplace[abi:v170000]<char const (&) [13]>(std::__ndk1::allocator<RNWorklet::JsiWorkletContext>, char const (&) [13]))
C/C++: ld.lld: error: undefined symbol: RNWorklet::JsiHostObject::JsiHostObject()
C/C++: >>> referenced by WKTJsiWorklet.h:82 (/Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-worklets-core/android/build/headers/rnworklets/react-native-worklets-core/WKTJsiWorklet.h:82)
C/C++: >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o:(RNWorklet::JsiWorklet::JsiWorklet(facebook::jsi::Runtime&, std::__ndk1::shared_ptr<facebook::jsi::Function>))
C/C++: ld.lld: error: undefined symbol: RNWorklet::JsiHostObject::~JsiHostObject()
C/C++: >>> referenced by WKTJsiWorklet.h:84 (/Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-worklets-core/android/build/headers/rnworklets/react-native-worklets-core/WKTJsiWorklet.h:84)
C/C++: >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o:(RNWorklet::JsiWorklet::JsiWorklet(facebook::jsi::Runtime&, std::__ndk1::shared_ptr<facebook::jsi::Function>))
C/C++: >>> referenced by WKTJsiWorklet.h:75 (/Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-worklets-core/android/build/headers/rnworklets/react-native-worklets-core/WKTJsiWorklet.h:75)
C/C++: >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o:(RNWorklet::JsiWorklet::~JsiWorklet())
C/C++: ld.lld: error: undefined symbol: RNWorklet::JsiWrapper::wrap(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWrapper*, bool)
C/C++: >>> referenced by WKTJsiWrapper.h:72 (/Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-worklets-core/android/build/headers/rnworklets/react-native-worklets-core/WKTJsiWrapper.h:72)
C/C++: >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o:(RNWorklet::JsiWorklet::createWorklet(facebook::jsi::Runtime&, std::__ndk1::shared_ptr<facebook::jsi::Function>))
C/C++: ld.lld: error: undefined symbol: RNWorklet::JsiHostObject::get(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&)
C/C++: >>> referenced by JVisionCameraProxy.cpp
C/C++: >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o:(vtable for RNWorklet::JsiWorklet)
C/C++: ld.lld: error: undefined symbol: RNWorklet::JsiHostObject::set(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&, facebook::jsi::Value const&)
C/C++: >>> referenced by JVisionCameraProxy.cpp
C/C++: >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o:(vtable for RNWorklet::JsiWorklet)
C/C++: ld.lld: error: undefined symbol: RNWorklet::JsiHostObject::getPropertyNames(facebook::jsi::Runtime&)
C/C++: >>> referenced by JVisionCameraProxy.cpp
C/C++: >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o:(vtable for RNWorklet::JsiWorklet)
C/C++: ld.lld: error: undefined symbol: typeinfo for RNWorklet::JsiHostObject
C/C++: >>> referenced by JVisionCameraProxy.cpp
C/C++: >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o:(typeinfo for RNWorklet::JsiWorklet)
C/C++: clang++: error: linker command failed with exit code 1 (use -v to see invocation)
C/C++: ninja: build stopped: subcommand failed.

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/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-vision-camera/android/.cxx/Debug/ik5j2822/arm64-v8a'
  [1/13] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JFrameProcessorPlugin.cpp.o
  [2/13] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/MutableJByteBuffer.cpp.o
  [3/13] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JFrame.cpp.o
  [4/13] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/FrameProcessorPluginHostObject.cpp.o
  [5/13] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o
  [6/13] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraScheduler.cpp.o
  [7/13] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JSharedArray.cpp.o
  [8/13] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JFrameProcessor.cpp.o
  [9/13] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/VisionCameraProxy.cpp.o
  [10/13] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/FrameHostObject.cpp.o
  [11/13] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/JSIJNIConversion.cpp.o
  [12/13] Building CXX object CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o
  [13/13] Linking CXX shared library ../../../../build/intermediates/cxx/Debug/ik5j2822/obj/arm64-v8a/libVisionCamera.so
  FAILED: ../../../../build/intermediates/cxx/Debug/ik5j2822/obj/arm64-v8a/libVisionCamera.so 
  : && /Users/agoransson/Library/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android30 --sysroot=/Users/agoransson/Library/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security  -O2 -frtti -fexceptions -Wall -Wno-unused-variable -fstack-protector-all -fno-limit-debug-info  -Wl,--build-id=sha1 -Wl,--no-undefined-version -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments -shared -Wl,-soname,libVisionCamera.so -o ../../../../build/intermediates/cxx/Debug/ik5j2822/obj/arm64-v8a/libVisionCamera.so CMakeFiles/VisionCamera.dir/src/main/cpp/VisionCamera.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/MutableJByteBuffer.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/FrameHostObject.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/FrameProcessorPluginHostObject.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/JSIJNIConversion.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/VisionCameraProxy.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JSharedArray.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JFrame.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JFrameProcessor.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JFrameProcessorPlugin.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraScheduler.cpp.o  /Users/agoransson/Library/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/aarch64-linux-android/30/liblog.so  -landroid  /Users/agoransson/.gradle/caches/8.10.2/transforms/2d3383677a20abf09e73ba3033a9c3f2/transformed/react-android-0.76.5-debug/prefab/modules/jsi/libs/android.arm64-v8a/libjsi.so  /Users/agoransson/.gradle/caches/8.10.2/transforms/5eafb776107853e45c4ec8a0eea020f9/transformed/fbjni-0.6.0/prefab/modules/fbjni/libs/android.arm64-v8a/libfbjni.so  /Users/agoransson/.gradle/caches/8.10.2/transforms/2d3383677a20abf09e73ba3033a9c3f2/transformed/react-android-0.76.5-debug/prefab/modules/reactnative/libs/android.arm64-v8a/libreactnative.so  -latomic -lm && :
  ld.lld: error: undefined symbol: RNWorklet::JsiWorkletContext::getWorkletRuntime()
  >>> referenced by JFrameProcessor.cpp:37 (/Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-vision-camera/android/src/main/cpp/frameprocessors/java-bindings/JFrameProcessor.cpp:37)
  >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JFrameProcessor.cpp.o:(vision::JFrameProcessor::callWithFrameHostObject(std::__ndk1::shared_ptr<vision::FrameHostObject> const&) const)
  >>> referenced by JVisionCameraProxy.h:42 (/Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-vision-camera/android/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.h:42)
  >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JSharedArray.cpp.o:(vision::JSharedArray::JSharedArray(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<vision::JSharedArray, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*> const&, facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<vision::JVisionCameraProxy, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*> const&, facebook::jni::alias_ref<facebook::jni::JByteBuffer>))
  
  ld.lld: error: undefined symbol: RNWorklet::JsiWorkletContext::initialize(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&, facebook::jsi::Runtime*, std::__ndk1::function<void (std::__ndk1::function<void ()>&&)>, std::__ndk1::function<void (std::__ndk1::function<void ()>&&)>)
  >>> referenced by JVisionCameraProxy.cpp:45 (/Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-vision-camera/android/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp:45)
  >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o:(vision::JVisionCameraProxy::JVisionCameraProxy(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<vision::JVisionCameraProxy, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*> const&, facebook::jsi::Runtime*, std::__ndk1::shared_ptr<facebook::react::CallInvoker> const&, facebook::jni::basic_strong_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<vision::JVisionCameraScheduler, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*, facebook::jni::GlobalReferenceAllocator> const&))
  
  ld.lld: error: undefined symbol: RNWorklet::RuntimeLifecycleMonitor::addListener(facebook::jsi::Runtime&, RNWorklet::RuntimeLifecycleListener*)
  >>> referenced by WKTRuntimeAwareCache.h:46 (/Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-worklets-core/android/build/headers/rnworklets/react-native-worklets-core/WKTRuntimeAwareCache.h:46)
  >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JFrameProcessor.cpp.o:(RNWorklet::RuntimeAwareCache<std::__ndk1::shared_ptr<facebook::jsi::Function>>::get(facebook::jsi::Runtime&))
  
  ld.lld: error: undefined symbol: RNWorklet::RuntimeLifecycleMonitor::removeListener(facebook::jsi::Runtime&, RNWorklet::RuntimeLifecycleListener*)
  >>> referenced by WKTRuntimeAwareCache.h:37 (/Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-worklets-core/android/build/headers/rnworklets/react-native-worklets-core/WKTRuntimeAwareCache.h:37)
  >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JFrameProcessor.cpp.o:(RNWorklet::RuntimeAwareCache<std::__ndk1::shared_ptr<facebook::jsi::Function>>::~RuntimeAwareCache())
  
  ld.lld: error: undefined symbol: RNWorklet::JsiWorkletContext::JsiWorkletContext(std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&)
  >>> referenced by shared_ptr.h:279 (/Users/agoransson/Library/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/__memory/shared_ptr.h:279)
  >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o:(std::__ndk1::__shared_ptr_emplace<RNWorklet::JsiWorkletContext, std::__ndk1::allocator<RNWorklet::JsiWorkletContext>>::__shared_ptr_emplace[abi:v170000]<char const (&) [13]>(std::__ndk1::allocator<RNWorklet::JsiWorkletContext>, char const (&) [13]))
  
  ld.lld: error: undefined symbol: RNWorklet::JsiHostObject::JsiHostObject()
  >>> referenced by WKTJsiWorklet.h:82 (/Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-worklets-core/android/build/headers/rnworklets/react-native-worklets-core/WKTJsiWorklet.h:82)
  >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o:(RNWorklet::JsiWorklet::JsiWorklet(facebook::jsi::Runtime&, std::__ndk1::shared_ptr<facebook::jsi::Function>))
  
  ld.lld: error: undefined symbol: RNWorklet::JsiHostObject::~JsiHostObject()
  >>> referenced by WKTJsiWorklet.h:84 (/Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-worklets-core/android/build/headers/rnworklets/react-native-worklets-core/WKTJsiWorklet.h:84)
  >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o:(RNWorklet::JsiWorklet::JsiWorklet(facebook::jsi::Runtime&, std::__ndk1::shared_ptr<facebook::jsi::Function>))
  >>> referenced by WKTJsiWorklet.h:75 (/Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-worklets-core/android/build/headers/rnworklets/react-native-worklets-core/WKTJsiWorklet.h:75)
  >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o:(RNWorklet::JsiWorklet::~JsiWorklet())
  
  ld.lld: error: undefined symbol: RNWorklet::JsiWrapper::wrap(facebook::jsi::Runtime&, facebook::jsi::Value const&, RNWorklet::JsiWrapper*, bool)
  >>> referenced by WKTJsiWrapper.h:72 (/Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-worklets-core/android/build/headers/rnworklets/react-native-worklets-core/WKTJsiWrapper.h:72)
  >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o:(RNWorklet::JsiWorklet::createWorklet(facebook::jsi::Runtime&, std::__ndk1::shared_ptr<facebook::jsi::Function>))
  
  ld.lld: error: undefined symbol: RNWorklet::JsiHostObject::get(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&)
  >>> referenced by JVisionCameraProxy.cpp
  >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o:(vtable for RNWorklet::JsiWorklet)
  
  ld.lld: error: undefined symbol: RNWorklet::JsiHostObject::set(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&, facebook::jsi::Value const&)
  >>> referenced by JVisionCameraProxy.cpp
  >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o:(vtable for RNWorklet::JsiWorklet)
  
  ld.lld: error: undefined symbol: RNWorklet::JsiHostObject::getPropertyNames(facebook::jsi::Runtime&)
  >>> referenced by JVisionCameraProxy.cpp
  >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o:(vtable for RNWorklet::JsiWorklet)
  
  ld.lld: error: undefined symbol: typeinfo for RNWorklet::JsiHostObject
  >>> referenced by JVisionCameraProxy.cpp
  >>>               CMakeFiles/VisionCamera.dir/src/main/cpp/frameprocessors/java-bindings/JVisionCameraProxy.cpp.o:(typeinfo for RNWorklet::JsiWorklet)
  clang++: error: linker command failed with exit code 1 (use -v to see invocation)
  ninja: build stopped: subcommand failed.
  
  C++ build system [build] failed while executing:
      /Users/agoransson/Library/Android/sdk/cmake/3.22.1/bin/ninja \
        -C \
        /Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-vision-camera/android/.cxx/Debug/ik5j2822/arm64-v8a \
        VisionCamera
    from /Users/agoransson/Projects/ReactNativeProject/my-app/node_modules/react-native-vision-camera/android

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.10.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 21s
598 actionable tasks: 241 executed, 336 from cache, 21 up-to-date

Project dependencies

"dependencies": {
    "@eva-design/eva": "^2.2.0",
    "@expo-google-fonts/inter": "^0.2.3",
    "@react-native-async-storage/async-storage": "1.23.1",
    "@react-native-community/hooks": "^3.0.0",
    "@react-navigation/bottom-tabs": "^7.1.3",
    "@react-navigation/native": "^7.0.13",
    "@react-navigation/stack": "^7.0.18",
    "@shopify/react-native-skia": "1.5.0",
    "@ui-kitten/components": "^5.3.1",
    "@ui-kitten/date-fns": "^5.3.1",
    "@ui-kitten/eva-icons": "^5.3.1",
    "@ui-kitten/moment": "^5.3.1",
    "expo": "^52.0.23",
    "expo-build-properties": "~0.13.1",
    "expo-crypto": "~14.0.1",
    "expo-dev-client": "~5.0.5",
    "expo-file-system": "~18.0.6",
    "expo-font": "~13.0.1",
    "expo-image-manipulator": "~13.0.5",
    "expo-linear-gradient": "~14.0.1",
    "expo-status-bar": "~2.0.0",
    "firebase": "^11.0.2",
    "install": "^0.13.0",
    "react": "18.3.1",
    "react-native": "0.76.5",
    "react-native-gesture-handler": "~2.20.2",
    "react-native-gifted-charts": "^1.4.53",
    "react-native-paper": "^5.12.5",
    "react-native-photo-manipulator": "^1.9.1",
    "react-native-reanimated": "^3.16.3",
    "react-native-safe-area-context": "4.12.0",
    "react-native-svg": "15.8.0",
    "react-native-vision-camera": "^4.6.3",
    "react-native-worklets-core": "^1.5.0",
    "styled-components": "^6.1.13"
  },

VisionCamera Version

4.6.3

Target platforms

Android

Operating system

MacOS

Can you build the VisionCamera Example app?

I didn't try (⚠️ your issue might get ignored & closed if you don't try this)

Additional information

@agoransson agoransson added the 🔧 build error Issue is related to building VisionCamera in your project label Jan 10, 2025
Copy link

Guten Tag, Hans here 🍻!

Thank you for your detailed report. The issue you're facing seems quite complicated, and those build errors with undefined symbols can often stem from mismatched versions of dependencies.

Have you tried cleaning your project and re-installing your node modules? You can try the following commands:

cd your-project-directory
rm -rf node_modules
npm install
npx expo start -c

Also, make sure that all your dependencies, especially react-native-worklets-core and react-native-vision-camera, are compatible with your React Native version. Please check the Troubleshooting Guide once more to see if any steps might have been overlooked.

If the issue persists, please consider building the VisionCamera Example app to see if the problem exists there as well. This can help narrow down whether the issue is related to your setup or something else.

If you find this project helpful, consider sponsoring to help mrousavy spend more time on it!

Let's hope we can sort this out soon!

Note: If you think I made a mistake, please ping @mrousavy to take a look.

@agoransson
Copy link
Author

Yes Hans. My usual attempts include cleaning node_modules, running expo-doctor, checking installed versions (expo install --check). Sometimes it starts to build again, but I can't find the combination of steps that always makes it work again.

It still seems random how I manage to get it building again. Tonight I managed by cleaning the gradle cache and removing node_modules. Earlier it worked from removing node_modules. Some days ago I think the final step was running expo install --check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔧 build error Issue is related to building VisionCamera in your project
Projects
None yet
Development

No branches or pull requests

1 participant