Client SDKs
Troubleshooting
Common issues and solutions for the AudienceLab Android SDK
SDK Not Initializing
Symptom: isInitialized() returns false after calling initialize.
Solutions:
- Verify the API key is correct and active
- Check network connectivity
- Enable debug mode:
AudienceLabSDK.setDebugEnabled(true) - Ensure a valid
Contextis passed (useapplicationContext) - Check Logcat for error messages tagged with
AudienceLabSDK
/fetch-token Returns 401
Symptom: The request log shows 401 from /fetch-token and no creative token is stored.
Solutions:
- Verify the AudienceLab API key is correct for the environment
- Verify the SDK is pointing at the intended backend base URL
- Check the request debug log to confirm the
geeklab-api-keypreview matches the expected key - Confirm the app is initializing with the correct configuration before events are sent
No Creative Token Available
Symptom: getCreativeToken() returns null and webhook events remain queued.
Solutions:
- Check whether
/fetch-tokensucceeded - Verify the app has internet access
- Inspect
getTokenDebugSnapshot()and the request debug listener for retry status
GAID or App Set ID Missing
Symptom: ga or asid is absent from outgoing requests.
Solutions:
- Verify Google Play Services support is available on the device/app
- Provide a custom
setAdvertisingIdProvider(...)orsetAppSetIdProvider(...)implementation if needed - Or set IDs manually with
setAdvertisingId(...)/setAppSetId(...) - Check
getIdentityDebugSnapshot()to confirm whether identity collection has settled
Events Not Sending
Symptom: Events are queued but never sent.
Solutions:
- Check that
isSdkEnabled()returnstrue - Check that
isMetricsCollectionEnabled()returnstrue - Verify network connectivity
- Check queue size with
getQueueSize() - Verify a valid creative token exists before expecting webhook delivery
- The SDK retries with exponential backoff when the error is retryable
ProGuard Stripping SDK Classes
Symptom: ClassNotFoundException or missing methods at runtime.
Add to proguard-rules.pro:
-keep class app.geeklab.audiencelab.sdk.** { *; }Session or Retention Events Seem Missing
Verify:
- The SDK is initialized before the app enters the foreground
- The app is using the context-based initializer so lifecycle hooks can register
- You are inspecting the queue/request log or backend payloads, not looking for unsupported public session getters
- Retention only sends once per UTC day