react-native icon indicating copy to clipboard operation
react-native copied to clipboard

ReactAndroid:hermes-engine:configureBuildForHermes FAILED

Open codingSir opened this issue 2 years ago • 8 comments

New Version

0.70.1

Old Version

0.69.0

Build Target(s)

android

Output of react-native info

System: OS: Windows 10 10.0.19043 CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz Memory: 1.86 GB / 15.75 GB Binaries: Node: 16.13.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.17 - C:\Program Files\nodejs\yarn.CMD npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: AllowDevelopmentWithoutDevLicense: Enabled IDEs: Android Studio: Not Found Visual Studio: Not Found Languages: Java: 11.0.15 - C:\Program Files\Common Files\Oracle\Java\javapath\javac.EXE npmPackages: @react-native-community/cli: Not Found react: 18.1.0 => 18.1.0 react-native: 0.70.1 => 0.70.1 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found

Issue and Reproduction Steps

Task :ReactAndroid:hermes-engine:downloadHermes UP-TO-DATE Download https://github.com/facebook/hermes/tarball/hermes-2022-09-14-RNv0.70.1-2a6b111ab289b55d7b78b5fdf105f466ba270fd7

Task :ReactAndroid:hermes-engine:configureBuildForHermes FAILED -- Configuring incomplete, errors occurred!

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

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

See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings 24 actionable tasks: 1 executed, 23 up-to-date

codingSir avatar Oct 15 '22 12:10 codingSir

info Starting JS server...
info Installing the app...
> Task :app:generateDebugBuildConfig FAILED

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

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

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
7 actionable tasks: 2 executed, 5 up-to-date

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.        
-----------
* What went wrong:
Execution failed for task ':app:generateDebugBuildConfig'.
> Unable to delete directory 'C:\Users\User\Desktop\PGRM\React-Native\*\*\android\app\build\generated\source\buildConfig\debug\com' after 10 attempts

* 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.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

* 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.
==============================================================================

Dancrf avatar Oct 15 '22 19:10 Dancrf

0.70.1

@codingSir Please update to 0.70.3 We've fixed some of the failures you're facing on Windows specifically on that release.

cortinico avatar Oct 17 '22 11:10 cortinico

acing on Windows specifically on that release.

im update to 0.70.3 ,it is still " Task :ReactAndroid:hermes-engine:configureBuildForHermes FAILED"

Garthguo avatar Oct 17 '22 13:10 Garthguo

We need the full error log as we can't help further here.

cortinico avatar Oct 17 '22 13:10 cortinico

We need the full error log as we can't help further here.

I use the npx react native init Awesome Project. This project is version 0.70.3, but there is still a problem

---- error log---

> [email protected] android
> react-native run-android

info JS server already running.
info Installing the app...
Starting a Gradle Daemon (subsequent builds will be faster)

> Task :ReactAndroid:downloadDoubleConversion UP-TO-DATE
Download https://github.com/google/double-conversion/archive/v1.1.6.tar.gz

> Task :ReactAndroid:downloadFmt UP-TO-DATE
Download https://github.com/fmtlib/fmt/archive/6.2.1.tar.gz

> Task :ReactAndroid:downloadBoost UP-TO-DATE
Download https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz

> Task :ReactAndroid:downloadFolly UP-TO-DATE
Download https://github.com/facebook/folly/archive/v2021.07.22.00.tar.gz

> Task :ReactAndroid:downloadGlog UP-TO-DATE
Download https://github.com/google/glog/archive/v0.3.5.tar.gz

> Task :ReactAndroid:downloadLibevent UP-TO-DATE
Download https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz

> Task :ReactAndroid:hermes-engine:downloadHermes UP-TO-DATE
Download https://github.com/facebook/hermes/tarball/hermes-2022-09-14-RNv0.70.1-2a6b111ab289b55d7b78b5fdf105f466ba270fd

> Task :ReactAndroid:hermes-engine:configureBuildForHermes FAILED
-- Configuring incomplete, errors occurred!

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

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

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
24 actionable tasks: 1 executed, 23 up-to-date
CMake Error at CMakeLists.txt:1:
  Parse error.  Expected a command name, got unquoted argument with text
  "b".



FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':ReactAndroid:hermes-engine:configureBuildForHermes'.
> Process 'command 'cmd'' finished with non-zero exit value 1

* 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.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

* 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

BUILD FAILED in 23s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
CMake Error at CMakeLists.txt:1:
  Parse error.  Expected a command name, got unquoted argument with text
  "b".



FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':ReactAndroid:hermes-engine:configureBuildForHermes'.
> Process 'command 'cmd'' finished with non-zero exit value 1

* 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.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

* 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

