facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
117.82k stars 24.16k forks source link

Package issue- While app building #38876

Closed Devika536 closed 1 year ago

Devika536 commented 1 year ago

Description

I am working on Hyperledger Aries bifold application which is react native based and while running the application I am facing issues with two packages i.e 1. @hyperledger/anoncreds-react-native and 2. @hyperledger/aries-askar-react-native. The issue is that these two packages throw cmake debug issue. I am attaching the logs of the error logs.

React Native Version

0.66.5

Output of npx react-native info

System:
    OS: Windows 10 10.0.22000
    CPU: (8) x64 Intel(R) Core(TM) i5-10310U CPU @ 1.70GHz
    Memory: 6.76 GB / 15.76 GB
  Binaries:
    Node: 16.16.0 - D:\devika.kulkarni\nvm-noinstall\v16.16.0\node.EXE
    Yarn: 3.3.1 - D:\devika.kulkarni\nvm-noinstall\v16.16.0\yarn.CMD
    npm: 8.11.0 - D:\devika.kulkarni\nvm-noinstall\v16.16.0\npm.CMD
    Watchman: Not Found
  SDKs:
    Android SDK: Not Found
    Windows SDK: Not Found
  IDEs:
    Android Studio: AI-222.4459.24.2221.9971841
    Visual Studio: Not Found
  Languages:
    Java: 17.0.8
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2
    react-native: 0.66.5 => 0.66.5
    react-native-windows: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

  1. After cloning the repo, run the command

yarn install

  1. Then run

yarn run prepare

to build the dependencies.

  1. To run application I used the

yarn run android

Snack, screenshot, or link to a repository

> Task :hyperledger_anoncreds-react-native:buildCMakeDebug[arm64-v8a] FAILED
Caching disabled for task ':hyperledger_anoncreds-react-native:buildCMakeDebug[arm64-v8a]' because:
  Build cache is disabled
Task ':hyperledger_anoncreds-react-native:buildCMakeDebug[arm64-v8a]' is not up-to-date because:
  Task.upToDateWhen is false.
C/C++: starting build
C/C++: reading expected JSONs
C/C++: done reading expected JSONs
C/C++: executing build commands for targets that produce .so files or executables
C/C++: evaluate miniconfig
C/C++: evaluate library anoncredsreactnative (arm64-v8a)
C/C++: building target library anoncredsreactnative because no targets are specified.
C/C++: about to build targets anoncredsreactnative
C/C++: Executable : C:\Users\devika.kulkarni\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe
arguments :
-C
D:\devika.kulkarni\hyperledgerAries\Ariesverynew\packages\legacy\app\node_modules\@hyperledger\anoncreds-react-native\android\.cxx\Debug\5y3r1m4m\arm64-v8a
anoncredsreactnative
jvmArgs :

C/C++: Build anoncredsreactnative_arm64-v8a
C/C++: Executable : C:\Users\devika.kulkarni\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe
arguments :
-C
D:\devika.kulkarni\hyperledgerAries\Ariesverynew\packages\legacy\app\node_modules\@hyperledger\anoncreds-react-native\android\.cxx\Debug\5y3r1m4m\arm64-v8a
anoncredsreactnative
jvmArgs :

Starting process 'command 'C:\Users\devika.kulkarni\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe''. Working directory: D:\devika.kulkarni\hyperledgerAries\Ariesverynew\packages\legacy\app\node_modules\@hyperledger\anoncreds-react-native\android Command: C:\Users\devika.kulkarni\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe -C D:\devika.kulkarni\hyperledgerAries\Ariesverynew\packages\legacy\app\node_modules\@hyperledger\anoncreds-react-native\android\.cxx\Debug\5y3r1m4m\arm64-v8a anoncredsreactnative
Successfully started process 'command 'C:\Users\devika.kulkarni\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe''
C/C++: ninja: error: mkdir(CMakeFiles/anoncredsreactnative.dir/D_/devika.kulkarni/hyperledgerAries/Ariesverynew/packages/legacy/app): No such file or directory
:hyperledger_anoncreds-react-native:buildCMakeDebug[arm64-v8a] (Thread[Execution worker Thread 4,5,main]) completed. Took 1.074 secs.

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
410 actionable tasks: 6 executed, 404 up-to-date
Watched directory hierarchies: [D:\devika.kulkarni\hyperledgerAries\Ariesverynew\packages\legacy\app\android]  

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':hyperledger_anoncreds-react-native:buildCMakeDebug[arm64-v8a]'.
> Build command failed.
  Error while executing process C:\Users\devika.kulkarni\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe with arguments {-C D:\devika.kulkarni\hyperledgerAries\Ariesverynew\packages\legacy\app\node_modules\@hyperledger\anoncreds-react-native\android\.cxx\Debug\5y3r1m4m\arm64-v8a anoncredsreactnative}
  ninja: Entering directory `D:\devika.kulkarni\hyperledgerAries\Ariesverynew\packages\legacy\app\node_modules\@hyperledger\anoncreds-react-native\android\.cxx\Debug\5y3r1m4m\arm64-v8a'
  ninja: build stopped: .

  ninja: error: mkdir(CMakeFiles/anoncredsreactnative.dir/D_/devika.kulkarni/hyperledgerAries/Ariesverynew/packages/legacy/app): No such file or directory

* 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

BUILD FAILED in 3m 5s

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

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':hyperledger_anoncreds-react-native:buildCMakeDebug[arm64-v8a]'.
> Build command failed.
  Error while executing process C:\Users\devika.kulkarni\AppData\Local\Android\Sdk\cmake\3.18.1\bin\ninja.exe with arguments {-C D:\devika.kulkarni\hyperledgerAries\Ariesverynew\packages\legacy\app\node_modules\@hyperledger\anoncreds-react-native\android\.cxx\Debug\5y3r1m4m\arm64-v8a anoncredsreactnative}
  ninja: Entering directory `D:\devika.kulkarni\hyperledgerAries\Ariesverynew\packages\legacy\app\node_modules\@hyperledger\anoncreds-react-native\android\.cxx\Debug\5y3r1m4m\arm64-v8a'
  ninja: build stopped: .

  ninja: error: mkdir(CMakeFiles/anoncredsreactnative.dir/D_/devika.kulkarni/hyperledgerAries/Ariesverynew/packages/legacy/app): No such file or directory

* 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

BUILD FAILED in 3m 5s

    at makeError (D:\devika.kulkarni\hyperledgerAries\Ariesverynew\packages\legacy\app\node_modules\execa\index.js:174:9)
    at D:\devika.kulkarni\hyperledgerAries\Ariesverynew\packages\legacy\app\node_modules\execa\index.js:278:16 
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async runOnAllDevices (D:\devika.kulkarni\hyperledgerAries\Ariesverynew\packages\legacy\app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
    at async Command.handleAction (D:\devika.kulkarni\hyperledgerAries\Ariesverynew\packages\legacy\app\node_modules\@react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
github-actions[bot] commented 1 year ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.
github-actions[bot] commented 1 year ago
:warning: Too Old Version of React Native
:information_source: It looks like your issue or the example you provided uses a Too Old Version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.
PenguinTaro commented 1 year ago

Hi @cortinico , can you help me with this error, I don't know the cause for it and have been trying to resolve it since many days . Thank you