Troubleshooting
Common problems when integrating @appilots/sdk, and how to fix them.
"AppilotsProvider: No config found"
This means neither a config prop nor .appilotsrc auto-config resolved a projectId. AppilotsProvider needs one or the other before it can talk to your project.
Fix, one of:
-
Pass
configexplicitly:<AppilotsProvider config={{ projectId: 'proj_xxxxxxxx', apiKey: 'ak_xxxxxxxxxxxx' }}> -
Set up the Metro plugin and a
.appilotsrcfile at your project root so config resolves automatically. See CLI: Configuration for the file format and SDK Overview for wiringwithAppilots()intometro.config.js.
Chat opens, but the agent can't see or operate a screen
Usually one of three things:
- The screen isn't registered. Every screen the agent should know about needs a
registerScreencall — see Navigation. - The screen's fields or buttons aren't registered. Auto-tracking, the registration hooks, or the HOCs need to be wired up for that screen — see Registering elements.
- The MCP document is stale. If the app shipped new screens or fields but nobody re-ran
appilots sync, the agent is working from an outdated map of your app. See CLI Usage.
Adding explicit testIDs to your interactive elements makes auto-tracking noticeably more reliable — it's the first ID auto-tracking looks for.
Fields register, but the agent can't find them by name
Check what id is actually being used. Auto-tracking derives an element's id by checking, in order:
testIDnativeID/idaccessibilityLabelnameplaceholder- A non-
"off"autoCompletevalue
If none of these are present, auto-tracking falls back to a best-effort guess and logs a warning. Enable debug: true locally (see below) to see registration diagnostics in the console.
Fix: add an explicit testID to the element — it's checked first and is the most reliable signal.
Metro bundling errors after adding withAppilots()
This is usually a missing or invalid .appilotsrc. The plugin warns and falls through to your unmodified Metro config if the file is missing — so the app still runs, but auto-config won't kick in and you'll likely hit "No config found" at runtime instead.
Fix: confirm .appilotsrc exists at your project root and is valid JSON. See CLI: Configuration for the expected shape.
Peer dependency errors
react-native-safe-area-context and react-native-svg are required peer dependencies, not optional ones. If you see resolution errors for either, install them directly — see Installation for minimum versions.
Enabling debug output
<AppilotsProvider config={{ debug: true }}>
or in .appilotsrc:
{ "debug": true }
This turns on local diagnostic console logging you can use to troubleshoot your own integration — screen registration, action execution, and similar SDK-side events. Treat it as diagnostic output for local debugging rather than a stable, parseable format.
Multiple <AppilotsChat/> instances / multi-tenant apps
If your app needs more than one isolated chat instance — for example, separate registries per tenant or per session — createComponentRegistry() plus <AppilotsRegistryProvider value={...}> let you scope registration to a subtree instead of sharing the global singleton registry. This is an advanced, uncommon setup; see Registering elements for the registry APIs.
Still stuck?
- Guides: Your First Integration — a full walkthrough from install to a working chat.
- API Reference: Errors — if the problem looks network- or auth-related rather than SDK-side.