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, DeaBase and DeaAutomationDetection), which is on no pod registry. Your Podfile does not name these pods by path, or their podspecs are not beside the downloaded packages.

Solution: Follow iOS setup: download the archives, write the three podspecs, and name the three pods in your Podfile, at the version of @dea/react-native.

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, and the artifact is not on Maven Central. Your app's repositories do not include DEA's Maven repository for that release.

Solution: Add the repository as in Android setup, with the version of @dea/react-native in its URL.

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 core 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.

What stops while started.ready is false, on Android and iOS alike:

Stops What the app sees
Score getClassification() resolves insufficient
Model restore and updates Nothing is restored and no update check runs; the model built into the SDK stays
Automation detection Never starts
Proofs: record, sendProof, getProof Nothing is signed; the native log has proof.not_signed with dea.reason: no_core
sdk.ready sdk.core_failed instead, in the native log; init resolves { ready: false, coreFault }

Capture, integrations, attest() and unscored signRequest keep working.

stopped() resolves an object

Cause: With automationDetection: true, the native SDK found a sure sign that automation drives the app. It stopped every operation at once. This applies on every account and build, test builds included. The stop lasts until reset() or a new start.

Solution: Call reset(), for example at the next session, or start the SDK again: launch the app again, or call dispose() then init. resume() and setConsent(true) do not lift the stop. If automation goes on, the SDK stops again. For your own automated tests, leave automationDetection off. In a staging or test build, the native log has automation.detected with the signal that fired, then sdk.stopped with dea.reason: automated.

With automationDetection on, a rooted Android device or a jailbroken iPhone also stops the SDK: a staging build logs sdk.device_compromised with the trace it found, then sdk.stopped. reset() lifts the stop, then the SDK stops again on the same device. A test build only logs it and keeps running.

An external touchscreen on Android does not stop the SDK: a staging or test build logs it as automation.soft_signal, and the SDK keeps running.

Stops What the app sees
Capture Nothing is recorded; resume() and setConsent(true) do not start it again
Score getClassification() resolves insufficient with actions 0 and every number null
Model updates No update check runs
Attestation attest() and renewAttestation() resolve verdict: 'failed' without a request. Automatic renewal stops
Proofs: record, sendProof, getProof Nothing is signed, without a request; the native log has proof.not_signed with dea.reason: automated
Integrations Nothing more is sent; what was sent before the stop stays sent

reset() lifts the stop, and dispose() works as always.

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. Automation detection stopped the SDK: stopped() resolves an object, and the result is insufficient. See stopped() resolves an object.
  6. 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('stopped:', await Dea.stopped());    // must be null
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: The Android SDK build is not a test channel build: debug prints only there, and the SDK you ship prints nothing. Otherwise 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 there, 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.

sdk.app_id_missing in the log

Cause: No appId was passed to init, the appId is blank, or it is unknown-app. The entry is in the native log of a staging or test native build. The SDK runs under a production appId DEA has not registered.

Solution: Pass the appId DEA issued for this app — see Accounts and keys.

The model never updates

Cause: Updates are off. (await getModel()).updateFault says why; null means they are running.

updateFault Cause Solution
no_core The core did not load See started.ready is false
disabled modelUpdates: false was passed to init Remove it
no_storage iOS: the modelDirectory you passed, or Application Support, could not be opened Pass a folder the app can write to, or leave modelDirectory unset
no_context Android: no modelDirectory and no Context Leave modelDirectory unset, or pass an absolute path

Solution: Apply the row for the value you read. With null, updates are running: a check runs at every start, and again when the app returns to the foreground a day after the last check.