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

ninja: error: /arm64-v8a/libhermes.so', needed by /arm64-v8a/libreanimated.so #3594

Closed
imadarif opened this issue Sep 21, 2022 · 19 comments
Closed
Labels
Close when stale This issue is going to be closed when there is no activity for a while Missing info The user didn't precise the problem enough Missing repro This issue need minimum repro scenario Needs review Issue is ready to be reviewed by a maintainer Platform: Android This issue is specific to Android

Comments

@imadarif
Copy link

Description

gradlew assembleRelease

getting this error after update from 0.69 to 0.70

execution failed for task ':react-native-reanimated:buildCMakeRelWithDebInfo[arm64-v8a]'.

Build command failed.
Error while executing process C:\Users\ABC\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe with arguments {-C D:\app\myapp\node_modules\react-native-reanimated\android.cxx\RelWithDebInfo\l4546g3a\arm64-v8a reanimated}
ninja: Entering directory `D:\app\myapp\node_modules\react-native-reanimated\android.cxx\RelWithDebInfo\l4546g3a\arm64-v8a'
[0/2] Re-checking globbed directories...

ninja: error: '../../../../build/third-party-ndk/hermes/jni/arm64-v8a/libhermes.so', needed by 'D:/app/myapp/android/build/react-native-reanimated/intermediates/cxx/RelWithDebInfo/l4546g3a/obj/arm64-v8a/libreanimated.so', missing and no known rule to make it

Steps to reproduce

1.updated to 0.70 and added reanimated plugin 3.0.0.rc
2.just run the command gradlew assembleRelease

Snack or a link to a repository

Reanimated version

3.0.0-rc.2

React Native version

0.70.0

Platforms

Android

JavaScript runtime

No response

Workflow

No response

Architecture

No response

Build type

Release mode

Device

No response

Device model

No response

Acknowledgements

Yes

@imadarif imadarif added the Needs review Issue is ready to be reviewed by a maintainer label Sep 21, 2022
@github-actions github-actions bot added the Missing info The user didn't precise the problem enough label Sep 21, 2022
@github-actions
Copy link

Hey! 👋

It looks like you've omitted a few important sections from the issue template.

Please complete Snack or a link to a repository section.

@github-actions github-actions bot added Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android labels Sep 21, 2022
@github-actions
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@imadarif
Copy link
Author

i have try 2.10.0 react-native-reanimated version still same error.

@imadarif
Copy link
Author

i have enabled the newArchEnabled=true now i got this error

Task :ReactAndroid:hermes-engine:buildCMakeMinSizeRel[arm64-v8a][libhermes] FAILED
C/C++: ninja: error: 'E:/app/android/build/hermes-engine/hermes/bin/MinSizeRel/hermesc.exe', needed by 'lib/InternalBytecode/InternalBytecode.hbc', missing and no known rule to make it

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong:
    Execution failed for task ':ReactAndroid:hermes-engine:buildCMakeMinSizeRel[arm64-v8a][libhermes]'.

Build command failed.
Error while executing process C:\Users\ImadArif\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe with arguments {-C E:\app\node_modules\react-native\ReactAndroid\hermes-engine.cxx\MinSizeRel\g4kh2x3g\arm64-v8a libhermes}
ninja: Entering directory `E:\app\node_modules\react-native\ReactAndroid\hermes-engine.cxx\MinSizeRel\g4kh2x3g\arm64-v8a'

ninja: error: 'E:/app/android/build/hermes-engine/hermes/bin/MinSizeRel/hermesc.exe', needed by 'lib/InternalBytecode/InternalBytecode.hbc', missing and no known rule to make it

@imadarif
Copy link
Author

@tomekzaw

@tomekzaw
Copy link
Member

Hey @imadarif, thanks for submitting this issue. We haven't tried building Reanimated for Fabric on Windows yet. We will investigate this issue further.

@imadarif
Copy link
Author

any update ? anyone facing same issue ?

@nstoilov
Copy link

