Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building project with app clip target fails ("The relationship 'parentBundleId' is required") #2262

Closed
szpasztor opened this issue Mar 5, 2024 · 5 comments

Comments

@szpasztor
Copy link

Build/Submit details page URL

No response

Summary

I've created a project from scratch with npx create-expo-app, and added an app clip target. I've used react-native-app-clip to generate the native configuration and the app clip target in the native project. I have run the app locally and both the parent app and the app clip functions on a simulator/connected device. However, when attempting to build with eas build --profile preview --platform ios, the build fails.

Managed or bare?

managed

Environment

  expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 14.2.1
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 18.17.0 - ~/.nvm/versions/node/v18.17.0/bin/node
      Yarn: 1.22.19 - ~/.nvm/versions/node/v18.17.0/bin/yarn
      npm: 10.0.0 - ~/.nvm/versions/node/v18.17.0/bin/npm
      Watchman: 2023.12.04.00 - /opt/homebrew/bin/watchman
    Managers:
      CocoaPods: 1.15.2 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.2, iOS 17.2, macOS 14.2, tvOS 17.2, visionOS 1.0, watchOS 10.2
    IDEs:
      Xcode: 15.2/15C500b - /usr/bin/xcodebuild
    npmPackages:
      expo: ~50.0.8 => 50.0.8 
      react: 18.2.0 => 18.2.0 
      react-native: 0.73.4 => 0.73.4 
    npmGlobalPackages:
      eas-cli: 7.3.0
    Expo Workflow: managed

expo doctor:

✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for issues with metro config
✖ Check for common project setup issues
✔ Check npm/ yarn versions
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✖ Check that native modules use compatible support package versions for installed Expo SDK
✔ Check that packages match versions required by installed Expo SDK

Detailed check results:

Expected package @expo/config-plugins@~7.8.0
Found invalid:
  @expo/[email protected]
  (for more info, run: npm why @expo/config-plugins)
Advice: Upgrade dependencies that are using the invalid package versions0.

This project has native project folders but is also configured to use Prebuild. EAS Build will not sync your native configuration if the ios or android folders are present. Add these folders to your .gitignore file if you intend to use prebuild (aka "managed" workflow).

Error output

Here's the error message (with preceding logs attached, full bundle name removed):

Setting up credentials for target expoappclipClip (com.REDACTED.expoappclip.Clip)

- Linking bundle identifier com.REDACTED.expoappclip.Clip
✔ Bundle identifier registered com.REDACTED.expoappclip.Clip
- Syncing capabilities
Current remote capabilities:
[
  {
    "context": {
      "providerId": 123207890,
      "teamId": "93CBXCV95G"
    },
    "id": "7FVHV7255H_IN_APP_PURCHASE",
    "attributes": {
      "ownerType": "BUNDLE",
      "settings": null,
      "editable": true,
      "inputs": null,
      "enabled": true,
      "responseId": "948e4f62-9325-4226-8bb2-8d8646add1d1"
    }
  },
  {
    "context": {
      "providerId": 123207890,
      "teamId": "93CBXCV95G"
    },
    "id": "7FVHV7255H_ON_DEMAND_INSTALL_CAPABLE",
    "attributes": {
      "ownerType": "BUNDLE",
      "settings": null,
      "editable": true,
      "inputs": null,
      "enabled": true,
      "responseId": "948e4f62-9325-4226-8bb2-8d8646add1d1"
    }
  },
  {
    "context": {
      "providerId": 123207890,
      "teamId": "93CBXCV95G"
    },
    "id": "7FVHV7255H_APP_GROUPS",
    "attributes": {
      "ownerType": "BUNDLE",
      "settings": null,
      "editable": true,
      "inputs": null,
      "enabled": true,
      "responseId": "948e4f62-9325-4226-8bb2-8d8646add1d1"
    }
  }
]

