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

An internal error occurred: Status code failure 404 #825

Open ns-wahed opened 1 year ago

ns-wahed commented 1 year ago

Hi Team, We are trying to add a @segment/analytics-react-native-plugin-appsflyer as a plugin, and whenever we are using the track function segmentClient it throws an error of Status code 404, is anyone facing the same?

Here's the code we are using to add the plugin:

import {createClient, SegmentError} from '@segment/analytics-react-native';
import {AppsflyerPlugin} from '@segment/analytics-react-native-plugin-appsflyer';

const errorHandler = (error: SegmentError) => {
  console.info('ERROR ON SEGMENT CLIENT  ------  ', error);
};

const segmentClient = createClient({
  writeKey: SEGMENT_KEY,
  trackAppLifecycleEvents: true,
  autoAddSegmentDestination: true,
  errorHandler
});
const plugin = new AppsflyerPlugin();
segmentClient.add({plugin});
"@segment/analytics-react-native": "^2.14.0",
"@segment/analytics-react-native-plugin-appsflyer": "^0.5.2",
"@segment/sovran-react-native": "^1.0.2",
"react": "18.0.0",
"react-native": "0.69.8",

Screenshot 2023-05-05 at 8 09 18 PM

alanjcharles commented 1 year ago

Hi @ns-wahed I've been trying to track this down for a few weeks. I get this error when I use Appsflyer in our example and in a standalone hello-world app just using the Appsflyer SDK without Segment. The only place I could get it to work was with the actual AppsFlyer react native example in their repository. It seems to me they've changed something on their end and it's not apparent as to what that could be. I would recommend reaching out to them, or trying to just initialize the Appsflyer SDK outside of Segment to see if your experience is the same. Please let me know, at this point there's not much we can do on our side.