Similar error for Reanimated version 2.12.0, React Native 0.70.0, Hermes is enabled, new architecture is disabled.

Error: Exception in HostFunction: java.lang.UnsatisfiedLinkError: dlopen failed: library "libhermes.so" not found: needed by /data/app/~~XLzcAWvZW74v17XLxLYmtA==/com.advanceauto.mobile.commerce.local-tpxfJH4-ba2k20CvuTb8WQ==/base.apk!/lib/x86/libreanimated.so in namespace classloader-namespace

works fine on iOS, error is only for Android.

@tomekzaw
Copy link
Member

Hey @nstoilov, can you check if lib/x86/libhermes.so exists in the .apk file?

@jon-moreira
Copy link

I have the same issue after update the react-native-reanimated to the latest version. Current solution, rollback to the version 2.9.1

@tomekzaw
Copy link
Member

tomekzaw commented Oct 28, 2022

Hey @expouic, can you check if lib/x86/libhermes.so exists in the .apk file?

@jon-moreira
Copy link

Even with version 2.9.1 and react-native version 0.68.1 I can't run the release build. Got this error:

com.facebook.jni.CppException: Could not get BatchedBridge, make sure your bundle is packaged correctly

Debug versions works fine with both versions!

@tomekzaw libhermes.so no! But have this two libhermes-executor-debug.so and libhermes-executor-release.so
Screenshot 2022-10-30 at 10 16 07

@nstoilov
Copy link

nstoilov commented Nov 2, 2022

Hey @nstoilov, can you check if lib/x86/libhermes.so exists in the .apk file?

No, I generated and unzipped an apk, libhermes.so is not there.

@tomekzaw
Copy link
Member

tomekzaw commented Nov 2, 2022

Hey, unfortunately I wasn't able to reproduce this issue. Here's what I did:

npx react-native@next init MyApp --version 0.70.0
cd MyApp
yarn add react-native-reanimated@2.12.0
cd android
./gradlew installRelease

I'm building the app on a M1 Pro. What OS are you on? @nstoilov @expouic

@nstoilov
Copy link

nstoilov commented Nov 2, 2022

Mac OS 12.6, i7 processor @tomekzaw

@tomekzaw
Copy link
Member

tomekzaw commented Nov 2, 2022

@nstoilov Okay, thanks. Have you tried building Reanimated with a fresh RN 0.70.0 app like I did?

@nstoilov
Copy link

nstoilov commented Nov 3, 2022

@tomekzaw runs fine with a clean app...
Any suggestions what could be causing this in our app?

edit - looks like it's on our end.

@migueldaipre
Copy link
Contributor

@tomekzaw I'm facing the same problem with
RN 0.70.6
Hermes true
proguard enabled

Do you have any idea?

E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules Process: com.x, PID: 858 g4.c: Error: Exception in HostFunction: java.lang.UnsatisfiedLinkError: dlopen failed: library "libhermes-executor-debug.so" not found: needed by /data/app/~~Ns2koKqLBQX7wBUnu4tVuQ==/com.x-AIBSl2ICRWAREL01a4QKbg==/lib/arm64/libreanimated.so in namespace classloader-namespace, js engine: hermes, stack:

I have realmjs installed and saw this

@Latropos Latropos added the Close when stale This issue is going to be closed when there is no activity for a while label Oct 23, 2023
@krmao
Copy link

krmao commented Nov 9, 2023

I found the key, change jdk version from 17 to 11

@github-actions github-actions bot removed the Close when stale This issue is going to be closed when there is no activity for a while label Nov 9, 2023
@Latropos Latropos added the Close when stale This issue is going to be closed when there is no activity for a while label Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Close when stale This issue is going to be closed when there is no activity for a while Missing info The user didn't precise the problem enough Missing repro This issue need minimum repro scenario Needs review Issue is ready to be reviewed by a maintainer Platform: Android This issue is specific to Android
Projects
None yet
Development

No branches or pull requests

7 participants