Current local entitlements:
{
  "com.apple.developer.associated-appclip-app-identifiers": [
    "$(AppIdentifierPrefix)com.REDACTED.expoappclip.Clip"
  ],
  "com.apple.security.application-groups": [
    "group.com.REDACTED.expoappclip"
  ]
}
Skipping entitlement that is not supported by EAS: com.apple.developer.associated-appclip-app-identifiers
Skipping existing capability: com.apple.security.application-groups (App Groups)
Remaining to remove:  [
  '7FVHV7255H_IN_APP_PURCHASE',
  '7FVHV7255H_ON_DEMAND_INSTALL_CAPABLE'
]
Existing to disable:  [
  '7FVHV7255H_IN_APP_PURCHASE',
  '7FVHV7255H_ON_DEMAND_INSTALL_CAPABLE'
]
✔ Synced capabilities: No updates
- Syncing capabilities identifiers
Linking ID to appGroups: group.com.REDACTED.expoappclip (UURVCR4XDB)
Updating bundle identifier with capability identifiers: [
  {
    capabilityType: 'APP_GROUPS',
    option: 'ON',
    relationships: { appGroups: [Array] }
  }
]
✖ Failed to sync capability identifiers com.REDACTED.expoappclip.Clip
Relationship is required but was not provided. - The relationship 'parentBundleId' is required but was not provided with this request.
UnexpectedAppleResponse: Relationship is required but was not provided. - The relationship 'parentBundleId' is required but was not provided with this request.
    at o.parseResponse (/Users/szabolcs/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:741792)
    at o.requestAndParseAsync (/Users/szabolcs/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:740477)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async o.fetchSingleModelAsync (/Users/szabolcs/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:740200)
    at async o.patchModelAsync (/Users/szabolcs/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:740306)
    at async l.updateBundleIdCapabilityAsync (/Users/szabolcs/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/node_modules/@expo/apple-utils/build/index.js:1:800954)
    at async syncCapabilityIdentifiersForEntitlementsAsync (/Users/szabolcs/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/build/credentials/ios/appstore/capabilityIdentifiers.js:104:9)
    at async syncCapabilityIdentifiersAsync (/Users/szabolcs/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/build/credentials/ios/appstore/ensureAppExists.js:91:37)
    at async syncCapabilitiesAsync (/Users/szabolcs/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/build/credentials/ios/appstore/ensureAppExists.js:80:5)
    at async ensureBundleIdExistsWithNameAsync (/Users/szabolcs/.nvm/versions/node/v18.17.0/lib/node_modules/eas-cli/build/credentials/ios/appstore/ensureAppExists.js:58:9) {
  errorInfo: "Relationship is required but was not provided. - The relationship 'parentBundleId' is required but was not provided with this request.",
  data: { errors: [ [Object] ] }
}
    Error: build command failed.

Reproducible demo or steps to reproduce from a blank project

  1. create new expo app with npx create-expo-app
  2. create native project with prebuild
  3. add react-native-app-clip library and follow setup instructions (npx expo install react-native-app-clip and adding config to app.json) – see: https://github.com/bndkt/react-native-app-clip?tab=readme-ov-file#installation
  4. run app with expo run:ios, then expo run:ios --scheme and select app clip (follow steps in react-native-app-clip readme for configuring Signing & Capabilities)
  5. attempt to run EAS build with: EXPO_DEBUG=true eas build --profile preview --platform ios
  6. Failure on Setting up credentials for target step.

The failure appears to be here (

`Failed to sync capability identifiers ${chalk.dim(bundleId.attributes.identifier)}`
) and it looks like the API call on line 140 may throw the exception.

@Lurtroxx
Copy link

Lurtroxx commented Mar 9, 2024

Same issue here!

@szdziedzic
Copy link
Member

@szdziedzic szdziedzic added needs more info eas build and removed needs review Issue is ready to be reviewed by a maintainer labels Apr 16, 2024
@szpasztor
Copy link
Author

Confirming this resolves the issue. The issue was that the documentation is not clear on the package, as it signals that this is necessary for building for the app store, but it looks like it's also necessary when building an internal distribution release.

Copy link

github-actions bot commented Jun 6, 2024

This issue is stale because it has been open for 30 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

@github-actions github-actions bot added the stale label Jun 6, 2024
Copy link

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.

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

No branches or pull requests

3 participants