Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.
This repository was archived by the owner on May 20, 2025. It is now read-only.

Task :app:generateBundledResourcesHashRelease FAILED #1977

@carloslibardo

Description

@carloslibardo

For some reasons i don't have src with my js files folder, but i have the index.android.bundle generated from js files.

Then in my app/build.gradle i have this flag bundleInRelease: false, this means that bundle.js and generated folder don't will be created.

I already tried to manually create this folder, but i'm using appcenter build service and before run generateBundledResourcesHashRelease the Task :app:clean clean and remove this folder, i already tried to create folder with sudo to avoid remove it, but then the clean task fail.

I don't know what do, i found some issues about that and tried to copy these solutions, but without success, if someone can help me i will be very happy =)

Steps to Reproduce

  1. react-native init codepush-issue
  2. cd codepush-issue
  3. yarn add react-native-code-push
  4. react-native link react-native-code-push
  5. Configured release signing.
  6. cd android
  7. ./gradlew bundleRelease

Expected Behavior

Build & run on Android without errors

Actual Behavior

The build fails with the following message:

 > Task :app:generateBundledResourcesHashRelease FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.3/userguide/command_line_interface.html#sec:command_line_warnings
internal/fs/utils.js:269
    throw err;
    ^

Error: ENOENT: no such file or directory, scandir '/Users/runner/work/1/s/android/app/build/generated/res/react/release'
    at Object.readdirSync (fs.js:955:3)
    at getFilesInFolder (/Users/runner/work/1/s/node_modules/react-native-code-push/scripts/getFilesInFolder.js:7:26)
    at Object.<anonymous> (/Users/runner/work/1/s/node_modules/react-native-code-push/scripts/generateBundledResourcesHash.js:38:1)
    at Module._compile (internal/modules/cjs/loader.js:1015:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
    at Module.load (internal/modules/cjs/loader.js:879:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47 {
  errno: -2,
  syscall: 'scandir',
  code: 'ENOENT',
  path: '/Users/runner/work/1/s/android/app/build/generated/res/react/release'
}

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:generateBundledResourcesHashEdpRelease'.

Reproducible Demo

Environment

  • Platform: Android
  • react-native-code-push version: 6.0.0
  • react-native version: 0.61.5
  • Does this reproduce on a debug build or release build? Release
  • Does this reproduce on a simulator, or only on a physical device? Both, because the app can't be builded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions