Giter VIP home page Giter VIP logo

braze-expo-plugin's People

Contributors

davidbielik avatar jerielng avatar wesleyorbin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

braze-expo-plugin's Issues

[Bug]: Android doesn't build on android

Which Platforms?

Android

Which React Native Version?

0.70.5

Which @braze/expo-plugin version?

1.1.0

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

3.0.0

Repro Rate

100%

Steps To Reproduce

My steps:

  1. rm -rf node_modules android .expo.
  2. yarn
  3. expo prebuild --clean
  4. expo run:android

Expected Behavior

Android app will be builded

Actual Incorrect Behavior

The are two errors:

  1. :expo-dev-launcher:compileDebugKotlin
  2. java.lang.StackOverflowError (no error message)

Verbose Logs

> Task :expo-dev-launcher:compileDebugKotlin FAILED

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':expo-dev-launcher:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings

Execution optimizations have been disabled for 6 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.

Additional Information

My expo version is 48

[Bug]: iOS not hitting any push notification listeners

Which Platforms?

iOS

Which React Native Version?

"react-native": "0.72.6",

Which @braze/expo-plugin version?

"@braze/expo-plugin": "^1.1.2",

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

"@braze/react-native-sdk": "^8.0.0",

Repro Rate

100%

Steps To Reproduce

Followed the developer guides to implement the braze expo plugin

   plugins: [
      '@react-native-firebase/app',
      '@react-native-firebase/dynamic-links', // https://rnfirebase.io/dynamic-links/usage#ios-setup
      [
        '@braze/expo-plugin',
        {
          baseUrl: 'sdk.iad-05.braze.com',
          androidApiKey:
            getEnvVar(EnvKeys.BRAZE_ANDROID_API_KEY) ||
            process.env.EXPO_PUBLIC_BRAZE_ANDROID_API_KEY,
          iosApiKey:
            getEnvVar(EnvKeys.BRAZE_IOS_API_KEY) || process.env.EXPO_PUBLIC_BRAZE_IOS_API_KEY,
          enableBrazeIosPush: true,
          enableFirebaseCloudMessaging: true,
          firebaseCloudMessagingSenderId: '869676010842',
          androidHandlePushDeepLinksAutomatically: true,
        },
      ],
      [
        'expo-build-properties',
        {
          ios: {
            deploymentTarget: '13.0',
            useFrameworks: 'static',
          },
        },
      ],
    ],

I also have braze.changeUser() when logging in.

I keep getting BadDeviceToken for iOS push notifications. I have FCM setup through EAS credentials as well. Android is working just fine when sending push notifications from braze campaigns. Also should note that when i test FCM push notifications through curl, i receive them just fine on iOS.

I should note as well that i have received In App Messaging on both iOS and Android, so i know the keys and baseUrl is setup correctly.

Expected Behavior

To receive the Test push notifications sending to my iOS device

Actual Incorrect Behavior

No braze push notification comes through, and sometimes ill get a BadDeviceToken show up in the message activity logs.

I should note that everytime i send it to my email that is signed into app on iOS, i get a success message on the push notification sending.

Verbose Logs

No response

Additional Information

No response

[Bug]: No Braze log messages (even with logLevel: 0)

Which Platforms?

iOS (not tried on android)

Which React Native Version?

0.70.5

Which @braze/expo-plugin version?

0.5.0, 0.6.0

Which react-native-appboy-sdk SDK version?

1.41.0

Repro Rate

100% of the time

Steps To Reproduce

  1. import Braze from "react-native-appboy-sdk".
  2. invoke Braze.enableSDK() somewhere in the app

Expected Behavior

Verbose logging.

Likely a separate issue as probably by design, but it's surprising sdk methods such as getContentCards don't fail when the sdk hasn't been configured correctly - they silently return.

Actual Incorrect Behavior

