question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Couldn't determine Hermesc location on Android Release

See original GitHub issue

Description

When compiling on Android release mode (debug mode is working) with hermes enabled, the following error is showing, blocking the build

org.gradle.internal.UncheckedException: java.lang.Exception: Couldn't determine Hermesc location. Please set project.ext.react.hermesCommand to the path of the hermesc binary file. node_modules/react-native/sdks/hermesc/%OS-BIN%/hermesc

This is because the folder hermesc, which is the hermes compiler, is missing in the node_modules/react-native/sdks/ folder.

However this folder is present when creating a fresh project with the vanilla react-native template.

A way to workaround this, is indeed to take the folder node_modules/react-native/sdks/hermesc from a fresh generated react-native project and copy it in a react-native-tv one, in the same location.

It would be awesome to include it also in the react-native-tvos package, but we weren’t able to understand the root cause of this issue.

Version

0.69.5-1

Output of npx react-native info

System: OS: macOS 12.6 CPU: (16) x64 Intel® Core™ i9-9880H CPU @ 2.30GHz Memory: 1.02 GB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 14.20.0 - /usr/local/opt/node@14/bin/node Yarn: 1.22.18 - /usr/local/bin/yarn npm: 6.14.17 - /usr/local/opt/node@14/bin/npm Watchman: Not Found Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0 Android SDK: Not Found IDEs: Android Studio: 2021.2 AI-212.5712.43.2112.8609683 Xcode: 14.0/14A309 - /usr/bin/xcodebuild Languages: Java: Not Found npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: Not Found react-native-macos: Not Found react-native-tvos: 0.69.5-1 npmGlobalPackages: react-native: Not Found

Steps to reproduce

  • Create a new project with react-native-tvos template
  • Enable hermes on Android
  • Compile for Android in release mode

Snack, code example, screenshot, or link to a repository

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
douglowdercommented, Sep 28, 2022

Thanks @cortinico ! I’m working on fixing this properly by building hermesc the same way that RN core does, but I wanted to make sure that people were unblocked while I’m getting that done 😃

2reactions
cortinicocommented, Oct 1, 2022

This approach has a LOT of drawbacks (those bins add nearly 50mb to source) and is meant to be SUPER temporary but got me going again, just sharing incase anyone else was looking for an alternative in the meanwhile 👍

Thanks for sharing this. You should be fine by adding a dependency on the react-native package and use hermesc from there though.

For future reference: we’re updating the way how we distribute artifacts with an RFC here: https://github.com/react-native-community/discussions-and-proposals/pull/508 Once we land that, you should be able to just fetch hermesc for a specific version of React Native from the storage source we pick.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error build release (hermes enable) · Issue #34116 - GitHub
Exception: Couldn't determine Hermesc location. Please set project.ext.react.hermesCommand to the path of the hermesc binary file.
Read more >
error building app with hermes - react native - Stack Overflow
Any idea? Updated definition in android/app/build.gradle (following the answer below): project.ext.react = [ enableHermes: true, ...
Read more >
How to: enable Hermes JavaScript engine in your React ...
UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so at ... node_modules/hermes-engine/android/hermes-release.aar") ...
Read more >
Using Hermes - React Native
First, ensure you're using at least version 0.60.4 of React Native to enable Hermes on Android or 0.64 of React Native to enable...
Read more >
Manage your Android device's location settings - Android Help
Learn how to check your Android version. Some of these steps require you to touch the screen. Understand the location settings available on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found