Troubleshoot React Native known issues

BETA

New Relic Mobile's React Native agent is in beta, so we are continuing to resolve known issues. To have the best experience with installing and using React Native, make sure your mobile apps meet the compatibility and requirements.

General errors

Known issues and possible solutions include:

Issues with React Native versions 0.59 or lower

We officially support React Native 0.60. This feature may work with a lower version, but those versions are not supported.

JavaScript errors have a null location attribute

If errors are being thrown without an error constructor, the agent won't be able to report a location for the JS error location. If you see errors with throw "An Error", replace them with this:

throw Error("An Error")

Error: "[NRMA] Critical error with the agent - failed to start"

The error [NRMA] Critical error with the agent - failed to start may appear in these situations:

  • The JavaScript has loaded correctly, but the underlying native modules aren’t loaded.
  • The agent is in an Expo app, because Expo is JavaScript only.

iOS

Known issues and possible solutions include:

Issues with older iOS versions

This feature will have issues with iOS versions 12 or lower. Workaround options include:

Recommended:

  1. Go to ios/podFile in your project.
  2. Update platform :ios, '9.0' to platform :ios, '12.0'.

Less recommended: Change the podspec in our package to target 9.0 instead of 12.

  1. Go to node_modules/newrelic-mobile-rn/newrelic-mobile-rn.podspec.
  2. Update s.platform = :ios, '12.0' to s.platform = :ios, '9.0'.

This solution requires you to make this change every time you npm install our package.

iOS build fails from missing newrelic_postbuild.sh script

To work around this problem:

  1. Open your Xcode workspace file and navigate to your app's Build phases.
  2. Delete the New Relic - Post build step, or comment out the script execution in the step.
Errors when manually uploading iOS dSYM files

To manually upload the app's dDSYM files, see the New Relic Mobile documentation.

iOS linker errors when building for all architectures

You may see linker errors because of missing symbols when running react-native run-ios --configuration release. This is because the React Native agent does not ship with i386 or armv7 architectures.

      Undefined symbols for architecture armv7:
    "_OBJC_CLASS_$_NRMAStack", referenced from:
        objc-class-ref in libnewrelic-mobile-rn.a(NRMModularAgent.o)
    "_OBJC_CLASS_$_NRMAStackFrame", referenced from:
        objc-class-ref in libnewrelic-mobile-rn.a(NRMModularAgent.o)
    "_OBJC_CLASS_$_NRMAStackTrace", referenced from:
        objc-class-ref in libnewrelic-mobile-rn.a(NRMModularAgent.o)
    "_OBJC_CLASS_$_NRMAStackException", referenced from:
        objc-class-ref in libnewrelic-mobile-rn.a(NRMModularAgent.o)
    "_OBJC_CLASS_$_NewRelic", referenced from:
        objc-class-ref in libnewrelic-mobile-rn.a(NRMModularAgent.o)
  ld: symbol(s) not found for architecture armv7
  clang: error: linker command failed with exit code 1 (use -v to see invocation)

To fix this:

  1. Go to your project-level build settings in your Xcode project.
  2. Go to Architectures > Valid Architectures > Release, and add another Any iOS Simulator SDK setting.
  3. Set the iOS Simulator SDK value to x86_64.
  4. Remove the armv7 architectures from the Valid Architectures > Release configuration.

Android

Known issues and possible solutions include:

Issues with older Android versions

This feature will have issues with older Android versions. To work around outdated versions, update the project’s minimum SDK version, or update our agent’s minimum SDK version.

This solution requires you to make this change every time you npm install our package.

ProGuard obfuscation is not supported

This release does not support code obfuscation or any ProGuard feature that generates a mapping.txt file. However, this should not affect code shrinking, resource shrinking, or optimizations.

Other programming languages

Known issues and possible solutions include:

Expo

Expo is not supported. However, we are tracking requests for it through the React Native beta discussion board in New Relic's Explorers Hub.

TypeScript

TypeScript will work, but we don’t have a definition file for it to call our APIs. However, we are tracking requests for it through the React Native beta discussion board in New Relic's Explorers Hub.

For more help

During the public beta, we welcome your questions and comments through the React Native beta discussion board in New Relic's Explorers Hub. Support requests also will be routed there.