Zero Braze logs (even when sdk hasn't been configured correctly, eg attempting to get content cards with invalid API keys).

Verbose Logs

No response

Additional Information

Can reproduce on a new project - https://github.com/pwfcurry/braze-sdk-sandbox

This definitely worked at some point last year - sadly I don't recall the versions of the plugin or appboy.

[Feature]: Support configuration of com_braze_push_small_notification_icon (and possibly others) via this plugin

What problem are you facing?

When setting up push notifications for android following the expo docs here there was no mention of custom small icons, as well as other custom configuration that is available through the standard docs via configuration in the braze.xml file.

I was stuck with one of those sexy mono-color squares for a small icon until I stumbled across the standard integration docs and realized what was up.

Screenshot 2023-04-10 at 10 59 01 PM

To simplify the workflow and avoid needing to edit the braze.xml file directly, it'd be nice if some new config options were added to ConfigProps and the ANDROID_CONFIG_MAP so that way these items could be configured when calling, withBraze.

The workaround described allows me to do this by passing config including these to withBraze

  'notificationSmallIcon': '@drawable/notification_icon',
  'notificationAccentColor': '@color/notification_icon_color'

Screenshot 2023-04-10 at 11 24 44 PM

Workarounds

As an npm postinstall I currently run this script to modify ANDROID_CONFIG_MAP and withBrazeAndroid implementation so that I can set notification icon and accent color with the config I pass to withBraze.

const brazeAndroidConstantsPath = `${process.cwd()}/node_modules/@braze/expo-plugin/build/brazeAndroidConstants.js`;
let brazeAndroidConstantsContents = fs.readFileSync(brazeAndroidConstantsPath).toString();
brazeAndroidConstantsContents = brazeAndroidConstantsContents.replace(
  'exports.ANDROID_CONFIG_MAP = {',
  `exports.ANDROID_CONFIG_MAP = {
    "notificationSmallIcon": ["com_braze_push_small_notification_icon", 'drawable'],
    "notificationAccentColor": ["com_braze_default_notification_accent_color", 'color'],`);
fs.writeFileSync(brazeAndroidConstantsPath, brazeAndroidConstantsContents);

const withBrazeAndroidPath = `${process.cwd()}/node_modules/@braze/expo-plugin/build/withBrazeAndroid.js`;
let withBrazeAndroidContents = fs.readFileSync(withBrazeAndroidPath).toString();
withBrazeAndroidContents = withBrazeAndroidContents.replace(`break;
            }`, `break;
                default:
                    brazeXml += \`<\${xmlKeyType} name="\${xmlKeyName}">\${value}</\${xmlKeyType}>\`;
            }`);
fs.writeFileSync(withBrazeAndroidPath, withBrazeAndroidContents);

Ideal Solution

Something along the lines of this...

  • Add the following entries to the ANDROID_CONFIG_MAP portion of src/brazeAndroidConstants.ts:
"notificationSmallIcon": ["com_braze_push_small_notification_icon", 'drawable'],
"notificationAccentColor": ["com_braze_default_notification_accent_color", 'color'],
  • Add the following entries to ConfigProps in src/types.ts:
notificationSmallIcon?: string,
notificationAccentColor?: string
  • Add a default xml tag case to src/withBrazeAndroid - or add new explicit cases for drawable/color if you prefer that
default:
    brazeXml += `<${xmlKeyType} name="${xmlKeyName}">${value}</${xmlKeyType}>`;

Other Information

It'd be worth considering other braze.xml configurable options to add to this type/map as well. Unless there are particular reasons to exclude certain options from being configured via withBraze might as well add them.

[Bug]: Example throws an error

Which Platforms?

iOS

Which React Native Version?

0.78.1

Which @braze/expo-plugin version?

1.1.1

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

2.1.0

Repro Rate

100%

Steps To Reproduce

Clone the repository and follow the steps in the example/ README.

Expected Behavior

Expo prebuild should succeed and the example app should run.

Actual Incorrect Behavior

An error is thrown when running expo prebuild

Verbose Logs

› npx expo prebuild

✔ Created native projects | /android, /ios already created | gitignore already synced
✔ Updated package.json and added index.js entry point for iOS and Android
🧶 Using Yarn to install packages. Pass --npm to use npm instead.
✔ Installed JavaScript dependencies 490ms
✖ Config sync failed
Cannot read properties of undefined (reading 'withJsEnginePodfileProps')
TypeError: Cannot read properties of undefined (reading 'withJsEnginePodfileProps')
    at withIosExpoPlugins (/.config/yarn/global/node_modules/@expo/prebuild-config/src/plugins/withDefaultPlugins.ts:58:5)
    at getPrebuildConfig (/.config/yarn/global/node_modules/@expo/prebuild-config/src/getPrebuildConfig.ts:78:14)
    at getPrebuildConfigAsync (.config/yarn/global/node_modules/@expo/prebuild-config/src/getPrebuildConfig.ts:24:10)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at configureManagedProjectAsync (/.config/yarn/global/node_modules/expo-cli/src/commands/eject/configureProjectAsync.ts:48:25)
    at prebuildAsync (/.config/yarn/global/node_modules/expo-cli/src/commands/eject/prebuildAppAsync.ts:88:21)
    at actionAsync (/.config/yarn/global/node_modules/expo-cli/src/commands/eject/prebuildAsync.ts:37:3)

Additional Information

No response

[Feature]: Custom notification sound support

What problem are you facing?

The only thing stopping me from using this plugin is lack of support for custom sounds. Let me know if I am mistaken and this is supported!

Workarounds

None that I am aware of

Ideal Solution

Expo Notifications supports custom sounds like this: https://docs.expo.dev/versions/latest/sdk/notifications/#example-appjson-with-config-plugin

{
  "expo": {
    "plugins": [
      [
        "expo-notifications",
        {
          "icon": "./local/assets/notification-icon.png",
          "color": "#ffffff",
          "sounds": [
            "./local/assets/notification-sound.wav",
            "./local/assets/notification-sound-other.wav"
          ]
        }
      ]
    ]
  }
}

Other Information

No response

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

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

[Bug]: Failed to build android with expo sdk 50

Which Platforms?

Android

Which React Native Version?

0.73.2

Which @braze/expo-plugin version?

1.2.0

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

8.3.0

Repro Rate

100% of this time

Steps To Reproduce

  1. Upgrade expo sdk to 50
  2. Try android build

Expected Behavior

Successful Build

Actual Incorrect Behavior

Execution failed for task ':braze-expo-plugin:compileDebugKotlin'.

'compileDebugJavaWithJavac' task (current target is 17) and 'compileDebugKotlin' task (current target is 11) jvm target compatibility should be set to the same Java version.
Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain

  • Try:

Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.

Verbose Logs

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':braze-expo-plugin:compileDebugKotlin'.
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:149)
	at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:147)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:135)
	at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
	at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)
	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:199)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:157)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:73)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:331)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:318)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.lambda$execute$0(DefaultTaskExecutionGraph.java:314)
	at org.gradle.internal.operations.CurrentBuildOperationRef.with(CurrentBuildOperationRef.java:80)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:314)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
