sentry-react-native: Migrating from 4.15.0 to 5.0.0: Command PhaseScriptExecution failed with a nonzero exit code

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (>= 1.0.0)
  • react-native-sentry (<= 0.43.2)

SDK version: 5.0.0

react-native version: 0.71.3

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

Configuration:

(@sentry/react-native)

Sentry.init({
  dsn: https://0e607a3e9cc8417a832a7a77952479c7@o171571.ingest.sentry.io/1250057,
  environment: dev,
});

I have following issue:

During iOS build in XCode, I’m getting this build error:

FBReactNativeSpec
error build: Command PhaseScriptExecution failed with a nonzero exit code

Steps to reproduce:

Actual result:

Build error described above:

FBReactNativeSpec
error build: Command PhaseScriptExecution failed with a nonzero exit code

Expected result:

Successful iOS build

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 23 (10 by maintainers)

Most upvoted comments

@sweatherall Hi, thank you for the reply.

Here is the fixed script.

set -e

export SENTRY_PROPERTIES=sentry.properties
export EXTRA_PACKAGER_ARGS="--sourcemap-output $DERIVED_FILE_DIR/main.jsbundle.map"

WITH_ENVIRONMENT="../node_modules/react-native/scripts/xcode/with-environment.sh"
REACT_NATIVE_XCODE="../node_modules/react-native/scripts/react-native-xcode.sh"
SENTRY_CLI_PATH="../node_modules/@sentry/cli/bin/sentry-cli"

/bin/sh -c "$WITH_ENVIRONMENT \"$SENTRY_CLI_PATH react-native xcode $REACT_NATIVE_XCODE --log-level=debug --force-foreground\""

/bin/sh ../node_modules/@sentry/react-native/scripts/collect-modules.sh

Could you describe the steps you did during the upgrade from 4.x to 5.x, I would like try figure what cause the corrupted build script?

Closing this due to inactivity. If this is still an issue feel free to comment here or open a new issue if the context changed.