Skip to content

Troubleshooting

TurboModuleRegistry.getEnforcing(...): 'DeaSdk' could not be found

Cause: The native half of the SDK is not in the app binary. Either the app was not rebuilt after installing the package, the New Architecture is off, or the app runs in Expo Go.

Solution: Make sure the New Architecture is enabled (it is the default from React Native 0.76), then rebuild the native app rather than reloading JavaScript:

cd ios && pod install && cd ..
npx react-native run-ios
npx react-native run-android

Expo Go cannot load the SDK. See Expo.

pod install fails: Unable to find a specification for DeaSDK

Cause: The package's iOS half depends on the native iOS SDK (DeaSDK and DeaBase), and no published pod source has it.

Solution: None is available to an integrating app — see iOS setup.

Android build fails: Could not find ai.dea:dea-sdk

Cause: The package's Android half depends on ai.dea:dea-sdk at its own version. DEA's Maven repository serves 0.2.2 only, and the artifact is not on Maven Central.

Solution: None is available to an integrating app — see Android setup.

Every call rejects with DeaSdk.init has not been called

Cause: The call ran before init resolved, or after dispose().

Solution: Await init before other calls, for example by keeping its promise:

import * as Dea from '@dea/react-native';

export const deaStarted = Dea.init({appId: 'YOUR_APP_ID'});

// elsewhere
await deaStarted;
const {result} = await Dea.getClassification();

init rejects with … is not supported

Cause: The app runs on a React Native target other than Android or iOS, such as React Native Web.

Solution: Call the SDK only on Android and iOS:

import {Platform} from 'react-native';

if (Platform.OS === 'android' || Platform.OS === 'ios') {
  await Dea.init({appId: 'YOUR_APP_ID'});
}

For a web build, use the Web SDK.

started.ready is false

Cause: The SDK's scoring engine could not start in this build. Capture continues, but there is no score, and the classification stays insufficient. started.coreFault says why.

Solution: Log coreFault and include it when contacting DEA support. Check that the @dea/react-native version and the native SDK version it resolves are the same release.

getClassification() always resolves insufficient or undetermined

Cause: One of the following:

  1. The user has not consented, so nothing is recorded.
  2. The session has fewer actions than the model asks for, 8 with the built-in model: the result is insufficient. See Evidence.
  3. Capture was paused and never resumed.
  4. The SDK cannot score (started.ready is false): the result is insufficient.
  5. The result is undetermined: the score is at or above the model's bot threshold but below its human threshold.

Solution: Check each in turn:

console.log('consent:', await Dea.getConsent()); // must be 'granted'
console.log(await Dea.getClassification());
// result leaves 'insufficient' at 8 actions with the built-in model; compare value with both thresholds

Make sure every pause() has a matching resume().

getClassification() rejects with threshold_missing

Cause: The loaded scoring model carries no bot threshold, so the SDK has nothing to classify against. The error's userInfo.modelVersion names the model.

Solution: Include that model version when contacting DEA support. The SDK applies no threshold of its own, so there is no setting to work around this in your app.

try {
  const classification = await Dea.getClassification();
} catch (error: any) {
  if (error.code === Dea.THRESHOLD_MISSING) {
    console.warn('model without thresholds:', error.userInfo?.modelVersion);
  }
}

Nothing is logged after touching the screen with debug: true

Cause: Nothing is being recorded — usually because the user has not consented yet; otherwise capture is paused. On iOS, debug has no effect.

Solution: Record consent with setConsent(true) — see User Consent — and check for a pause() without a matching resume(). On Android, read the output with adb logcat | grep dea.

getTargetTally() resolves an empty object

Cause: One of the following:

  1. The app runs with a production appId. The native SDKs refuse the counter on a production account, so the tally is always empty.
  2. init was not given countTargets: true.

Solution: None for a production appId — see Name your views for how views are named.

attest() returns unsupported

Cause: One of the following:

  1. No appKey was passed to init. The detail starts with no appKey.
  2. No signing key could be created: the device has no secure key storage.

Solution: Pass the appKey DEA issued for this platform's app — see Accounts and keys. Otherwise test on a real device.