Guides

Troubleshooting

Fixes for the most common setup problems.

4 min readSDK 0.5.0

The SDK warns you about the most common setup mistakes in your console (Metro, during development). Look for these first:

WarningFix
Events are not being sent: consent is “unknown”Pass consent="granted", or call Riveora.setConsent('granted') once the user agrees.
No storage passed to <RiveoraProvider>Pass storage={new AsyncStorageAdapter(AsyncStorage)}.
projectKey must be the “pk_…” key from the dashboard’s Install pageThe key is missing or isn’t a pk_ key, so nothing is recorded. Check that the variable you read it from is set in every build.
Riveora did not recognise this projectKeyCopy the key, and the endpoint if your Install page shows one, from the dashboard’s Install page.
Riveora.identify() was given an email address or phone numberPass your internal user ID instead, e.g. your database ID.

For more detail, turn on debug logs. The SDK then also prints every event it drops, and why:

tsx
<RiveoraProvider projectKey="pk_your_project_key" logLevel="debug">

No events in the dashboard

  • Consent isn’t granted. The default is unknown, which sends nothing. Set consent="granted" or call Riveora.setConsent('granted').
  • Wrong project key. The key must start with pk_ and belong to the project you’re looking at. A key Riveora doesn’t know is rejected with a 401. A missing key, or one that doesn’t start with pk_, never crashes your app: the SDK logs an error and records nothing. Check that the variable you read it from is set in every build.
  • Events are still queued. Batches go out every 10 seconds or every 20 events. Call Riveora.flush() to send immediately.

Events stopped for a while

Two limits can pause new events. Each app can send up to 10,000 events a day on Starter and 100,000 on Pro (counted in UTC), so a bug that sends events in a loop can’t use up your month. And your apps together can send up to twice your plan’s monthly events; the dashboard warns you before that.

Past a limit, Riveora answers “try again later” until the day or month starts again. The SDK keeps the events on the phone and checks back about every 10 minutes, so nothing is lost unless more than 500 events pile up on one device. Your plan and this month’s events are under Settings → Plan, where you can also move to a bigger plan.

New events also pause when your free trial has ended, or your subscription was cancelled or its payment failed. The dashboard says so at the top of every page. Choose a plan or update your card under Settings → Plan, and events start coming in again within the hour. The 14-day trial only starts when real users arrive: your apps must have been used on 3 different devices or have sent 300 events, and either those came from 3 different networks over at least 24 hours, or 7 days have passed since your first events. Testing on your own phone doesn’t start it while it stays under 300 events and 3 devices.

Every launch is a new user

You didn’t pass storage, so the anonymous ID lives in memory only. Pass new AsyncStorageAdapter(AsyncStorage) to the provider.

Taps have no labels

  • Icon-only buttons have no text. Add an accessibilityLabel. Icons and badges (“Inbox” with a “3”) are left out of a button’s text.
  • Only short button text is used: at most two pieces of text and 40 characters. Rows with a lot of text, like a contact or a product card, and taps on plain text, get no text label to keep personal data out.
  • In lists, grids, carousels and anything built from an array (menus, option lists, plan cards, word chips), text and accessibility labels are only used when they’re the same on the neighbouring items, like a “Delete” button on every row. A name, a search or a recovery-phrase word differs from item to item, so it’s never sent. A testID shared by every item (e.g. testID="contact-row") still names them. On onboarding slides and carousels, a button another slide has too (“Next”, “Skip”) keeps its label; one only a single slide has (“Get started”) needs RiveoraLabel.
  • Single characters and lone numbers (“+”, “X”, “12”) are never labels. Keypad keys (“4”, “4 GHI”, an accessibility label like “Digit 4”, a testID like pin_4) get no text label (only the masked testID, pin_#) and no tap position, so a PIN can’t be worked out from the taps.
  • To name an element yourself, wrap it in <RiveoraLabel label="Plan: annual">. The label is sent as written, also in lists (never put personal data in it; emails and tokens are dropped).
  • Custom tab bars built from the routes count as a list: give their buttons accessibilityRole="tab", or use RiveoraLabel.
  • If you set captureText: false, only accessibility labels, placeholders, testIDs and RiveoraLabel are used.
  • Long numbers are masked by design, so a price like “1299” appears as “####”.

App version shows “Not reported”

Your app isn’t passing appVersion to RiveoraProvider, and the SDK doesn’t detect it by itself. Add appVersion={Constants.expoConfig?.version} (Expo, with import Constants from 'expo-constants') or appVersion={DeviceInfo.getVersion()} (bare React Native). New events then carry the version; older events stay “Not reported”.

Screens are missing

  • The tracker must be inside RiveoraProvider, mounted once.
  • With React Navigation, pass the same ref to NavigationContainer and ReactNavigationTracker.
  • Screens outside your navigator, like a login screen, need Riveora.screen(name).
  • Bottom sheets and modals drawn inside a screen aren’t routes. Call Riveora.screen(name) when they open.
  • The full list of screens comes from development builds only. In production, screens appear as people open them.
  • With React Navigation, screens in a nested navigator are listed once that navigator has been shown. Add others with extraScreens.

Screen pictures don’t appear

  • Not a development build. Pictures are only taken when __DEV__ is true; TestFlight and store builds never take them.
  • react-native-view-shot isn’t in the build. The console shows “Screen pictures for the dashboard are off”. Installing the package isn’t enough on its own, because it has native code:
    1. Install it: npx expo install react-native-view-shot.
    2. On iOS, if you build from Xcode or have an ios folder, run npx pod-install. (npx expo run:ios does this for you.)
    3. Rebuild: npx expo run:ios / npx expo run:android, Xcode, or a new EAS development build.
    4. Close the app completely and open the new build. Reloading in Metro isn’t enough.
  • You left the screen too quickly. Stay on it for about 2 seconds.
  • It already has a picture, or the app has reached 200 pictures. Remove or upload one on the screen’s page.
  • Consent isn’t granted. Pictures, like events, are only taken while consent is granted.

Metro can’t resolve expo-router

Import ExpoRouterTracker only from @riveora/react-native/expo-router, and only in apps that use Expo Router. The main entry point never imports Expo Router.

Inspecting the SDK at runtime

tsx
const info = Riveora.diagnostics();
// { queueSize: 3, consent: 'granted', sessionId: 'sess_…', anonymousId: 'anon_…' }
Something unclear or missing? Email us and we’ll improve this page.
Troubleshooting · Riveora Docs