Adopture Docs
SDKsReact Native

Troubleshooting

Common issues and debugging tips for the Adopture React Native SDK.

No Events Appearing

  1. Check your app key — Ensure it matches the key from your Adopture dashboard. Format: ak_ followed by 24 alphanumeric characters.

  2. Enable debug mode — Add debug: true to see all SDK activity in the console:

<AdoptureProvider appKey="ak_..." options={{ debug: true }}>
  1. Check the console — Look for log lines prefixed with [Adopture]. You should see initialization, event tracking, and batch sending logs.

  2. Verify peer dependencies — Ensure @react-native-async-storage/async-storage and react-native-get-random-values are installed. Missing peer deps cause silent failures.

  3. Check the API endpoint — If using a custom endpoint, ensure it's reachable from the device/simulator.

Events Are Delayed

This is expected behavior. Events are batched and sent every 30 seconds (or when 20 events are queued). In debug mode, events are sent immediately.

To send events right away in production:

await Adopture.flush();

Rate Limit Errors

If you see 429 responses in the console, you're sending events too quickly. The SDK handles this automatically — it logs the Retry-After header and continues on the next flush cycle. No events are lost.

To reduce request frequency, increase the flush interval:

<AdoptureProvider
  appKey="ak_..."
  options={{ flushIntervalMs: 60000, flushAt: 50 }}
>

SDK Not Initialized

If you see errors about the SDK not being initialized:

  • Ensure AdoptureProvider wraps your app at the root level
  • If using the imperative API, await Adopture.init() before calling any other methods
  • Check that initialization isn't wrapped in conditional logic

Missing Native Modules

iOS: Run cd ios && pod install after installing dependencies.

Android: Native modules are auto-linked. If you have issues, run npx react-native clean and rebuild.

Expo: Use npx expo install instead of npm install to ensure compatible versions. Run npx expo prebuild if you encounter native module errors.

Opt-Out and Disable

To disable tracking (e.g. for a privacy toggle):

// Disable — stops tracking, clears the event queue
await Adopture.disable();

// Re-enable
Adopture.enable();

Check SDK State

Inspect the SDK state at any time:

Adopture.isInitialized  // true if init() completed
Adopture.isEnabled      // true if tracking is active
Adopture.queueLength    // number of queued events
Adopture.sessionId      // current session UUID

On this page