Skip to content

[Bug]: Push notifications deep links not working on cold start when prod build #43

@undeadborn

Description

@undeadborn

Which Platforms?

Android

Which React Native Version?

0.79.6

Which @braze/expo-plugin version?

4.0.0

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

19.0.0

Repro Rate

100%

Steps To Reproduce

The issue happens only on Android cold starts when in a prod build.

Everything works fine on local development.
Everything works fine on iOS.

How to reproduce:

  1. Setup Braze on Expo project with new architecture enabled
  2. Use the following Expo configuration
androidApiKey: "android-api-key",
iosApiKey: "ios-api-key",
baseUrl: "base-url",
enableFirebaseCloudMessaging: true,
firebaseCloudMessagingSenderId: "firebase-cloud-messaging-sender-id",
androidHandlePushDeepLinksAutomatically: true,
enableBrazeIosPush: true,
  1. Call Braze.getInitialPushPayload on app startup to check for the url prop to redirect

Expected Behavior

  • Braze.getInitialPushPayload must return the push payload
  • App should redirect to the deep link

Actual Incorrect Behavior

  • Braze.getInitialPushPayload always returns null
  • App is not redirecting to the deep link

Verbose Logs

Additional Information

This issue almost look like braze-inc/braze-react-native-sdk#301 (comment)

This issue happened just after upgrading from Expo 52 to Expo 53 and enabled new architecture.

Since braze/react-native-sdk latest version 19.0.0 mentions to include BrazeReactUtils.populateInitialPushPayloadFromIntent(intent) on MainActivity.kt I tried creating a custom Expo plugin to include that line, but we get the same result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions