After upgrading to Expo 50 and adding @sentry/react-native library the build started failing.
The build is run remotely on Expo (EAS Build).
Additional notice: the issue is reproduced only if @sentry/react-native is added, there is a conflict between the libraries.
EAS build is failed with the error:
› Executing MobileAppX » Bundle React Native code and images
⚠️ Script has ambiguous dependencies causing it to run on every build.
To fix, go to: Xcode » MobileAppX/MobileAppX » Build Phases » 'Upload Debug Symbols to Sentry'
Either: Uncheck "Based on dependency analysis", or select output files to trigger the script
⚠️ Script has ambiguous dependencies causing it to run on every build.
To fix, go to: Xcode » MobileAppX/MobileAppX » Build Phases » 'Upload dSYMs to Datadog'
Either: Uncheck "Based on dependency analysis", or select output files to trigger the script
⚠️ Script has ambiguous dependencies causing it to run on every build.
To fix, go to: Xcode » MobileAppX/MobileAppX » Build Phases » '[CP-User] [RNFB] Core Configuration'
Either: Uncheck "Based on dependency analysis", or select output files to trigger the script
⚠️ Script has ambiguous dependencies causing it to run on every build.
To fix, go to: Xcode » MobileAppX/MobileAppX » Build Phases » '[CP-User] [RNFB] Crashlytics Configuration'
Either: Uncheck "Based on dependency analysis", or select output files to trigger the script
▸ ** BUILD FAILED **
▸ The following build commands failed:
▸ PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/expo/workingdir/build/ios/build/Build/Intermediates.noindex/MobileAppX.build/Debug-iphonesimulator/MobileAppX.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'MobileAppX' from project 'MobileAppX')
▸ (1 failure)
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/expo/workingdir/build/ios/build/Build/Intermediates.noindex/MobileAppX.build/Debug-iphonesimulator/MobileAppX.build/Script-00DD1BFF1BD5951E006B06BC.sh (in target 'MobileAppX' from project 'MobileAppX')
(1 failure)
Exit status: 65
XCode logs:
/bin/sh -c /Users/expo/workingdir/build/ios/build/Build/Intermediates.noindex/MobileAppX.build/Debug-iphonesimulator/MobileAppX.build/Script-00DD1BFF1BD5951E006B06BC.sh
+ LOCAL_NODE_BINARY=/Users/expo/.nvm/versions/node/v20.13.1/bin/node
+ '[' -z '' ']'
+ export SENTRY_PROPERTIES=sentry.properties
+ SENTRY_PROPERTIES=sentry.properties
+ '[' -z '' ']'
+ export SOURCEMAP_FILE=/Users/expo/workingdir/build/ios/build/Build/Intermediates.noindex/MobileAppX.build/Debug-iphonesimulator/MobileAppX.build/DerivedSources/main.jsbundle.map
+ SOURCEMAP_FILE=/Users/expo/workingdir/build/ios/build/Build/Intermediates.noindex/MobileAppX.build/Debug-iphonesimulator/MobileAppX.build/DerivedSources/main.jsbundle.map
+ '[' -z '' ']'
++ /Users/expo/.nvm/versions/node/v20.13.1/bin/node --print 'require('\''path'\'').dirname(require.resolve('\''@sentry/cli/package.json'\''))'
+ SENTRY_CLI_PACKAGE_PATH=/Users/expo/workingdir/build/node_modules/@sentry/cli
+ '[' -z '' ']'
+ SENTRY_CLI_EXECUTABLE=/Users/expo/workingdir/build/node_modules/@sentry/cli/bin/sentry-cli
+ REACT_NATIVE_XCODE=/Users/expo/workingdir/build/node_modules/react-native/scripts/react-native-xcode.sh
+ [[ '' == false ]]
+ ARGS=' --force-foreground --log-level=debug '
+ REACT_NATIVE_XCODE_WITH_SENTRY='"/Users/expo/workingdir/build/node_modules/@sentry/cli/bin/sentry-cli" react-native xcode --force-foreground --log-level=debug "/Users/expo/workingdir/build/node_modules/react-native/scripts/react-native-xcode.sh"'
+ '[' '' '!=' true ']'
+ /bin/sh -c '"/Users/expo/.nvm/versions/node/v20.13.1/bin/node" "/Users/expo/workingdir/build/node_modules/@sentry/cli/bin/sentry-cli" react-native xcode --force-foreground --log-level=debug "/Users/expo/workingdir/build/node_modules/react-native/scripts/react-native-xcode.sh"'
INFO 2024-07-11 05:55:36.678262 -07:00 Loaded file referenced by SENTRY_PROPERTIES (sentry.properties)
DEBUG 2024-07-11 05:55:36.701518 -07:00 sentry-cli version: 2.30.0, platform: "darwin", architecture: "arm64"
INFO 2024-07-11 05:55:36.701557 -07:00 sentry-cli was invoked with the following command line: "/Users/expo/workingdir/build/node_modules/@sentry/cli-darwin/bin/sentry-cli" "react-native" "xcode" "--force-foreground" "--log-level=debug" "/Users/expo/workingdir/build/node_modules/react-native/scripts/react-native-xcode.sh"
INFO 2024-07-11 05:55:36.701651 -07:00 Issuing a command for Organization: mpileappx Project: mpileappx
INFO 2024-07-11 05:55:36.701658 -07:00 Using react-native build script at /Users/expo/workingdir/build/ios
INFO 2024-07-11 05:55:36.701661 -07:00 Running in debug mode, skipping script wrapping.
+ DEST=/Users/expo/workingdir/build/ios/build/Build/Products/Debug-iphonesimulator/MobileAppX.app
+ [[ ! -n '' ]]
+ [[ Debug = *Debug* ]]
+ [[ ! iphonesimulator == *simulator ]]
+ [[ -n 1 ]]
+ echo 'SKIP_BUNDLING enabled; skipping.'
SKIP_BUNDLING enabled; skipping.
+ exit 0
+ '[' -z '' ']'
++ /Users/expo/.nvm/versions/node/v20.13.1/bin/node --print 'require('\''path'\'').dirname(require.resolve('\''@sentry/react-native/package.json'\''))'
+ SENTRY_RN_PACKAGE_PATH=/Users/expo/workingdir/build/node_modules/@sentry/react-native
+ '[' -z '' ']'
+ SENTRY_COLLECT_MODULES=/Users/expo/workingdir/build/node_modules/@sentry/react-native/scripts/collect-modules.sh
+ '[' -f /Users/expo/workingdir/build/node_modules/@sentry/react-native/scripts/collect-modules.sh ']'
+ /bin/sh /Users/expo/workingdir/build/node_modules/@sentry/react-native/scripts/collect-modules.sh
+ [[ Debug = *Debug* ]]
+ echo 'Debug build. Modules are not collected.'
Debug build. Modules are not collected.
+ exit 0
No sourcemap output has been specified.
Check that you either set a SOURCEMAP_FILE or an EXTRA_PACKAGER_ARGS environment variable in your "Bundle React Native code and images" Build Phase in XCode.
If you are not running this script from XCode, set a SOURCEMAP_FILE environment variable before running the script.
Command PhaseScriptExecution failed with a nonzero exit code
Describe what you expected
Build should finish successfully.
Steps to reproduce the issue
Upgrade to Expo 50
Add @sentry/react-native library together with DataDog
Run the build on Expo side: eas build --profile devclient --platform ios
Bug description
After upgrading to Expo 50 and adding @sentry/react-native library the build started failing. The build is run remotely on Expo (EAS Build).
Additional notice: the issue is reproduced only if @sentry/react-native is added, there is a conflict between the libraries.
EAS build is failed with the error:
XCode logs:
Describe what you expected
Build should finish successfully.
Steps to reproduce the issue
eas build --profile devclient --platform ios
Additional context
Command
None