Caused by: org.gradle.api.GradleException: 'compileDebugJavaWithJavac' task (current target is 17) and 'compileDebugKotlin' task (current target is 11) jvm target compatibility should be set to the same Java version.
Consider using JVM toolchain: https://kotl.in/gradle/jvm/toolchain

	at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.validateKotlinAndJavaHasSameTargetCompatibility(Tasks.kt:797)
	at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompilerAsync$kotlin_gradle_plugin_common(Tasks.kt:722)
	at org.jetbrains.kotlin.gradle.tasks.KotlinCompile.callCompilerAsync$kotlin_gradle_plugin_common(Tasks.kt:530)
	at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile.executeImpl(Tasks.kt:450)
	at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile.execute(Tasks.kt:417)

Additional Information

No response

[Bug]: expo prebuild not working

Which Platforms?

Both

Which React Native Version?

0.68.2

Which @braze/expo-plugin version?

1.0.1

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

2.1.0

Repro Rate

100%

Steps To Reproduce

Example:

  1. expo prebuild.

Expected Behavior

Should install and synch the configuration native, so should be create the ios and android folders.

Actual Incorrect Behavior

Show the following errors:
Cannot find module 'expo/config-plugins'

Verbose Logs

Cannot find module 'expo/config-plugins'
Require stack:  
/...../node_modules/@braze/expo-plugin/build/withBraze.js
- /......./node_modules/@braze/expo-plugin/app.plugin.js
- /opt/homebrew/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/build/utils/plugin-resolver.js
- /opt/homebrew/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/build/plugins/withStaticPlugin.js
- /opt/homebrew/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/build/plugins/withPlugins.js
- /opt/homebrew/lib/node_modules/expo-cli/node_modules/@expo/config-plugins/build/index.js
- /opt/homebrew/lib/node_modules/expo-cli/node_modules/@expo/config/build/plugins/withConfigPlugins.js
- /opt/homebrew/lib/node_modules/expo-cli/node_modules/@expo/config/build/Config.js
- /opt/homebrew/lib/node_modules/expo-cli/node_modules/@expo/config/build/index.js
- /opt/homebrew/lib/node_modules/expo-cli/build/utils/migration.js
- /opt/homebrew/lib/node_modules/expo-cli/build/commands/eject/prebuildAsync.js
- /opt/homebrew/lib/node_modules/expo-cli/build/commands/eject/prebuild.js
- /opt/homebrew/lib/node_modules/expo-cli/build/commands/index.js
- /opt/homebrew/lib/node_modules/expo-cli/build/exp.js
- /opt/homebrew/lib/node_modules/expo-cli/bin/expo.js

