This repository was archived by the owner on May 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
This repository was archived by the owner on May 20, 2025. It is now read-only.
Code Push 8.0.0/RN 0.71.6 - StackOverflowError CodePushHash: Resource and asset merger: Duplicate resources #2497
Copy link
Copy link
Closed
Description
Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant): Recently we have changed react native version from 0.70 -> 0.71. Code push support for react native 0.71.6 is 8.0.0. Since then whenever changes we do in native code, we are getting below errors.
To fix this, for every native android code change we have to do ./gradlew clean and then use react-native run android to fix this issue. This is very very time consuming.
Steps to Reproduce
- Do any change in android native and run the app using react-native run android
- This issue we can reproduce
Expected Behavior
What you expected to happen?
Actual Behavior
What actually happens?
ERROR:/Users/dev/Documents/Projects/React Native/mytakeaway2.0/android/app/build/ASSETS/createBundleFusionDebugJsAndAssets/CodePushHash /Users/dev/Documents/Projects/React Native/mytakeaway2.0/android/app/build/ASSETS/createBundleFusionDebugJsAndAssets/CodePushHash: Resource and asset merger: Duplicate resources
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeFusionDebugAssets'.
> /Users/dev/Documents/Projects/React Native/mytakeaway2.0/android/app/build/ASSETS/createBundleFusionDebugJsAndAssets/CodePushHash /Users/dev/Documents/Projects/React Native/mytakeaway2.0/android/app/build/ASSETS/createBundleFusionDebugJsAndAssets/CodePushHash: Error: Duplicate resources
* 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 26s
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 app:installFusionDebug -PreactNativeDevServerPort=8081
ERROR:/Users/dev/Documents/Projects/React Native/mytakeaway2.0/android/app/build/ASSETS/createBundleFusionDebugJsAndAssets/CodePushHash /Users/dev/Documents/Projects/React Native/mytakeaway2.0/android/app/build/ASSETS/createBundleFusionDebugJsAndAssets/CodePushHash: Resource and asset merger: Duplicate resources
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeFusionDebugAssets'.
> /Users/dev/Documents/Projects/React Native/mytakeaway2.0/android/app/build/ASSETS/createBundleFusionDebugJsAndAssets/CodePushHash /Users/dev/Documents/Projects/React Native/mytakeaway2.0/android/app/build/ASSETS/createBundleFusionDebugJsAndAssets/CodePushHash: Error: Duplicate resources
* 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 26s
at makeError (/Users/dev/Documents/Projects/React Native/mytakeaway2.0/node_modules/execa/index.js:174:9)
at /Users/dev/Documents/Projects/React Native/mytakeaway2.0/node_modules/execa/index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async runOnAllDevices (/Users/dev/Documents/Projects/React Native/mytakeaway2.0/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:82:7)
at async Command.handleAction (/Users/dev/Documents/Projects/React Native/mytakeaway2.0/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js:108:9)
info Run CLI with --verbose flag for more details.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] f: `ENVFILE=.env.Fusion react-native run-android --variant=fusionDebug`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] f script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/dev/.npm/_logs/2023-04-19T04_19_01_828Z-debug.log
Environment
- react-native-code-push version: 8.0.0
- react-native version: 0.71.6
- iOS/Android/Windows version: 11
- Does this reproduce on a debug build or release build? Debug build
- Does this reproduce on a simulator, or only on a physical device? Physical device
(The more info the faster we will be able to address it!)
Titozzz, shubhamdeol, jobinabraham, ShepelE, fergusean and 21 more
Metadata
Metadata
Assignees
Labels
No labels