BUILD FAILED in 23s

    at makeError (E:\react-native\AwesomeProject\node_modules\execa\index.js:174:9)
    at E:\react-native\AwesomeProject\node_modules\execa\index.js:278:16
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async runOnAllDevices (E:\react-native\AwesomeProject\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
    at async Command.handleAction (E:\react-native\AwesomeProject\node_modules\@react-native-community\cli\build\index.js:142:9)
info Run CLI with --verbose flag for more details.

codingSir avatar Oct 18 '22 01:10 codingSir

This project is version 0.70.3, but there is still a problem

Is this a blank project?

I see the error is:

Parse error. Expected a command name, got unquoted argument with text "b�".

So I'm wondering if you applied some custom configuration to your CMake file

cortinico avatar Oct 18 '22 09:10 cortinico

This project is version 0.70.3, but there is still a problem

Is this a blank project?

I see the error is:

Parse error. Expected a command name, got unquoted argument with text "b�".

So I'm wondering if you applied some custom configuration to your CMake file

This is a blank project. I haven't customized anything

codingSir avatar Oct 18 '22 09:10 codingSir

It worked for me after updating CMAKE on Android Studio: https://stackoverflow.com/a/55991090

maxperry avatar Oct 20 '22 18:10 maxperry

this is what i am geting....

C:\Users\user\Desktop\budyclub>yarn start yarn run v1.22.19 $ npx react-native run-android --appIdSuffix=debug info Starting JS server... info Installing the app... Starting a Gradle Daemon, 1 incompatible and 2 stopped Daemons could not be reused, use --status for details

Task :ReactAndroid:downloadFolly UP-TO-DATE Download https://github.com/facebook/folly/archive/v2021.07.22.00.tar.gz

Task :ReactAndroid:downloadFmt UP-TO-DATE Download https://github.com/fmtlib/fmt/archive/6.2.1.tar.gz

Task :ReactAndroid:downloadDoubleConversion UP-TO-DATE Download https://github.com/google/double-conversion/archive/v1.1.6.tar.gz

Task :ReactAndroid:downloadBoost Download https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz

Task :ReactAndroid:downloadGlog UP-TO-DATE Download https://github.com/google/glog/archive/v0.3.5.tar.gz

Task :ReactAndroid:hermes-engine:downloadHermes UP-TO-DATE Download https://github.com/facebook/hermes/tarball/hermes-2022-09-14-RNv0.70.1-2a6b111ab289b55d7b78b5fdf105f466ba270fd7

Task :ReactAndroid:downloadLibevent Download https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz

Task :ReactAndroid:hermes-engine:configureBuildForHermes -- The C compiler identification is unknown -- The CXX compiler identification is unknown -- Configuring incomplete, errors occurred! See also "C:/Users/user/Desktop/budyclub/node_modules/react-native/ReactAndroid/hermes-engine/build/hermes/CMakeFiles/CMakeOutput.log". See also "C:/Users/user/Desktop/budyclub/node_modules/react-native/ReactAndroid/hermes-engine/build/hermes/CMakeFiles/CMakeError.log".

transli avatar Nov 15 '22 17:11 transli

Just a small heads up: This and other problems with Hermes on Windows are going to be fixed in RN 0.71.

cortinico avatar Nov 23 '22 19:11 cortinico

nice!We look forward to the next version。

codingSir avatar Nov 24 '22 01:11 codingSir

acing on Windows specifically on that release.

im update to 0.70.3 ,it is still " Task :ReactAndroid:hermes-engine:configureBuildForHermes FAILED"

I am facing the same issue on ubuntu

BharatBhushan2907 avatar Dec 01 '22 13:12 BharatBhushan2907

react-native v0.70.6 and the problem still exists newArchEnabled=true

> Task :ReactAndroid:hermes-engine:configureBuildForHermes FAILED
Caching disabled for task ':ReactAndroid:hermes-engine:configureBuildForHermes' because:
  Build cache is disabled
Task ':ReactAndroid:hermes-engine:configureBuildForHermes' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
Starting process 'command 'cmd''. Working directory: C:\Users\lucas\Desktop\AwesomeProject\node_modules\react-native\sdks\hermes Command: cmd /c C:\Users\lucas\AppData\Local\Android\Sdk/cmake/3.18.1/bin/cmake -GNMake Makefiles -S . -B C:\Users\lucas\Desktop\AwesomeProject\node_modules\react-native\ReactAndroid\hermes-engine\build\hermes -DJSI_DIR=C:\Users\lucas\Desktop\AwesomeProject\node_modules\react-native\ReactCommon\jsi    
Successfully started process 'command 'cmd''
CMake Deprecation Warning at CMakeLists.txt:42 (cmake_policy):
  The OLD behavior for policy CMP0026 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:64 (project):
  The CMAKE_C_COMPILER:

    cl

  is not a full path and was not found in the PATH.

  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:64 (project):
  The CMAKE_CXX_COMPILER:

    cl

  is not a full path and was not found in the PATH.

  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "C:/Users/lucas/Desktop/AwesomeProject/node_modules/react-native/ReactAndroid/hermes-engine/build/hermes/CMakeFiles/CMakeOutput.log".  
See also "C:/Users/lucas/Desktop/AwesomeProject/node_modules/react-native/ReactAndroid/hermes-engine/build/hermes/CMakeFiles/CMakeError.log".   
:ReactAndroid:hermes-engine:configureBuildForHermes (Thread[included builds,5,main]) completed. Took 0.974 secs.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':ReactAndroid:hermes-engine:configureBuildForHermes'.
> Process 'command 'cmd'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --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 8.0.

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

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 29s
24 actionable tasks: 7 executed, 17 up-to-date
Watched directory hierarchies: [C:\Users\lucas\Desktop\AwesomeProject\node_modules\react-native-gradle-plugin]
PS C:\Users\lucas\Desktop\AwesomeProject\android> 

lucassouza16 avatar Dec 12 '22 01:12 lucassouza16

react-native v0.70.6 and the problem still exists

As mentioned:

This and other problems with Hermes on Windows are going to be fixed in RN 0.71.

So it's expected that on .70 you still have those build issues with the New Architecture.

cortinico avatar Dec 12 '22 10:12 cortinico

This issue is fixed in React Native 0.71 (as this task won't be executing anymore). Please migrate to 0.71 and try again. If the issue persists, open a new issue. Thank you

cortinico avatar Jan 19 '23 10:01 cortinico

I encountered an error while attempting to build and install the app using the 'yarn android' command. The error message and relevant details are as follows:

-----------------------------------*******************************************************------------------------------------------------------

Error: Command failed: gradlew.bat app:installExperimentalPlayDebug -PreactNativeDevServerPort=8081 CMake Deprecation Warning at CMakeLists.txt:42 (cmake_policy): The OLD behavior for policy CMP0026 will be removed from a future version of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD.

CMake Error at CMakeLists.txt:64 (project): Running

'nmake' '-?'

failed with:

The system cannot find the file specified

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':react-native:ReactAndroid:hermes-engine:configureBuildForHermes'.

Process 'command 'cmd'' finished with non-zero exit value 1

  • 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/

BUILD FAILED in 29m 47s

at makeError (C:\Users\Hp\Desktop\Open Source Projects\Rocket.Chat.ReactNative\node_modules\execa\index.js:174:9)
at C:\Users\Hp\Desktop\Open Source Projects\Rocket.Chat.ReactNative\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (C:\Users\Hp\Desktop\Open Source Projects\Rocket.Chat.ReactNative\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:82:7s:82:7)
at async Command.handleAction (C:\Users\Hp\Desktop\Open Source Projects\Rocket.Chat.ReactNative\ntive\node_modules\@react-native-community\cli\build\index.js:108:9)

info Run CLI with --verbose flag for more details.

-----------------------------------*******************************************************------------------------------------------------------

I have ensured that I have the Android development environment set up following the instructions provided in the React Native documentation. However, the build process encountered the following issues:

Deprecation warning related to policy CMP0026 in CMakeLists.txt. CMake errors related to 'nmake' and missing compiler settings (CMAKE_C_COMPILER and CMAKE_CXX_COMPILER). Failure during the task ':react-native:ReactAndroid:hermes-engine:configureBuildForHermes' with a non-zero exit value. I have tried running the command with additional options such as '--stacktrace', '--info', and '--debug', but the error persists.

I would appreciate any assistance in resolving this build error and successfully installing the app. Thank you for your help.

Operating system: 64-bit operating system, x64-based processor Node.js version: v18.16.0 Yarn version: 1.22.19 React Native version: 0.71.7

abhishekjmd avatar Jun 08 '23 16:06 abhishekjmd

I am getting `A problem occurred evaluating project ':app'.

Project with path ':ReactAndroid:hermes-engine' not found in build ':'. `

RN .71.9 react 18.0.0 here is the code where the error occurs if (isNewArchitectureEnabled()) { // If new architecture is enabled, we let you build RN from source // Otherwise we fallback to a prebuilt .aar bundled in the NPM package. // This will be applied to all the imported transtitive dependency. configurations.all { resolutionStrategy.dependencySubstitution { substitute(module("com.facebook.react:react-native")) .using(project(":ReactAndroid")) .because("On New Architecture we're building React Native from source") substitute(module("com.facebook.react:hermes-engine")) .using(project(":ReactAndroid:hermes-engine")) .because("On New Architecture we're building Hermes from source") } } } Please help?

E2dwhy avatar Jun 09 '23 14:06 E2dwhy