Skip to content

[CLI] Missing iOS asset catalog reports success and skips all asset copying #59871

Open

Description

@NansKong

Description

When bundle --platform ios receives an --asset-catalog-dest whose RNAssets.xcassets directory is missing, asset saving prints an error but resolves successfully. No assets are saved, including GIFs that normally copy to --assets-dest. CI/custom bundling can therefore accept incomplete output.

Expected: reject the build with the actionable missing-catalog error. Actual: log the error and return success.

The missing-catalog branch in packages/community-cli-plugin/src/commands/bundle/saveAssets.js uses console.error(...); return; inside an async function. buildBundle.js awaits it without a separate failure check. Source inspected at f480836. This concerns successful completion after failure, not automatic catalog creation.

Steps to reproduce

Use this project, generated from the official react-native-community/reproducer-react-native template. It preserves the template app and its native projects, with React Native 0.88.1.

git clone https://github.com/NansKong/react-native-cli-bundle-reproducer.git
cd react-native-cli-bundle-reproducer/ReproducerApp
npm install --ignore-scripts
node reproduce-cli.cjs catalog

Source and instructions. The check invokes the public react-native bundle CLI through react-native/cli.js, uses the app's real Metro configuration, and builds actual bundles. No internal CLI helper or Metro mock is used. Each run creates a fresh fixture under the ignored build/ folder.

The control bundle copies the required GIF. The second run adds a missing --asset-catalog-dest: it logs the missing-catalog error, exits 0, and copies no GIF. Expected: this second CLI run should exit nonzero.

The wrapper exits 0 only after verifying the reported bug and its control. A precondition failure or changed behavior causes a nonzero exit. No native SDK or emulator is needed for these bundling steps.

React Native Version

0.88.1

Affected Platforms

Build - Windows (other hosts not tested)

Output of npx @react-native-community/cli info

Relevant output from the template app; executable paths and transient memory omitted:

System:
  OS: Windows 11 10.0.26200
  CPU: (16) x64 AMD Ryzen 7 4800H with Radeon Graphics
Binaries:
  Node: 22.22.0
  npm: 11.18.0
  Yarn: Not Found
  Watchman: Not Found
SDKs:
  Android SDK: Not Found
  Windows SDK: Not Found
IDEs:
  Android Studio: Not Found
  Visual Studio: Not Found
Languages:
  Java: Not Found
  Ruby: Not Found
npmPackages:
  @react-native-community/cli: 20.2.0
  react: 19.3.0
  react-native: 0.88.1
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Metro resolved in the template app: 0.87.2. Only CLI bundling was tested; no native application build/device result is claimed.

Stacktrace or Logs

Control: Copying 1 asset files / Done copying assets
Missing catalog: error: Could not find asset catalog 'RNAssets.xcassets' in <fixture>/not-created. Make sure to create it if it does not exist.
REPRODUCED #59871: control copied the GIF; missing catalog logged an error but CLI exited 0 and copied no GIF.
Verified on Node v22.22.0 win32 x64
react-native: 0.88.1

MANDATORY Reproducer

https://github.com/NansKong/react-native-cli-bundle-reproducer

Run node reproduce-cli.cjs catalog from ReproducerApp after installing dependencies.

Duplicate check

Searched open/closed issues and PRs for RNAssets.xcassets, RNAssets, assetCatalogDest and asset-catalog failures. No matching report/fix found. #41865 (directory removal), #57825 (scale pairing) and #59331 (APNG handling) address different behavior.

Activity

  1. react-native-bot commented on Nov 9, 2026

    @react-native-bot
    Collaborator

    Warning

    Missing reproducer: We could not detect a reproducible example in your issue report. Reproducers are mandatory and we can accept only one of those as a valid reproducer:


    You can read more about about it on our website: How to report a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackNeeds: ReproThis issue could be improved with a clear list of steps to reproduce the issue.Platform: iOSiOS applications.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions