Skip to content

iOS Archive Fails with “Cycle inside ” after upgrading to expo-datadog from 54.0.0 to 54.0.1 #90

Description

@pierpo

Describe what happened
After upgrading expo-datadog to 54.0.1, iOS archive builds started failing on EAS with an Xcode build-system dependency cycle.

EAS build fails with exit status 65 and the following error:

error: Cycle inside XXXTESTING; building could produce unreliable results.
Cycle details:
→ Target 'XXXTESTING' has copy command from
  .../BuildProductsPath/Release-iphoneos/ExpoBatchRichNotifications.appex
  to
  .../Applications/XXXTESTING.app/PlugIns/ExpoBatchRichNotifications.appex
○ That command depends on command in Target 'XXXTESTING': script phase “Upload dSYMs to Datadog”
○ Target 'XXXTESTING' has a command with output:
  .../Release-iphoneos/XXXTESTING.app.dSYM
...
Raw dependency cycle trace shows:
Copy ExpoBatchRichNotifications.appex
→ Upload dSYMs to Datadog
→ GenerateDSYMFile
→ ProcessInfoPlistFile
→ Copy ExpoBatchRichNotifications.appex

This started immediately after bumping expo-datadog to 54.0.1

Steps to reproduce the issue:

1.	Set-up Datadog on an Expo 54 project
2.	Have an embedded app extension (in our case a Notification Service Extension), e.g. ExpoBatchRichNotifications.appex (from @batch.com/expo-plugin rich notifications).
3.	Run an iOS archive build (EAS): eas build -p ios --local
4.	Observe archive failure with the Xcode “Cycle inside ” error above.

Describe what you expected:

Upgrading expo-datadog to 54.0.1 should not break iOS archive builds. The dSYM upload build phase should not introduce dependency cycles, including for apps embedding .appex extensions.

Additional context

  • Version of the Expo SDK: 54.0.19
  • Version of expo-datadog: 54.0.1
  • Version of @datadog/mobile-react-native: 3.1.1
  • app.json
    [
      'expo-datadog',
      {
        errorTracking: {
          androidSourcemaps: !!env.DATADOG_API_KEY,
          androidProguardMappingFiles: !!env.DATADOG_API_KEY,
          iosDsyms: !!env.DATADOG_API_KEY,
          iosSourcemaps: !!env.DATADOG_API_KEY,
          serviceName: appEnv.DD_SERVICE,
        },
      },
    ],

Hypothesis

The “Upload dSYMs to Datadog” script phase appears to have gained explicit inputPaths / outputPaths (and/or changed behavior/ordering), which may cause Xcode’s build system to pull the script into the dependency graph and create a cycle when an .appex is embedded.

➡️ If the script phase is inserted before/around the “Embed App Extensions” copy files phase, Xcode can end up with the loop shown in the trace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions