---
isPrivate: true
title: Troubleshooting
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > Client SDKs > Troubleshooting
---

# Troubleshooting

{% section displayed-if="SDK is Browser" %}
This section only applies to users who meet the following criteria: SDK is Browser

## Overview{% #overview %}

If you experience unexpected behavior with Datadog Browser RUM, use this guide to resolve issues. If you continue to have trouble, contact [Datadog Support](https://docs.datadoghq.com/help) for further assistance. Regularly update to the latest version of the [RUM Browser SDK](https://github.com/DataDog/browser-sdk/blob/main/CHANGELOG.md), as each release contains improvements and fixes.

## Missing data{% #missing-data %}

If you can't see any RUM data or if data is missing for some users:

| Common causes                                                                                                                                                                                                                                                                         | Recommended fix                                                                                                                                                                                                                                                                                                                                                     |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Ad blockers prevent the RUM Browser SDK from being downloaded or sending data to Datadog.                                                                                                                                                                                             | Some ad blockers extend their restrictions to performance and marketing tracking tools. See the [Install the RUM Browser SDK with npm](https://docs.datadoghq.com/real_user_monitoring/application_monitoring/browser/setup.md#npm) and [forward the collected data through a proxy](https://docs.datadoghq.com/real_user_monitoring/guide/proxy-rum-data.md) docs. |
| Network rules, VPNs, or antivirus software can prevent the RUM Browser SDK from being downloaded or sending data to Datadog.                                                                                                                                                          | Grant access to the endpoints required to download the RUM Browser SDK or to send data. The list of endpoints is available in the [Content Security Policy documentation](https://docs.datadoghq.com/integrations/content_security_policy_logs.md#use-csp-with-real-user-monitoring-and-session-replay).                                                            |
| Scripts, packages, and clients initialized before the RUM Browser SDK can lead to missed logs, resources, and user actions. For example, initializing ApolloClient before the RUM Browser SDK may result in `graphql` requests not being logged as XHR resources in the RUM Explorer. | Check where the RUM Browser SDK is initialized and consider moving this step earlier in the execution of your application code.                                                                                                                                                                                                                                     |
| If you've set `trackViewsManually: true` and notice that no sessions are present, the application may have suddenly stopped sending RUM information even though there are no network errors.                                                                                          | Be sure to start an initial view after you've initialized RUM to prevent any data loss. See [Advanced Configuration](https://docs.datadoghq.com/real_user_monitoring/application_monitoring/browser/advanced_configuration.md?tab=npm#override-default-rum-view-names) for more information.                                                                        |

Read the [Content Security Policy guidelines](https://docs.datadoghq.com/integrations/content_security_policy_logs.md#use-csp-with-real-user-monitoring-and-session-replay) and make sure your website grants access to the RUM Browser SDK CDN and the intake endpoint.

## Issues running multiple RUM tools in the same application{% #issues-running-multiple-rum-tools-in-the-same-application %}

Datadog supports only one SDK per application. For optimal data collection and full functionality of all Datadog RUM SDK features, use only the Datadog RUM SDK.

### The RUM Browser SDK is initialized{% #the-rum-browser-sdk-is-initialized %}

Check if the RUM Browser SDK is initialized by running `window.DD_RUM.getInternalContext()` in your browser console and verify an `application_id`, `session_id`, and view object are returned:

{% image
   source="https://docs.dd-static.net/images/real_user_monitoring/browser/troubleshooting/success_rum_internal_context.0589f51fb04971fa41970baf12f3fee3.png?auto=format"
   alt="Successful get internal context command" /%}

If the RUM Browser SDK is not installed, or if it is not successfully initialized, you may see the following `ReferenceError: DD_RUM is not defined` error:

{% image
   source="https://docs.dd-static.net/images/real_user_monitoring/browser/troubleshooting/error_rum_internal_context.c1aadae7f8d9589ac0d08e0c4c8c0e9f.png?auto=format"
   alt="Error get internal context command" /%}

You can also check your browser developer tools console or network tab if you notice any errors related to the loading of the RUM Browser SDK.

**Note**: For accurate results, set `sessionSampleRate` to 100. For more information, see [Configure Your Setup For Browser RUM and Browser RUM & Session Replay Sampling](https://docs.datadoghq.com/real_user_monitoring/guide/sampling-browser-plans.md).

### Data to the Datadog intake{% #data-to-the-datadog-intake %}

The RUM SDK sends batches of event data to Datadog's intake every time one of these conditions has been met:

- Every 30 seconds
- When 50 events have been reached
- When the payload is >16 kB
- On `visibility:hidden` or `beforeUnload`

If data is being sent, you should see network requests targeting `api/v2/rum` (the URL origin part may differ due to RUM configuration) in the Network section of your browser developer tools:

{% image
   source="https://docs.dd-static.net/images/real_user_monitoring/browser/troubleshooting/network_intake-1.9fc1ae9bd4daab52329692fbf06c977f.png?auto=format"
   alt="RUM requests to Datadog intake" /%}

## RUM cookies{% #rum-cookies %}

The RUM Browser SDK relies on cookies to store session information and follow a [user session](https://docs.datadoghq.com/real_user_monitoring/application_monitoring/browser/data_collected.md?tab=session) across different pages. The cookies are first-party (they are set on your domain) and are not used for cross-site tracking. Here are the cookies set by the RUM Browser SDK:

| Cookie name        | Details                                                                                                                                                                                                                                                                                                                                                                    |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `_dd_s`            | Cookie used to group all events generated from a unique user session across multiple pages. It contains the current session ID, whether the session is excluded due to sampling, and the expiration date of the session. The cookie is extended for an extra 15 minutes every time the user interacts with the website, up to the maximum user session duration (4 hours). |
| `dd_site_test_*`   | Temporary cookie used to test for cookie support. Expires instantly.                                                                                                                                                                                                                                                                                                       |
| `dd_cookie_test_*` | Temporary cookie used to test for cookie support. Expires instantly.                                                                                                                                                                                                                                                                                                       |

**Note**: The `_dd_l`, `_dd_r`, and `_dd` cookies have been replaced with `_dd_s` in recent versions of the RUM Browser SDK.

## Session IDs, cookies, and RUM applications{% #session-ids-cookies-and-rum-applications %}

There is a one-to-one relation between a RUM session and the RUM application it belongs to. Therefore, the domain set for the `_dd_s` cookie is fully dedicated to the RUM application it is monitoring and cannot monitor any additional applications.

## "No cookie support detected" error with EUA authentication{% #no-cookie-support-detected-error-with-eua-authentication %}

If your application uses Enterprise User Administration (EUA) with a redirect to CMS IDM for authentication, the login flow fails when it occurs inside an iframe. During the redirect, the CSRF token is dropped, which is expected security behavior. Because CSRF protection cannot function correctly when the authentication sequence begins within an iframe, the application returns a `No cookie support detected` error.

To record the browser test successfully:

1. **Record using the popup window mode**: When starting the browser test recording, select **Open in Popup** instead of recording inside the iframe. This allows the authentication flow to complete without losing the CSRF token.
1. **Log out before recording**: Make sure there is no active session or saved cookies. Start the recording with a completely clean session.
1. **Use incognito/private browsing mode**: This prevents cached credentials or cookies from interfering with the authentication flow.
1. **Record once using the popup window**: After the test is recorded through the popup, it runs correctly from the private location.

## Technical limitations{% #technical-limitations %}

Each event sent by the RUM Browser SDK is built with the following:

- RUM global context
- Event context (if any)
- Attributes specific to the event

Example:

```
window.DD_RUM && window.DD_RUM.setGlobalContextProperty('global', {'foo': 'bar'})
window.DD_RUM && window.DD_RUM.addAction('hello', {'action': 'qux'})
```

The example code creates the following action event:

```
{
  "type": "action",
  "context": {
    "global": {
      "foo": "bar"
    },
    "action": "qux"
  },
  "action": {
    "id": "xxx",
    "target": {
      "name": "hello"
    },
    "type": "custom"
  },
  ...
}
```

If an event or a request goes beyond any of the [listed RUM technical limitations](https://docs.datadoghq.com/real_user_monitoring.md#technical-limitations), it is rejected by the Datadog intake.

## "Customer data exceeds the recommended threshold" warning{% #customer-data-exceeds-the-recommended-threshold-warning %}

The RUM Browser SDK allows you to set [global context](https://docs.datadoghq.com/real_user_monitoring/application_monitoring/browser/advanced_configuration.md?tab=npm#global-context), [user information](https://docs.datadoghq.com/real_user_monitoring/application_monitoring/browser/advanced_configuration.md?tab=npm#user-session), and [feature flags](https://docs.datadoghq.com/real_user_monitoring/feature_flag_tracking/setup.md?tab=browser), which are then included with the collected events.

To minimize the user bandwidth impact, the RUM Browser SDK throttles the data sent to the Datadog intake. However, sending large volumes of data can still impact the performance for users on slow internet connections.

For the best user experience, Datadog recommends keeping the size of the global context, user information, and feature flags below 3KiB. If the data exceeds this limit, a warning is displayed: `The data exceeds the recommended 3KiB threshold.`

Since v5.3.0, the RUM Browser SDK supports data compression through the `compressIntakeRequest` [initialization parameter](https://docs.datadoghq.com/real_user_monitoring/application_monitoring/browser/setup.md#initialization-parameters). When enabled, this recommended limit is extended from 3KiB to 16KiB.

## Cross origin read blocking warning{% #cross-origin-read-blocking-warning %}

On Chromium-based browsers, when the RUM Browser SDK sends data to the Datadog intake, a CORB warning is printed in the console: `Cross-Origin Read Blocking (CORB) blocked cross-origin response`.

The warning is shown because the intake returns a non-empty JSON object. This behavior is a reported [Chromium issue](https://bugs.chromium.org/p/chromium/issues/detail?id=1255707). It does not impact the RUM Browser SDK and can safely be ignored.

## "Deobfuscation failed" warning{% #deobfuscation-failed-warning %}

A warning appears when deobfuscation fails for a stack trace. If the stack trace is not obfuscated to begin with, you can ignore this warning. Otherwise, use the [RUM Debug Symbols page](https://app.datadoghq.com/source-code/setup/rum) to view all your uploaded source maps. See [Investigate Obfuscated Stack Traces with RUM Debug Symbols](https://docs.datadoghq.com/real_user_monitoring/guide/debug-symbols.md).
{% /section %}

{% section displayed-if="SDK is Android" %}
This section only applies to users who meet the following criteria: SDK is Android

## Overview{% #overview-2 %}

If you experience unexpected behavior with Datadog RUM, use this guide to resolve issues. If you continue to have trouble, contact [Datadog Support](https://docs.datadoghq.com/help) for further assistance.

## Check if Datadog RUM is initialized{% #check-if-datadog-rum-is-initialized %}

Use the utility method `isInitialized` to check if the SDK is properly initialized:

```
if (Datadog.isInitialized()) {
    // your code here
}
```

## Debugging{% #debugging %}

When writing your application, you can enable development logs by calling the `setVerbosity` method. All internal messages in the library with a priority equal to or higher than the provided level are then logged to Android's Logcat:

```
Datadog.setVerbosity(Log.INFO)
```

## RUM Debug Widget{% #rum-debug-widget %}

The [RUM Debug Widget](https://github.com/DataDog/dd-sdk-android/tree/develop/features/dd-sdk-android-rum-debug-widget) provides a floating overlay that displays key metrics such as memory usage, CPU load, and RUM events in real time. It is intended for debugging and development purposes only.

See the [module README](https://github.com/DataDog/dd-sdk-android/blob/develop/features/dd-sdk-android-rum-debug-widget/README.md) for setup instructions.

{% image
   source="https://docs.dd-static.net/images/real_user_monitoring/android/android-rum-debug-widget.dbd0dd922c26913dd72794e259cfc513.png?auto=format"
   alt="The RUM Debug Widget overlay displaying real-time metrics including memory, CPU, threads, and GC rate, with an events timeline showing Action, Resource, Slow, and Frozen event markers." /%}

## Migrating to 3.0.0{% #migrating-to-300 %}

If you've been using the SDK v2 or SDK v1, there are some breaking changes introduced in version `3.0.0`. See the [migration guide](https://docs.datadoghq.com/real_user_monitoring/guide/mobile-sdk-upgrade.md) for more information.

## "Deobfuscation failed" warning{% #deobfuscation-failed-warning-2 %}

A warning appears when deobfuscation fails for a stack trace. If the stack trace is not obfuscated to begin with, you can ignore this warning. Otherwise, use the [RUM Debug Symbols page](https://app.datadoghq.com/source-code/setup/rum) to view all your uploaded mapping files. See [Investigate Obfuscated Stack Traces with RUM Debug Symbols](https://docs.datadoghq.com/real_user_monitoring/guide/debug-symbols.md).
{% /section %}

{% section displayed-if="SDK is iOS" %}
This section only applies to users who meet the following criteria: SDK is iOS

## Overview{% #overview-3 %}

If you experience unexpected behavior with Datadog RUM, use this guide to resolve issues. If you continue to have trouble, contact [Datadog Support](https://docs.datadoghq.com/help) for further assistance.

## Check if Datadog SDK is properly initialized{% #check-if-datadog-sdk-is-properly-initialized %}

After you configure Datadog SDK and run the app for the first time, check your debugger console in Xcode. The SDK implements several consistency checks and outputs relevant warnings if something is misconfigured.

## Debugging{% #debugging-2 %}

When writing your application, you can enable development logs by setting the `verbosityLevel` value. Relevant messages from the SDK with a priority equal to or higher than the provided level are output to the debugger console in Xcode:

```
Datadog.verbosityLevel = .debug
```

You should then see output similar to the following, indicating that a batch of RUM data was properly uploaded:

```
[DATADOG SDK] 🐶 → 17:23:09.849 [DEBUG] ⏳ (rum) Uploading batch...
[DATADOG SDK] 🐶 → 17:23:10.972 [DEBUG]    → (rum) accepted, won't be retransmitted: success
```

**Recommendation:** Use `Datadog.verbosityLevel` in the `DEBUG` configuration, and unset it in `RELEASE`.

## "Deobfuscation failed" warning{% #deobfuscation-failed-warning-3 %}

A warning appears when deobfuscation fails for a stack trace. If the stack trace is not obfuscated to begin with, you can ignore this warning. Otherwise, use the [RUM Debug Symbols page](https://app.datadoghq.com/source-code/setup/rum) to view all your uploaded dSYMs. See [Investigate Obfuscated Stack Traces with RUM Debug Symbols](https://docs.datadoghq.com/real_user_monitoring/guide/debug-symbols.md).
{% /section %}

{% section displayed-if="SDK is Flutter" %}
This section only applies to users who meet the following criteria: SDK is Flutter

## Overview{% #overview-4 %}

If you experience unexpected behavior with Datadog RUM, use this guide to resolve issues. If you continue to have trouble, contact [Datadog Support](https://docs.datadoghq.com/help) for further assistance.

## Duplicate interface (iOS){% #duplicate-interface--ios %}

If you see this error while building iOS after upgrading to `datadog_flutter_plugin` v2.0:

```
Semantic Issue (Xcode): Duplicate interface definition for class 'DatadogSdkPlugin'
/Users/exampleuser/Projects/test_app/build/ios/Debug-iphonesimulator/datadog_flutter_plugin/datadog_flutter_plugin.framework/Headers/DatadogSdkPlugin.h:6:0
```

Try performing `flutter clean` && `flutter pub get` and rebuilding. This usually resolves the issue.

## Duplicate classes (Android){% #duplicate-classes--android %}

If you see this error while building Android after the upgrading to `datadog_flutter_plugin` v2.0:

```
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
```

Make sure that you've updated your version of Kotlin to at least 1.8 in your `build.gradle` file.

## CocoaPods issues{% #cocoapods-issues %}

If you have trouble building your iOS application after adding the Datadog SDK because of errors being thrown by CocoaPods, check which error you are getting. The most common error is an issue getting the most up-to-date native library from CocoaPods, which can be solved by running the following in your `ios` directory:

```
pod install --repo-update
```

Another common error is an issue loading the FFI library on Apple Silicon Macs. If you see an error similar to the following:

```
LoadError - dlsym(0x7fbbeb6837d0, Init_ffi_c): symbol not found - /Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi_c.bundle
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi.rb:6:in `rescue in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.13.1/lib/ffi.rb:3:in `<top (required)>'
```

Follow the instructions in the [Flutter documentation](https://github.com/flutter/flutter/wiki/Developing-with-Flutter-on-Apple-Silicon) for working with Flutter on Apple Silicon.

## Undefined symbol (iOS){% #undefined-symbol--ios %}

If you use Flutter's `build ios-framework` command, you may see errors similar to the following:

```
Undefined symbol: _OBJC_CLASS_$_PLCrashReport
Undefined symbol: _OBJC_CLASS_$_PLCrashReportBinaryImageInfo
Undefined symbol: _OBJC_CLASS_$_PLCrashReportStackFrameInfo
...
```

This occurs because the `build ios-framework` command does not properly include PLCrashReporter, which the Datadog Flutter SDK depends on. To resolve this issue, Datadog recommends manually including the PLCrashReporter dependency. The framework and instructions for including it are available on its [GitHub page](https://github.com/microsoft/plcrashreporter).

## Set sdkVerbosity{% #set-sdkverbosity %}

If you're able to run your app, but you are not seeing the data you expect on the Datadog site, try adding the following to your code before calling `DatadogSdk.initialize`:

```
DatadogSdk.instance.sdkVerbosity = CoreLoggerLevel.debug;
```

This causes the SDK to output additional information about what it's doing and what errors it's encountering, which may help you and Datadog Support narrow down your issue.

## Not seeing errors{% #not-seeing-errors %}

If you do not see any errors in RUM, it's likely no view has been started. Make sure you have started a view with `DatadogSdk.instance.rum?.startView` or, if you are using `DatadogRouteObserver` make sure your current Route has a name.

## Issues with automatic resource tracking and distributed tracing{% #issues-with-automatic-resource-tracking-and-distributed-tracing %}

The [Datadog tracking HTTP client](https://pub.dev/packages/datadog_tracking_http_client) package works with most common Flutter networking packages that rely on `dart:io`, including [`http`](https://pub.dev/packages/http) and [`Dio`](https://pub.dev/packages/dio).

If you are seeing resources in your RUM Sessions, then the tracking HTTP client is working, but other steps may be required to use distributed tracing.

By default, the Datadog RUM Flutter SDK samples distributed traces at only 20% of resource requests. While determining if there is an issue with your setup, you should set this value to 100% of traces by modifying your initialization with the following lines:

```
final configuration = DdSdkConfiguration(
   //
   rumConfiguration: DatadogRumConfiguration(
    applicationId: '<RUM_APPLICATION_ID>',
    tracingSamplingRate: 100.0
   ),
);
```

If you are still having issues, check that your `firstPartyHosts` property is set correctly. These should be hosts only, without schemas or paths, and they do not support regular expressions or wildcards. For example:

✅ Good - 'example.com', 'api.example.com', 'us1.api.sample.com' ❌ Bad - 'https://example.com', '*.example.com', 'us1.sample.com/api/*', 'api.sample.com/api'

## "Deobfuscation failed" warning{% #deobfuscation-failed-warning-4 %}

A warning appears when deobfuscation fails for a stack trace. If the stack trace is not obfuscated to begin with, you can ignore this warning. Otherwise, use the [RUM Debug Symbols page](https://app.datadoghq.com/source-code/setup/rum) to view all your uploaded symbol files, dSYMs, and mapping files. See [Investigate Obfuscated Stack Traces with RUM Debug Symbols](https://docs.datadoghq.com/real_user_monitoring/guide/debug-symbols.md).
{% /section %}

{% section displayed-if="SDK is React Native" %}
This section only applies to users who meet the following criteria: SDK is React Native

## Overview{% #overview-5 %}

If you experience unexpected behavior with Datadog React Native RUM, use this guide to resolve issues. If you continue to have trouble, contact [Datadog Support](https://docs.datadoghq.com/help) for further assistance.

## No data is being sent to Datadog{% #no-data-is-being-sent-to-datadog %}

Follow these instructions in order when the SDK has been installed and the app compiles, but no data is received by Datadog.

### Check the configuration{% #check-the-configuration %}

Sometimes, no data is sent due to a small misstep in the configuration.

Here are some common things to check for:

- Make sure your `clientToken` and `applicationId` are correct.
- Make sure you have not set `sessionSamplingRate` to something other than 100 (100 is the default value), or else your session might not be sent.
- If you've set up a `Proxy` in the Datadog configuration, check that it has been correctly configured.
- Check that you are **tracking views** (all events must be attached to a view) and **sending events**.

### Review SDK logs in React Native{% #review-sdk-logs-in-react-native %}

- Set `config.verbosity = SdkVerbosity.DEBUG`, which imports `SdkVerbosity` from `@datadog/mobile-react-native`.

- Logs start appearing in the JavaScript console, like the following output:

  ```
  INFO  DATADOG: Datadog SDK was initialized
  INFO  DATADOG: Datadog SDK is tracking interactions
  INFO  DATADOG: Datadog SDK is tracking XHR resources
  INFO  DATADOG: Datadog SDK is tracking errors
  DEBUG  DATADOG: Starting RUM View "Products" #Products-oaZlP_FVwGM5vtPoup_rT
  DEBUG  DATADOG: Adding RUM Action "RCTView" (TAP)
  ```

**Note**: In this example, the first four logs indicate that the SDK has been correctly configured and the last two lines are events that were sent.

#### Possible cause{% #possible-cause %}

If you are on iOS and see some DEBUG logs indicating that logs or RUM events were sent **before** the initialization logs, this may be why the SDK is not sending events.

You cannot send events before initialization, and attempting to do so puts the SDK in a state where it cannot send any data.

#### Solution{% #solution %}

{% tab title="DdSdkReactNative.initialize" %}
If you use `DdSdkReactNative.initialize` to start the Datadog SDK, call this function in your top-level `index.js` file so that the SDK is initialized before your other events are sent.
{% /tab %}

{% tab title="DatadogProvider" %}
Starting from SDK version `1.2.0`, you can initialize the SDK using the `DatadogProvider` component. This component includes a RUM events buffer that makes sure the SDK is initialized before sending any data to Datadog, which prevents this issue from happening.

To use it, see the [Migrate to the Datadog Provider guide](https://github.com/DataDog/dd-sdk-reactnative/blob/develop/docs/migrating_to_datadog_provider.md).
{% /tab %}

### Review native logs{% #review-native-logs %}

Reviewing native logs can give you more input on what could be going wrong.

#### On iOS{% #on-ios %}

- Open your project in Xcode by running `xed ios`.

- Build your project for a simulator or a device.

- Native logs start appearing on the bottom right corner:

  {% image
     source="https://docs.dd-static.net/images/real_user_monitoring/react_native/troubleshooting-xcode-logs.ed0ac40a5abf1c32d7b0b10893ae9feb.png?auto=format"
     alt="Reviewing native logs can help you determine why no data is being sent" /%}

You can filter logs by "DATADOG" and look for any error.

If you are indeed sending events, you should see the following logs:

```
[DATADOG SDK] 🐶 → 10:02:47.398 [DEBUG] ⏳ (rum) Uploading batch...
[DATADOG SDK] 🐶 → 10:02:47.538 [DEBUG]    → (rum) accepted, won't be retransmitted: [response code: 202 (accepted), request ID: AAAABBBB-1111-2222-3333-777788883333]
```

The first log indicates that some data is being sent, and the second log indicates that the data has been received.

##### Possible cause{% #possible-cause-2 %}

If you see the log below, it means that you have called a RUM method before initializing the SDK.

```
[DATADOG SDK] 🐶 → 10:09:13.621 [WARN] The `Global.rum` was called but no `RUMMonitor` is registered. Configure and register the RUM Monitor globally before invoking the feature:
```

##### Solution{% #solution-2 %}

{% tab title="DdSdkReactNative.initialize" %}
If you use `DdSdkReactNative.initialize` to start the Datadog SDK, call this function in your top-level `index.js` file so the SDK is initialized before your other events are sent.
{% /tab %}

{% tab title="DatadogProvider" %}
Starting from SDK version `1.2.0`, you can initialize the SDK using the `DatadogProvider` component. This component includes a RUM events buffer that makes sure the SDK is initialized before sending any data to Datadog, which prevents this issue from happening.

To use it, see the [Migrate to the Datadog Provider guide](https://github.com/DataDog/dd-sdk-reactnative/blob/develop/docs/migrating_to_datadog_provider.md).
{% /tab %}

#### On Android{% #on-android %}

- For a better debugging experience, Datadog recommends installing [pidcat](https://github.com/JakeWharton/pidcat).

  - pidcat filters the device logs (obtained by `adb logcat`) to only show the one from your application.
  - See [this issue](https://github.com/JakeWharton/pidcat/issues/180#issuecomment-1124019329) for M1 users who don't have Python 2.

- Modify `node_modules/@datadog/mobile-react-native/android/src/main/kotlin/com/datadog/reactnative/DdSdk.kt` to enable verbose logging from the native SDK:

  ```
  fun initialize(configuration: ReadableMap, promise: Promise) {
      // ...
  
      datadog.initialize(appContext, credentials, nativeConfiguration, trackingConsent)
      datadog.setVerbosity(Log.VERBOSE) // Add this line
  
      // ...
  }
  ```

- Run the app on a phone connected in debug mode to your laptop (should appear when running `adb devices`), or from an emulator.

- Run pidcat `my.app.package.name` or `adb logcat` from your laptop.

- Look for any error mentioning Datadog.

Pidcat output looks like this:

{% image
   source="https://docs.dd-static.net/images/real_user_monitoring/react_native/troubleshooting-pidcat-logs.88d8e7bd2dd8c472190db485417cb9bd.png?auto=format"
   alt="This is an example of a pidcat output" /%}

In this example, the last log indicates that the batch of RUM data was sent successfully.

## Undefined symbols: Swift{% #undefined-symbols-swift %}

If you see the following error message:

```
Undefined symbols for architecture x86_64:
  "static Foundation.JSONEncoder.OutputFormatting.withoutEscapingSlashes.getter : Foundation.JSONEncoder.OutputFormatting", referenced from:
      static (extension in Datadog):Foundation.JSONEncoder.default() -> Foundation.JSONEncoder in libDatadogSDK.a(JSONEncoder.o)
...
```

Open Xcode, go to the `Build Settings` of your project (not your app target), and make sure Library Search Paths have the following settings:

```
LIBRARY_SEARCH_PATHS = (
  "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
  "\"/usr/lib/swift\"",
  "\"$(inherited)\"",
);
```

## Undefined symbols: _RCTModule{% #undefined-symbols--rctmodule %}

If you see an undefined _RCTModule symbol, it may be related to this change in the [react-native v0.63 changelog](https://github.com/facebook/react-native/commit/6e08f84719c47985e80123c72686d7a1c89b72ed).

You can make the following change to fix it:

```
// DdSdk.m
// instead of
#import <React/RCTBridgeModule.h>
// maybe that:
@import React // or @import React-Core
```

## Infinite loop-like error messages{% #infinite-loop-like-error-messages %}

If you run into an [issue where your React Native project displays a stream of error messages and significantly raises your CPU usage](https://github.com/facebook/react-native/issues/28801), try creating a new React Native project.

## Android build failures with SDK version 2.*{% #android-build-failures-with-sdk-version-2 %}

### Unable to make field private final java.lang.String java.io.File.path accessible{% #unable-to-make-field-private-final-javalangstring-javaiofilepath-accessible %}

If your Android build fails with an error like:

```
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processReleaseMainManifest'.
> Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @1bbf7f0e
```

You are using Java 17, which is not compatible with your React Native version. Switch to Java 11 to solve the issue.

### java.lang.UnsupportedClassVersionError{% #javalangunsupportedclassversionerror %}

If your Android build fails with an error like:

```
java.lang.UnsupportedClassVersionError: com/datadog/android/lint/DatadogIssueRegistry has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
```

You are using a version of Java that is too old. Switch to Java 17 to solve the issue.

### Unsupported class file major version 61{% #unsupported-class-file-major-version-61 %}

If your Android build fails with an error like:

```
FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform dd-sdk-android-core-2.0.0.aar (com.datadoghq:dd-sdk-android-core:2.0.0) to match attributes {artifactType=android-manifest, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for JetifyTransform: /Users/me/.gradle/caches/modules-2/files-2.1/com.datadoghq/dd-sdk-android-core/2.0.0/a97f8a1537da1de99a86adf32c307198b477971f/dd-sdk-android-core-2.0.0.aar.
         > Failed to transform '/Users/me/.gradle/caches/modules-2/files-2.1/com.datadoghq/dd-sdk-android-core/2.0.0/a97f8a1537da1de99a86adf32c307198b477971f/dd-sdk-android-core-2.0.0.aar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 61. (Run with --stacktrace for more details.)
```

You are using a version of Android Gradle Plugin below `5.0`. To fix the issue, add in your `android/gradle.properties` file:

```
android.jetifier.ignorelist=dd-sdk-android-core
```

### Duplicate class kotlin.collections.jdk8.*{% #duplicate-class-kotlincollectionsjdk8 %}

If your Android build fails with an error like:

```
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkReleaseDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
   > Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk8-1.7.20 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.20)
     Duplicate class kotlin.internal.jdk7.JDK7PlatformImplementations found in modules jetified-kotlin-stdlib-1.8.10 (org.jetbrains.kotlin:kotlin-stdlib:1.8.10) and jetified-kotlin-stdlib-jdk7-1.7.20 (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.20)
```

You need to set a Kotlin version for your project to avoid clashes among Kotlin dependencies. In your `android/build.gradle` file, specify the `kotlinVersion`:

```
buildscript {
    ext {
        // targetSdkVersion = ...
        kotlinVersion = "1.8.21"
    }
}
```

Alternatively, you can add the following rules to your build script in your `android/app/build.gradle` file:

```
dependencies {
    constraints {
        implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.21") {
            because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
        }
        implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.21") {
            because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
        }
    }
}
```

## "Deobfuscation failed" warning{% #deobfuscation-failed-warning-5 %}

A warning appears when deobfuscation fails for a stack trace. If the stack trace is not obfuscated to begin with, you can ignore this warning. Otherwise, use the [RUM Debug Symbols page](https://app.datadoghq.com/source-code/setup/rum) to view all your uploaded source maps, dSYMs, and mapping files. See [Investigate Obfuscated Stack Traces with RUM Debug Symbols](https://docs.datadoghq.com/real_user_monitoring/guide/debug-symbols.md).
{% /section %}

{% section displayed-if="SDK is Kotlin Multiplatform" %}
This section only applies to users who meet the following criteria: SDK is Kotlin Multiplatform

## Overview{% #overview-6 %}

If you experience unexpected behavior with the Datadog Kotlin Multiplatform SDK, use this guide to resolve issues. If you continue to have trouble, contact [Datadog Support](https://docs.datadoghq.com/help) for further assistance.

## Check if Datadog RUM is initialized{% #check-if-datadog-rum-is-initialized-2 %}

Use the utility method `isInitialized` to check if the SDK is properly initialized:

```
if (Datadog.isInitialized()) {
    // your code here
}
```

## Debugging{% #debugging-3 %}

When writing your application, you can enable development logs by calling the `setVerbosity` method. All internal messages in the library with a priority equal to or higher than the provided level are then logged either to Android's Logcat or to the debugger console in Xcode:

```
Datadog.setVerbosity(SdkLogVerbosity.DEBUG)
```

## Set tracking consent (GDPR compliance){% #set-tracking-consent--gdpr-compliance %}

To be compliant with GDPR, the SDK requires the tracking consent value at initialization. Tracking consent can be one of the following values:

- `TrackingConsent.PENDING`: (Default) The SDK starts collecting and batching the data but does not send it to the collection endpoint. The SDK waits for the new tracking consent value to decide what to do with the batched data.
- `TrackingConsent.GRANTED`: The SDK starts collecting the data and sends it to the data collection endpoint.
- `TrackingConsent.NOT_GRANTED`: The SDK does not collect any data. You are not able to manually send any logs, traces, or RUM events.

To update the tracking consent after the SDK is initialized, call `Datadog.setTrackingConsent(<NEW CONSENT>)`. The SDK changes its behavior according to the new consent. For example, if the current tracking consent is `TrackingConsent.PENDING` and you update it to:

- `TrackingConsent.GRANTED`: The SDK sends all current batched data and future data directly to the data collection endpoint.
- `TrackingConsent.NOT_GRANTED`: The SDK wipes all batched data and does not collect any future data.

## Common problems{% #common-problems %}

### iOS binary linking{% #ios-binary-linking %}

#### Missing `PLCrashReporter` symbols{% #missing- %}

If there is an error during the linking step about missing `PLCrashReporter` symbols in the linker search paths, like the following:

```
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_PLCrashReport", referenced from:
       in DatadogCrashReporting[arm64][15](PLCrashReporterIntegration.o)
  "_OBJC_CLASS_$_PLCrashReportBinaryImageInfo", referenced from:
       in DatadogCrashReporting[arm64][7](CrashReport.o)
  "_OBJC_CLASS_$_PLCrashReportStackFrameInfo", referenced from:
       in DatadogCrashReporting[arm64][7](CrashReport.o)
  "_OBJC_CLASS_$_PLCrashReportThreadInfo", referenced from:
       in DatadogCrashReporting[arm64][7](CrashReport.o)
  "_OBJC_CLASS_$_PLCrashReporter", referenced from:
       in DatadogCrashReporting[arm64][15](PLCrashReporterIntegration.o)
  "_OBJC_CLASS_$_PLCrashReporterConfig", referenced from:
       in DatadogCrashReporting[arm64][15](PLCrashReporterIntegration.o)
```

Then you need to explicitly pass the `CrashReporter` framework name to the linker:

```
targets.withType(KotlinNativeTarget::class.java) {
   compilations.getByName("main").compileTaskProvider {
       compilerOptions {
           freeCompilerArgs.addAll(
               listOf(
                  "-linker-option",
                  "-framework CrashReporter"
               )
           )
       }
   }
}

```

#### Missing `swiftCompatibility` symbols{% #missing--2 %}

If there is an error during the linking step about missing `swiftCompatibility` symbols in the linker search paths, like the following:

```
Undefined symbols for architecture arm64:
  "__swift_FORCE_LOAD_$_swiftCompatibility56", referenced from:
      __swift_FORCE_LOAD_$_swiftCompatibility56_$_DatadogCrashReporting in DatadogCrashReporting[arm64][4](BacktraceReporter.o)
  "__swift_FORCE_LOAD_$_swiftCompatibilityConcurrency", referenced from:
      __swift_FORCE_LOAD_$_swiftCompatibilityConcurrency_$_DatadogCrashReporting in DatadogCrashReporting[arm64][4](BacktraceReporter.o)
```

Then you can suppress this error:

```
targets.withType(KotlinNativeTarget::class.java) {
   compilations.getByName("main").compileTaskProvider {
       compilerOptions {
           freeCompilerArgs.addAll(
               listOf(
                  "-linker-option",
                  "-U __swift_FORCE_LOAD_\$_swiftCompatibility56",
                  "-linker-option",
                  "-U __swift_FORCE_LOAD_\$_swiftCompatibilityConcurrency"
               )
           )
       }
   }
}

```
{% /section %}

{% section displayed-if="SDK is Roku" %}
This section only applies to users who meet the following criteria: SDK is Roku

## Overview{% #overview-7 %}

If you experience unexpected behavior with the Datadog Roku SDK, use this guide to resolve issues. If you continue to have trouble, contact [Datadog Support](https://docs.datadoghq.com/help) for further assistance.

## SDK not sending data to Datadog{% #sdk-not-sending-data-to-datadog %}

If your channel is running but no data appears in Datadog, verify that the `site` parameter in your initialization matches the datacenter for your Datadog organization:

```
datadogroku_initialize({
    clientToken: "<CLIENT_TOKEN>",
    applicationId: "<APPLICATION_ID>",
    site: "datadoghq.com", ' Update this value to match your organization's datacenter
    env: "<ENV_NAME>",
    sessionSampleRate: 100,
    launchArgs: args
})
```

The default value (`datadoghq.com`) routes data to the US1 datacenter. If your organization is on EU1, AP1, or another region, update this value accordingly. See the [Roku Channel Monitoring Setup](https://docs.datadoghq.com/real_user_monitoring/application_monitoring/roku/setup.md) for the correct `site` value for your region.

## Operation method names differ from other SDKs{% #operation-method-names-differ-from-other-sdks %}

The Roku SDK uses different method names for tracking feature operations than other Datadog SDKs. If you are following documentation written for iOS, Android, or other SDKs, use the Roku equivalents:

| Other SDKs              | Roku SDK           |
| ----------------------- | ------------------ |
| `startFeatureOperation` | `startOperation`   |
| (success)               | `succeedOperation` |
| (failure)               | `failOperation`    |
{% /section %}

{% section displayed-if="SDK is Unity" %}
This section only applies to users who meet the following criteria: SDK is Unity

## Overview{% #overview-8 %}

If you experience unexpected behavior with Datadog RUM, use this guide to resolve issues. If you continue to have trouble, contact [Datadog Support](https://docs.datadoghq.com/help) for further assistance.

## Set sdkVerbosity for easier debugging{% #set-sdkverbosity-for-easier-debugging %}

If you're able to run your app, but you are not seeing the data you expect on the Datadog site, try adding the following to your code as part of initialization:

```
DatadogSdk.Instance.SetSdkVerbosity(CoreLoggerLevel.Debug);
```

This causes the SDK to output additional information about what it's doing and what errors it's encountering, which may help you and Datadog Support narrow down your issue.

## The SDK is not sending data{% #the-sdk-is-not-sending-data %}

{% alert level="info" %}
Datadog does not support sending data from the Unity Editor, only from iOS and Android simulators, emulators, and devices.
{% /alert %}

If you're not seeing any data in Datadog:

1. Make sure you are running your app on an iOS or Android simulator, emulator, or device, and not from the editor.

1. Check that you have set the `TrackingConsent` as part of your initialization. Tracking consent is set to `TrackingConsent.Pending` during initialization, and needs to be set to `TrackingConsent.Granted` before Datadog sends any information.

   ```
   DatadogSdk.Instance.SetTrackingConsent(TrackingConsent.Granted);
   ```
{% /section %}



{% image
   source="https://docs.dd-static.net/images/real_user_monitoring/browser/troubleshooting/success_rum_internal_context.0589f51fb04971fa41970baf12f3fee3.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/real_user_monitoring/browser/troubleshooting/success_rum_internal_context.0589f51fb04971fa41970baf12f3fee3.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="" /%}

{% image
   source="https://docs.dd-static.net/images/real_user_monitoring/browser/troubleshooting/error_rum_internal_context.c1aadae7f8d9589ac0d08e0c4c8c0e9f.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/real_user_monitoring/browser/troubleshooting/error_rum_internal_context.c1aadae7f8d9589ac0d08e0c4c8c0e9f.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="" /%}

{% image
   source="https://docs.dd-static.net/images/real_user_monitoring/browser/troubleshooting/network_intake-1.9fc1ae9bd4daab52329692fbf06c977f.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/real_user_monitoring/browser/troubleshooting/network_intake-1.9fc1ae9bd4daab52329692fbf06c977f.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="" /%}

{% image
   source="https://docs.dd-static.net/images/real_user_monitoring/android/android-rum-debug-widget.dbd0dd922c26913dd72794e259cfc513.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/real_user_monitoring/android/android-rum-debug-widget.dbd0dd922c26913dd72794e259cfc513.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="" /%}

{% image
   source="https://docs.dd-static.net/images/real_user_monitoring/react_native/troubleshooting-xcode-logs.ed0ac40a5abf1c32d7b0b10893ae9feb.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/real_user_monitoring/react_native/troubleshooting-xcode-logs.ed0ac40a5abf1c32d7b0b10893ae9feb.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="" /%}

{% image
   source="https://docs.dd-static.net/images/real_user_monitoring/react_native/troubleshooting-pidcat-logs.88d8e7bd2dd8c472190db485417cb9bd.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/real_user_monitoring/react_native/troubleshooting-pidcat-logs.88d8e7bd2dd8c472190db485417cb9bd.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="" /%}