Additional Information

Part of my package.jso:
"dependencies": {
"@braze/expo-plugin": "^1.0.1",
"@braze/react-native-sdk": "^2.1.0",
"@expo/config-plugins": "^4.1.0",
"expo": "^45.0.0",
"react": "17.0.2",
"react-native": "0.68.2",
"react-native-config": "^1.5.0",
},

part of my app.config.js:
plugins: [
[
'@braze/expo-plugin',
{
androidApiKey: 'APIKEY',
iosApiKey: 'APIKEY,
baseUrl: 'baseUrl',
},
],
],

Plugin sets "useFrameworks" to "static"

Which Platforms?

iOS

Which React Native Version?

0.70.5

Which @braze/expo-plugin version?

1.0.0

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

1.41.0

Repro Rate

100

Steps To Reproduce

When running the expo prebuild command

"ios.useFrameworks": "static"

is added on the Podfile.properties.json file.

This, will break builds that are using Flipper, for example.

I think this should be listed somewhere in the docs.

Expected Behavior

Docs should warn of plugin setting useFramework to static

Actual Incorrect Behavior

"ios.useFrameworks": "static"

Verbose Logs

No response

Additional Information

No response

Compatibility Expo SDK 47

Since Expo SDK 47 was released, the minimum deployment target needed for iOS is 13.

The current platform version defined in the ExpoAdapterBraze.podspec is 12. It makes impossible to install this plugin on a project with Expo SDK 47 without having this error :


compiling for iOS 12.0, but module 'ExpoModulesCore' has a minimum deployment target of iOS 13.0

Would it be possible to upgrade the platform version in the podspec from 12 to 13 ?

[RichNotifications]: how to enable rich push notifications with the expo plugin?

What problem are you facing?

I have push notifications all setup with expo project and braze working. But i know with my bare RN app, i had to setup a rich service extension to allow images to be attach to push notifications.

Is that currently available in the expo plugin? If not, how can that be added?

Workarounds

Not sure - attaching images to iOS push notifications do not show up in the push notification

Ideal Solution

that can be added to either the plugin config setup, or steps to add a plugin to add the rich service extension to the expo project

Other Information

"@braze/expo-plugin": "^1.1.2",
"@braze/react-native-sdk": "^8.0.0",
"expo": "^49.0.0",

[Bug]: We Cant Open App on press

Which Platforms?

Android

Which React Native Version?

All

Which @braze/expo-plugin version?

0.5.0

Which react-native-appboy-sdk SDK version?

1.41.0

Repro Rate

With a push with "Open app on Press" on Android

Steps To Reproduce

Setup Braze on a project with push notification
Send push notification on Android user
Try to press on the notification

Expected Behavior

Open the App

Actual Incorrect Behavior

The press on the Push notification on Android does not anything

Verbose Logs

No response

Additional Information

I found a troubleshooting in the documentation, after trying to modify the src directly in my node module, its works,
https://www.braze.com/docs/developer_guide/platform_integration_guides/android/push_notifications/android/troubleshooting#tapping-push-notification-doesnt-open-the-app

You can find my PR on your Repo :
#9

[Bug]: [iOS] Build error - 'Braze.Configuration.Push' has no member 'automation'

Which Platforms?

iOS

Which React Native Version?

0.72.6

Which @braze/expo-plugin version?

1.2.0

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

2.1.0

Repro Rate

100%

Steps To Reproduce

