braze-inc / braze-expo-plugin

Other
11 stars 10 forks source link

[Bug]: iOS does not build with latest @braze/react-native-sdk #21

Closed johnnyrwest closed 11 months ago

johnnyrwest commented 1 year ago

Which Platforms?

iOS

Which React Native Version?

0.72.4

Which @braze/expo-plugin version?

1.1.2

Which @braze/react-native-sdk SDK version?

8.0.0 and 7.0.0

Repro Rate

100% of the time

Steps To Reproduce

Example:

  1. npm install @braze/react-native-sdk
  2. npx expo install @braze/expo-plugin
  3. npx eas build --platform ios --local

Expected Behavior

Was expecting latest versions of both libs to install and correctly build together.

Actual Incorrect Behavior

Build exits with non-zero code: 1 for @braze/react-native-sdk versions 8.0.0 and 7.0.0, but succeeds on 6.0.2

Verbose Logs

for @braze/react-native-sdk version 8.0.0:
[INSTALL_PODS] [!] CocoaPods could not find compatible versions for pod "BrazeLocation":
[INSTALL_PODS]   In Podfile:
[INSTALL_PODS]     braze-react-native-sdk (from `../node_modules/@braze/react-native-sdk`) was resolved to 8.0.0, which depends on
[INSTALL_PODS]       BrazeLocation (~> 7.0.0)
[INSTALL_PODS] None of your spec sources contain a spec satisfying the dependency: `BrazeLocation (~> 7.0.0)`.
[INSTALL_PODS] You have either:
[INSTALL_PODS]  * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
[INSTALL_PODS]  * mistyped the name or version.
[INSTALL_PODS]  * not added the source repo that hosts the Podspec to your Podfile.
[INSTALL_PODS] [!] `<PBXResourcesBuildPhase UUID=`13B07F8E1A680F5B00A75B9A`>` attempted to initialize an object with an unknown UUID. `312E17064E334D99BE484531` for attribute: `files`. This can be the result of a merge and the unknown UUID is being discarded.
[INSTALL_PODS] 
Error: pod install exited with non-zero code: 31
    at ChildProcess.completionListener (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/spawn-async/build/spawnAsync.js:42:23)
    at Object.onceWrapper (node:events:642:26)
    at ChildProcess.emit (node:events:527:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
    ...
    at spawnAsync (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/spawn-async/build/spawnAsync.js:7:23)
    at spawn (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/turtle-spawn/dist/index.js:16:47)
    at installPods (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/ios/pod.js:11:38)
    at /Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/builders/ios.js:70:41
    at BuildContext.runBuildPhase (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/context.js:101:34)
    at buildAsync (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/builders/ios.js:69:19)
    at async runBuilderWithHooksAsync (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/builders/common.js:12:13)
    at async Object.iosBuilder (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/builders/ios.js:29:16)
    at async buildIosAsync (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/eas-cli-local-build-plugin/dist/ios.js:66:12)
    at async buildAsync (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/eas-cli-local-build-plugin/dist/build.js:54:29)

Build failed
Unknown error. See logs of the Install pods build phase for more information.
npx exited with non-zero code: 1
    Error: build command failed.

and for @braze/react-native-sdk version 7.0.0:
[INSTALL_PODS] [!] CocoaPods could not find compatible versions for pod "BrazeKit":
[INSTALL_PODS]   In Podfile:
[INSTALL_PODS]     braze-react-native-sdk (from `../node_modules/@braze/react-native-sdk`) was resolved to 7.0.0, which depends on
[INSTALL_PODS]       BrazeKit (~> 6.6.0)
[INSTALL_PODS] None of your spec sources contain a spec satisfying the dependency: `BrazeKit (~> 6.6.0)`.
[INSTALL_PODS] You have either:
[INSTALL_PODS]  * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
[INSTALL_PODS]  * mistyped the name or version.
[INSTALL_PODS]  * not added the source repo that hosts the Podspec to your Podfile.
[INSTALL_PODS] [!] `<PBXResourcesBuildPhase UUID=`13B07F8E1A680F5B00A75B9A`>` attempted to initialize an object with an unknown UUID. `72B3EE9BDD3449A7A7BFF4AA` for attribute: `files`. This can be the result of a merge and the unknown UUID is being discarded.
[INSTALL_PODS] 
Error: pod install exited with non-zero code: 31
    at ChildProcess.completionListener (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/spawn-async/build/spawnAsync.js:42:23)
    at Object.onceWrapper (node:events:642:26)
    at ChildProcess.emit (node:events:527:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
    ...
    at spawnAsync (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/spawn-async/build/spawnAsync.js:7:23)
    at spawn (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/turtle-spawn/dist/index.js:16:47)
    at installPods (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/ios/pod.js:11:38)
    at /Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/builders/ios.js:70:41
    at BuildContext.runBuildPhase (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/context.js:101:34)
    at buildAsync (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/builders/ios.js:69:19)
    at async runBuilderWithHooksAsync (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/builders/common.js:12:13)
    at async Object.iosBuilder (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/@expo/build-tools/dist/builders/ios.js:29:16)
    at async buildIosAsync (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/eas-cli-local-build-plugin/dist/ios.js:66:12)
    at async buildAsync (/Users/johnnyrwest/.npm/_npx/63539ccd18962a9d/node_modules/eas-cli-local-build-plugin/dist/build.js:54:29)

Build failed
Unknown error. See logs of the Install pods build phase for more information.
npx exited with non-zero code: 1
    Error: build command failed.

Additional Information

Other than described above, I was just setting up Braze and the Expo plugin using the example found here

jerielng commented 1 year ago

Hi @johnnyrwest, it looks like your local copy of the Podspecs might be out of sync with the remote CocoaPods repo. Could you try running pod repo update in your terminal to update the local references on your machine and see if that resolves the issue?

johnnyrwest commented 1 year ago

@jerielng I feel dumb now, that was the issue! Thank you for the help 🙌