Skip to content

Expo iOS EAS build fails even if --allow-failures is set #3677

@csvan

Description

@csvan

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

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

SDK version: 5.19.1 (Expo 50)

react-native version: 0.73.4

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise (24.2.0)

If you are using sentry.io, please post a link to your issue so we can take a look:

[Link to issue]

Configuration:

(@sentry/react-native)

Sentry.init({
  beforeSend: (event) => {
    event.tags = {
      ...(event.tags || {}),
      app: 'my-app',
    };
    return event;
  },
  dsn: 'https://xxx@xxx',
});


I have the following issue:

We use @sentry/react-native in our Expo app, it works without issue locally and for Android builds. However, for iOS builds we hit the following:

Executing MyApp » [CP] Copy Pods Resources
› Executing MyApp » Upload Debug Symbols to Sentry

❌  error: API request failed

⚠️  Script has ambiguous dependencies causing it to run on every build.
   To fix, go to: Xcode » MyApp/MyApp » Build Phases » 'Upload Debug Symbols to Sentry'
   Either: Uncheck "Based on dependency analysis", or select output files to trigger the script
▸ ** ARCHIVE FAILED **
▸ The following build commands failed:
▸ 	PhaseScriptExecution Upload\ Debug\ Symbols\ to\ Sentry /Users/expo/Library/Developer/Xcode/DerivedData/MyApp-cdmeqqhysgdhshcijpdvuuaouuix/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/MyApp.build/Release-iphoneos/MyApp.build/Script-C9976DD65AD34B99A90A9F59.sh (in target 'MyApp' from project 'MyApp')
▸ (1 failure)
** ARCHIVE FAILED **
The following build commands failed:
	PhaseScriptExecution Upload\ Debug\ Symbols\ to\ Sentry /Users/expo/Library/Developer/Xcode/DerivedData/MyApp-cdmeqqhysgdhshcijpdvuuaouuix/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/IntermediateBuildFilesPath/MyApp.build/Release-iphoneos/MyApp.build/Script-C9976DD65AD34B99A90A9F59.sh (in target 'MyApp' from project 'MyApp')
(1 failure)

Exit status: 65

However, we have set the following env var:

"SENTRY_CLI_DEBUG_FILES_UPLOAD_EXTRA_ARGS": "--allow-failure"

And the XCode logs suggest that this is being respected:

 DEBUG   2024-03-12 06:46:18.311485 -07:00 body: {"60d723c87188fb732259aec461b7f863975bcd14":{"state":"not_found","missingChunks":["96499e94a6a09ebe1c12d080a74a0b1f0aa8250b","61fd705b87ddfb73cfb74a93e1afbd96cfc1bc12","d596e287da7fe76b6361d58bb4167940ac9d7435","f1aecb520cbcdf98b6a1765a0a36a842b4271634","594567617dc5666323d3ba1c73d5298105676fd3","015ef50d06bc761521f71d3073406c9d50b584dd","8b65288f0cf8c89c412910485b7cddc49ed7982b","1d67957e810957cb829ad39dc6ded95ac4ff3822","aab97e232e9ecc2090fff7c752d86f8d48ce07af","e045013892dfc577dc95617650f0624a740f4dd2","3a1e9dc6205a47de372f69fc67e5a3ca9b48adb6","189a6e5bca5a3b8994883f7d1c9314c403694844"]},"fd2ff9f2ca5c043e65d0e64181095ab05333dea8":{"state":"not_found","missingChunks":["fd2ff9f2ca5c043e65d0e64181095ab05333dea8"]},"ee6149cc80d9d4453fe7a3beaad073d70c05ea5a":{"state":"not_found","missingChunks":["aa3bc760eee4706b67e72f3ff3348ab513f27282","29584cf5ff894e4390557bc1ed729a77b6bfb537","5d2f7e5ef8449a1ea0222d1f0461a9f59204fb04"]}}
error: API request failed
  caused by: sentry reported an error: unknown error (http status: 413)

Command failed, however, "SENTRY_ALLOW_FAILURE" variable or "allow-failure" flag was set. Exiting with 0 exit code.
Command PhaseScriptExecution emitted errors but did not return a nonzero exit code to indicate failure

Nevertheless, the build fails. We have identified what causes the 413 and will address that, but I feel like this behaviour is unexpected either way.

Removing the Sentry plugin from our Expo app config causes the build to pass, so it is almost certainly the root cause.

[Description]

Steps to reproduce:

  • Setup vanilla onprem sentry
  • integrate @sentry/react-native with Expo app
  • Trigger iOS build

Actual result:

Entire build process fails

Expected result:

Build should go green even if Sentry dsym upload fails

Metadata

Metadata

Labels

No labels
No labels

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions