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:
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:
- The user has not consented, so nothing is recorded.
- The session has fewer actions than the model asks for, 8 with the built-in model: the result is
insufficient. See Evidence. - Capture was paused and never resumed.
- The SDK cannot score (
started.readyisfalse): the result isinsufficient. - 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:
- The app runs with a production
appId. The native SDKs refuse the counter on a production account, so the tally is always empty. initwas not givencountTargets: true.
Solution: None for a production appId — see
Name your views for how views are named.
attest() returns unsupported¶
Cause: One of the following:
- No
appKeywas passed toinit. Thedetailstarts withno appKey. - 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.