Expo and Segment failing when initialize


const androidWriteKey = “xxxxxxxxxxxxxxxxxxxxx”;
const iosWriteKey = “xxxxxxxxxxxxxxxxxxxxx”;
Segment.initialize({ androidWriteKey, iosWriteKey });

Fails with "Attempt to invoke interface method ‘abi28_0_0.com.facebook.react.bridge.ReadableMayKeySetIterator abi28_0_0.com.facebook.react.bridge.ReableMap.keySetIterator()’ on a null object reference.

Any ideas?


That’s not the issue, the issue is a later line Expo.Segment.trackWithProperties(“Application Opened”), which is passing through null props. It should just be Expo.Segment.track(“Application Opened”). However, if you comment out the Segment.initialize , then the trackWithProperties doesn’t throw an error, I’m assuming that’s because there is an initialization check upfront.


@coderworx Happy you got it resolved! Thanks for sharing the answer with the community.



closed #3

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.