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.

bundleRelease Error: Execution failed for task ':app:bundleReleaseJsAndAssets'.

See original GitHub issue

Description

React-Native-Build-Error

https://github.com/OmarThinks/ReactNativeBuildError

Acknowledgement:

Thank you so much React Native Team for your hard and consistent work.

Reporducability of issue:

Here the are 2 projects: https://github.com/OmarThinks/ReactNativeBuildError
I have created a Github repo to make it easy for you to spot the error.
JS and TS projects.
I have been stuck here for 3 consecutive days.
I tried everything I could find.
https://stackoverflow.com/questions/59695135/react-native-android-build-process-command-npx-cmd-finished-with-non-zero https://github.com/facebook/react-native/issues/28510
None of these soltions worked.
I have also tried several React native versions, and tried changing Gradle versions, and JDK versions. None of these worked.

How I Generated these projects:

npx react-native init AwesomeProject
npx react-native init AwesomeTSProject --template react-native-template-typescript

I did not add any other code to the templates, just signning the keys.

Error:

$ ./gradlew bundleRelease
> Task :app:bundleReleaseJsAndAssets FAILED

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
> 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

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 4s
8 actionable tasks: 3 executed, 5 up-to-date

Key:

Key is already generated on /android/app/my-upload-key.keystore. But, if you want to regenerate a new key, you can follow the steps below:

keytool -genkey -v -keystore my-upload-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000


MYAPP_UPLOAD_STORE_FILE=my-upload-key.keystore
MYAPP_UPLOAD_KEY_ALIAS=my-key-alias
MYAPP_UPLOAD_STORE_PASSWORD=abcdefghijklmnop
MYAPP_UPLOAD_KEY_PASSWORD=abcdefghijklmnop

Acknowledgement (Again):

Thank you so much React Native Team for your hard and consistent work.
You saved us from Java.

Version

0.70.6

Output of npx react-native info

$ npx react-native info info Fetching system and libraries information… System: OS: Windows 10 10.0.22621 CPU: (12) x64 Intel® Core™ i5-10400 CPU @ 2.90GHz Memory: 18.15 GB / 31.83 GB Binaries: Node: 18.12.1 - C:\Program Files\nodejs\node.EXE Yarn: Not Found npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: API Levels: 30, 31, 32, 33 Build Tools: 29.0.2, 30.0.2, 30.0.3, 31.0.0, 32.0.0, 33.0.0, 33.0.1 System Images: android-29 | Google Play Intel x86 Atom, android-31 | Intel x86 Atom_64, android-31 | Google APIs Intel x86 Atom_64 Android NDK: Not Found Windows SDK: AllowAllTrustedApps: Disabled Versions: 10.0.19041.0 IDEs: Android Studio: AI-213.7172.25.2113.9123335 Visual Studio: 17.2.32630.192 (Visual Studio Community 2022) Languages: Java: 11.0.17 - /c/Program Files/Eclipse Adoptium/jdk-11.0.17.8-hotspot/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.1.0 => 18.1.0 react-native: 0.70.6 => 0.70.6 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

Reproduction:

1) GitHub Repo:

https://github.com/OmarThinks/ReactNativeBuildError
I have created this GitHub repo which contains all the code to help run the code easily.

2) Normal way of creating templates:

npx react-native init AwesomeProject
npx react-native init AwesomeTSProject --template react-native-template-typescript

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

https://github.com/OmarThinks/ReactNativeBuildError

Thank you so much for your hard, patient, and persistent work!

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:28 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
therafibhuiyancommented, Dec 7, 2022

@OmarThinks The development of my application has been completed but I am unable to push it to the production build due to this issue.

2reactions
cortinicocommented, Dec 9, 2022

I tried as you told me, sir! That was the result.

Thanks for the heads up. This seems to be a Windows specific issue. We’ll have to look into it next week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Task :app:bundleReleaseJsAndAssets FAILED · Issue #28510
I'm following this to get my signed APK Description Executing ./gradlew bundleRelease or ./gradlew assembleRelease however gives an error.
Read more >
React-Native assembleRelease fails for task - Stack Overflow
Now I'm running ./gradlew assembleRelease --info from the terminal instead of Android Studio and I get different error. Here is the result: > ......
Read more >
Build error during Apk generation for Android
gradlew AssembleRelease FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:packageRelease'.
Read more >
task :app:bundlereleasejsandassets failed - OSCHINA
Error :Execution failed for task ':app:lint'. > Lint found errors in the project; aborting build. Fix the issues identified by lint, or add...
Read more >
Build failed (deprecated Gradle features?) - AppGyver forums
gradlew bundleRelease -x bundleReleaseJsAndAssets. FAILED with ERROR: ... Execution failed for task ':app:packageReleaseBundle'.
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