Example:

  1. Install SDK: npx expo install @braze/react-native-sdk@~2.1.0.
  2. Install Expo Plugin: npx expo install @braze/expo-plugin@^1.2.0.
  3. Add plugin to app.json:
    {
      // ...
      "plugins": [
       "@react-native-firebase/app",
       [
         "@braze/expo-plugin",
         {
           "androidApiKey": "YOUR-ANDROID-API-KEY",
           "iosApiKey": "YOUR-IOS-API-KEY",
           "baseUrl": "mock-braze.local",
           "sessionTimeout": 60,
           "enableGeofence": false,
           "enableBrazeIosPush": false,
           "enableFirebaseCloudMessaging": false,
           "firebaseCloudMessagingSenderId": "YOUR-FCM-SENDER-ID",
           "androidHandlePushDeepLinksAutomatically": true,
           "enableSdkAuthentication": false,
           "logLevel": 0,
           "minimumTriggerIntervalInSeconds": 0,
           "enableAutomaticLocationCollection": false,
           "enableAutomaticGeofenceRequests": false,
           "dismissModalOnOutsideTap": true,
           "androidPushNotificationHtmlRenderingEnabled": true,
           "androidNotificationAccentColor": "#ff3344",
           "iosRequestPushPermissionsAutomatically": false
         }
       ]
    }
  4. Prebuild: npx expo prebuild.
  5. Re-install Pods: cd ios && pod install --repo-update.
  6. Run the app in iOS Simulator: npx expo run:ios.

Expected Behavior

The app should build and run normally.

Actual Incorrect Behavior

The iOS build process exited with error: value of type 'Braze.Configuration.Push' has no member 'automation'

Verbose Logs

# expo run:ios
# ...

› Compiling @braze/react-native-sdk Pods/braze-react-native-sdk » BrazeReactBridge.m
› Compiling @braze/react-native-sdk Pods/braze-react-native-sdk » braze-react-native-sdk-dummy.m
› Compiling @braze/react-native-sdk Pods/braze-react-native-sdk » BrazeReactUtils.m
› Compiling @braze/expo-plugin Pods/ExpoAdapterBraze » BrazeAppDelegate.swift

❌  (node_modules/@braze/expo-plugin/ios/ExpoAdapterBraze/BrazeAppDelegate.swift:72:28)

  70 | 
  71 |       if let useBrazePush = plistConfig["UseBrazePush"] as? Bool, useBrazePush {
> 72 |         configuration.push.automation = true
     |                            ^ value of type 'Braze.Configuration.Push' has no member 'automation'
  73 |         configuration.push.automation.requestAuthorizationAtLaunch = false
  74 |       }
  75 | 


❌  (node_modules/@braze/expo-plugin/ios/ExpoAdapterBraze/BrazeAppDelegate.swift:73:28)

  71 |       if let useBrazePush = plistConfig["UseBrazePush"] as? Bool, useBrazePush {
  72 |         configuration.push.automation = true
> 73 |         configuration.push.automation.requestAuthorizationAtLaunch = false
     |                            ^ value of type 'Braze.Configuration.Push' has no member 'automation'
  74 |       }
  75 | 
  76 |       if let requestAuthorizationAtLaunch = plistConfig["RequestPushPermissionsAutomatically"] as? Bool,


❌  (node_modules/@braze/expo-plugin/ios/ExpoAdapterBraze/BrazeAppDelegate.swift:78:28)

  76 |       if let requestAuthorizationAtLaunch = plistConfig["RequestPushPermissionsAutomatically"] as? Bool,
  77 |          requestAuthorizationAtLaunch {
> 78 |         configuration.push.automation.requestAuthorizationAtLaunch = true
     |                            ^ value of type 'Braze.Configuration.Push' has no member 'automation'
  79 |       }
  80 | 
  81 |       let braze = BrazeReactBridge.perform(#selector(BrazeReactBridge.initBraze(_:)), with: configuration).takeUnretainedValue() as! Braze

› Compiling expo-splash-screen Pods/EXSplashScreen » EXSplashScreenModule.m
› Compiling expo-keep-awake Pods/ExpoKeepAwake » ExpoKeepAwake-dummy.m
› Compiling @braze/expo-plugin Pods/ExpoAdapterBraze » ExpoAdapterBraze-dummy.m

# ... warnings about "Script has ambiguous dependencies causing it to run on every build."

› 3 error(s), and 3 warning(s)

CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65.
error Command failed with exit code 1.

Additional Information

I'm trying to install Braze SDK in my Expo/React Native project, according to the documentation, but get stuck here when trying to run on iOS.

Other Lib Versions

  • Expo SDK: 49.0.21

[Bug]: Deeplinks not working with push notification on iOS when app is closed

Which Platforms?

iOS

Which React Native Version?

react-native

Which @braze/expo-plugin version?

^1.0.0

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

^2.0.2

Repro Rate

100%

Steps To Reproduce

  1. Quit the app.
  2. Send notification with deep link.
  3. Braze.getInitialURL returns null.

Expected Behavior

Braze.getInitialURL should return the deep link sent with the notification.

Actual Incorrect Behavior

Braze.getInitialURL returns null.

Verbose Logs

No response

Additional Information

This issue has been reported on the braze-inc/braze-react-native-sdk before multiple times:

But the issue still persists when using this Expo config plugin.

[Bug]: Push notifications on Android do not arrive

Which Platforms?

Android

Which React Native Version?

0.70.8

Which @braze/expo-plugin version?

1.1.1

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

4.1.0

Repro Rate

100%

Steps To Reproduce

After adding to the Braze project, when from the Tool of Expo notifications (https://expo.dev/Notifications) I try to send a notification on an Android device, the device does not receive the push notification.
If, on the other hand, I remove the Braze dependencies and try to send a notification, the device receives notifications again.

  • "@braze/expo-plugin": "^1.1.1"
  • "@braze/react-native-sdk": "^4.1.0"

Expected Behavior

Even after setting braze, notifications must continue to work the same.

Actual Incorrect Behavior

Android devices do not receive notifications

Verbose Logs

Braze v24.3.0 .Braze FirebaseMessagingService( 1683): Remote message did not originate from Braze. Not consuming remote message: com.google.firebase.messaging.RemoteMessage

Additional Information

No response

[Bug]: The Swift pod `ExpoAdapterBraze` depends upon `react-native-appboy-sdk`, which does not define modules

Which Platforms?

iOS

Which React Native Version?

0.70.5

Which @braze/expo-plugin version?

0.4.0

Which react-native-appboy-sdk SDK version?

1.40.0

Repro Rate

100% of the time

Steps To Reproduce

Example:

  1. npx create-expo-app expo-braze-app
  2. npm install [email protected] @braze/[email protected]
  3. Add plugin config in the app.json
"plugins": [
  [
    "@braze/expo-plugin",
    {
      "androidApiKey": "ANDROID_API_KEY",
      "iosApiKey": "IOS_API_KEY",
      "baseUrl": "BRAZE_URL",
      "enableBrazeIosPush": true,
      "enableFirebaseCloudMessaging": true,
      "firebaseCloudMessagingSenderId": "SENDER_ID"
    }
  ]
]
  1. npx expo prebuild -> get an error Something went wrong running pod install in the ios directory. Command pod install failed.
  2. Run cd ios/ && pod install to try to install the iOS dependencies manually and check if I can get more details on the error.

Expected Behavior

It should install iOS pods without errors.

Actual Incorrect Behavior

Instead, I get this error on the pod install

Installing react-native-appboy-sdk (1.40.0)
[!] The following Swift pods cannot yet be integrated as static libraries:

The Swift pod `ExpoAdapterBraze` depends upon `react-native-appboy-sdk`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies

Verbose Logs

The Swift pod `ExpoAdapterBraze` depends upon `react-native-appboy-sdk`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies

Additional Information

If we don't want to modify the Podfile of our app (as we are in managed workflow), it looks like that something needs to be added in the podspec of the react-native-appboy-sdk (https://blog.cocoapods.org/CocoaPods-1.5.0/)

[Bug]: expo doctor reports @expo/config-plugins incompatibility with Expo 47

Which Platforms?

Both

Which React Native Version?

0.70.5

Which @braze/expo-plugin version?

0.5.0

Which react-native-appboy-sdk SDK version?

1.41.0

Repro Rate

100% of the time

Steps To Reproduce

When using Expo 47, run expo doctor.

> expo doctor
Expected package @expo/config-plugins@^5.0.2
Found invalid:
  @expo/[email protected]
  (for more info, run: npm why @expo/config-plugins)

Expected Behavior

expo doctor passes

Actual Incorrect Behavior

expo doctor fails

Verbose Logs

> yarn why @expo/config-plugins
yarn why v1.22.19
[1/4] 🤔  Why do we have the module "@expo/config-plugins"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "@expo/[email protected]"
info Has been hoisted to "@expo/config-plugins"
info Reasons this module exists
   - Hoisted from "expo#@expo#config-plugins"
   - Hoisted from "expo-updates#@expo#config-plugins"
   - Hoisted from "expo#@expo#cli#@expo#config-plugins"
   - Hoisted from "expo#@expo#config#@expo#config-plugins"
   - Hoisted from "expo-splash-screen#@expo#prebuild-config#@expo#config-plugins"
info Disk size without dependencies: "1.98MB"
info Disk size with unique dependencies: "3.63MB"
info Disk size with transitive dependencies: "7.39MB"
info Number of shared dependencies: 46
=> Found "@braze/expo-plugin#@expo/[email protected]"
info This module exists because "@braze#expo-plugin" depends on it.
info Disk size without dependencies: "1.6MB"
info Disk size with unique dependencies: "3.25MB"
info Disk size with transitive dependencies: "7.02MB"
info Number of shared dependencies: 46
✨  Done in 1.06s.

Additional Information

This doesn't appear to be causing any issues, other than expo doctor failing, but we've yet to use the braze sdk in anger.

One option is to pin the dependency via a resolution, but we'd rather avoid that.

[Feature]: Return a promise and success or push token from Braze.requestPushPermission();

What problem are you facing?

Working on a React Native Expo Go app for Walmart. Using my personal account here since Walmart uses on-prem github. We have onboarding flow where the user is push primed then given the OS-level prompt from Braze.requestPushPermission(), and once that's completed, sent along the onboarding flow.

Without Braze.requestPushPermission() returning a promise, we can't wait for it. so the user is shown the next onboaring screen prematurely.

Workarounds

The only way around this that I've found is a a setTimeout of about 5000 ms. Super hacky and obv bad UX. I thought you might have listeners I could subscribe to. Something like Braze.addListener('pushPermissionChange', onPermissionChange); but that doesn't seem to be the case either.

Ideal Solution

Either return a promise and success message (or the token) or some kind of listener we can use.

Other Information

No response

[Bug]: Could not get unknown property 'kotlinVersion' when building

TLDR @braze/expo-plugin v0.4.0 isn't compatible with react-native-appboy-sdk v1.39 & v1.40 -- downgrade to v1.38 to fix

Which Platforms?

Android

Which React Native Version?

0.68.2

Which @braze/expo-plugin version?

0.4.0

Which react-native-appboy-sdk SDK version?

1.40.0

Repro Rate

100% of the time

Steps To Reproduce

yarn add @braze/[email protected] [email protected]
# add braze config to app.json…
eas build --platform android --local

Expected Behavior

Build succeeds

Actual Incorrect Behavior

Build fails

Verbose Logs

[RUN_GRADLEW] Using expo modules
…
[RUN_GRADLEW]   - braze-expo-plugin (0.4.0)
…
[RUN_GRADLEW] FAILURE: Build failed with an exception.
[RUN_GRADLEW] * Where:
[RUN_GRADLEW] Build file '/private/var/…/build/node_modules/react-native-appboy-sdk/android/build.gradle' line: 33
[RUN_GRADLEW] * What went wrong:
[RUN_GRADLEW] A problem occurred evaluating project ':react-native-appboy-sdk'.
[RUN_GRADLEW] > Could not get unknown property 'kotlinVersion' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
[RUN_GRADLEW] * Try:
[RUN_GRADLEW] > Run with --stacktrace option to get the stack trace.
[RUN_GRADLEW] > Run with --info or --debug option to get more log output.
[RUN_GRADLEW] > Run with --scan to get full insights.
[RUN_GRADLEW] * Get more help at https://help.gradle.org
[RUN_GRADLEW] BUILD FAILED
[RUN_GRADLEW] Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
[RUN_GRADLEW] You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
[RUN_GRADLEW] See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
[RUN_GRADLEW] 6 actionable tasks: 6 executed
[RUN_GRADLEW] in 55s
[RUN_GRADLEW] Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

Additional Information

Due to braze-inc/braze-react-native-sdk#164 (released in 1.39.0), we've been unable to build our app:

> EAS_LOCAL_BUILD_SKIP_CLEANUP=1 eas build --platform android --local --non-interactive
…
[RUN_GRADLEW] A problem occurred evaluating project ':react-native-appboy-sdk'.
[RUN_GRADLEW] > Could not get unknown property 'kotlinVersion' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

Downgrading to v1.38.0 fixes the issue.

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

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.