braze-inc / braze-expo-plugin

Other
11 stars 10 forks source link

[Bug]: Build (Run gradlew | Install pods) error if using with `braze-react-native-sdk` (>= 2.0.0) #12

Closed karengrigoryan closed 1 year ago

karengrigoryan commented 1 year ago

Which Platforms?

Both

Which React Native Version?

0.70.5

Which @braze/expo-plugin version?

0.6.0

Which react-native-appboy-sdk SDK version?

2.1.0

Repro Rate

100%

Steps To Reproduce

  1. Install @braze/expo-plugin
  2. Install @braze/react-native-sdk (instead of deprecated react-native-appboy-sdk)
  3. Build/prebuild the app

Expected Behavior

It should correctly build the app.

Actual Incorrect Behavior

It throws an error for both platforms:

Logs from EAS.

Android

[stderr] A problem occurred evaluating project ':braze-expo-plugin'.
[stderr] > Project with path ':react-native-appboy-sdk' could not be found in project ':braze-expo-plugin'.

iOS

[!] Unable to find a specification for `react-native-appboy-sdk` depended upon by `ExpoAdapterBraze`

Verbose Logs

> Task :react-native-gradle-plugin:compileJava NO-SOURCE
> Task :react-native-gradle-plugin:classes
> Task :react-native-gradle-plugin:inspectClassesForKotlinIC
> Task :react-native-gradle-plugin:jar
[stderr] FAILURE: Build failed with an exception.
[stderr] * Where:
[stderr] Build file '/home/expo/workingdir/build/node_modules/@braze/expo-plugin/android/build.gradle' line: 48
[stderr] * What went wrong:
[stderr] A problem occurred evaluating project ':braze-expo-plugin'.
[stderr] > Project with path ':react-native-appboy-sdk' could not be found in project ':braze-expo-plugin'.
[stderr] * Try:
[stderr] > Run with --stacktrace option to get the stack trace.
[stderr] > Run with --info or --debug option to get more log output.
[stderr] > Run with --scan to get full insights.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 1m 46s

Additional Information

It seems like @braze/expo-plugin is not compatible with the new @braze/react-native-sdk package. It works correctly with the deprecatedreact-native-appboy-sdk.

wesleyorbin commented 1 year ago

Hi @karengrigoryan. We are working on an update to the Expo plugin to make it compatible with the newest version of the React Native SDK. It should be released by the end of this week. I'll update you here when it's available.

karengrigoryan commented 1 year ago

@wesleyorbin thanks a lot.

A small note: the current documentation for RN/Expo uses @braze/react-native-sdk (at the time of writing this comment).

wesleyorbin commented 1 year ago

Hi @karengrigoryan. We just released v1.0.0 of the plugin, which contains support for @braze/react-native-sdk v2.0.2+. Apologies for the confusion with the documentation. I'm going to close out this issue, but feel free to re-open a new one if you encounter new issues.