segmentio / analytics-react-native

The hassle-free way to add analytics to your React-Native app.
https://segment.com/docs/sources/mobile/react-native/
MIT License
354 stars 182 forks source link

BrazePlugin error: Segment client not initialising correctly #829

Closed danbatsb closed 1 year ago

danbatsb commented 1 year ago

Hi team

Updating the @segment/analytics-react-native-plugin-braze to version 0.5.3 seems to break Segment initialisation. It seems to be an issue in the BrazePlugin in the update function, when the brazeSettings are undefined. Its this line here that seems to be breaking things.

If I remove the Braze plugin then Segment works fine, similarly if I update that code to check if brazeSettings exists then it all works fine. I've downgraded the plugin to 0.5.1 for now as that doesn't have this code and works ok.

Screenshot 2023-05-15 at 18 29 23

"@braze/react-native-sdk": "^4.1.0",
"@segment/analytics-react-native": "^2.14.0",
"@segment/analytics-react-native-plugin-braze": "0.5.3",
"@segment/sovran-react-native": "^1.0.2",
"react-native": "0.70.5"
alanjcharles commented 1 year ago

Hi @danbatsb I'm not able to replicate this. I just set up braze in our example app on the latest versions and everything seems to work as expected. Make sure you have all of the native braze initialization setup as they've changed that recently. If you're still running into errors I would recommend reaching out to friends@segment.com for a quicker turnaround time.