No data appears (React Native)

Problem

End of beta

Thank you for participating in our React Native beta! We have ended the beta period. As of July 1, 2020, your React Native agent data will no longer appear in your New Relic apps, and support will end on August 1, 2020. To avoid potential errors, be sure to remove the agent from your apps before then. For more information, see New Relic's Explorers Hub post.

You installed New Relic Mobile for your iOS and Android apps monitored by React Native. You have generated some traffic in your apps and waited at least five minutes, but no data appears in the New Relic UI.

Solution

If no data appears after you install the React Native agent, generate some traffic for your apps, and wait at least five minutes, try these solutions:

Check the runtime logs for errors.

The most common reason for not seeing your data is if native libraries didn’t link correctly. Look for the logs in the JavaScript console, or build your app with XCode/Android to get the native logs. Also, doing a full clean on the native side and restarting everything can sometimes help with this issue.

  1. Make sure your system meets the compatibility and requirements.
  2. Make sure that you are calling the Mobile React Native agent on the first line of onCreate() in the MainActivity class.
  3. Make sure you are running the agent on the main thread.
  4. Check whether your React Native app exceeds the 64k multidex limit.

New Relic Mobile for React Native does not support starting the agent from another class.

Temporarily increase logging level.

Increase the logging level for your iOS and Android apps, and examine your logs for errors.

For example, for your Android app:

  1. Increase the New Relic logging level to AUDIT using withLogLevel:

    NewRelic.withApplicationToken("YOUR_APP_TOKEN")
            .withLogLevel(AgentLog.AUDIT)
            .start(this.getApplication());
    
  2. Generate a few minutes of activity in your app.
  3. Examine the device log and your application build logs for issues.
  4. When finished, return the logging level to INFO (default).

Check mobile endpoint.

In addition to checking logs, confirm the device can reach the New Relic Mobile endpoint at mobile-collector.newrelic.com.

For more help

As of July 1, 2020, your React Native agent data will no longer appear in your New Relic apps, and support will end on August 1, 2020. To avoid potential errors, be sure to remove the agent from your apps before then. For more information, see New Relic's Explorers Hub post.