Troubleshooting
Find the cause and fix for common Kotlin SDK problems, by symptom.
Find your symptom below for its likely causes and fixes. Turn on debug = true to see SDK warnings
in logcat under the tag Voidhash, and log diagnostics with
onDiagnostic: most of these problems show up there first.
Gradle can't resolve the SDK
Could not find com.voidhash:sdkorcom.voidhash:ui. TheincludeBuildpath insettings.gradle.ktsdoesn't point at the clone'slibraries/androiddirectory. Gradle substitutes those coordinates only from an included build.SDK location not foundin the included build. SetANDROID_HOME, or copylocal.propertiesinto the clone'slibraries/androiddirectory.- Android Gradle Plugin version conflicts. The SDK's build uses AGP 8.9.0 and Kotlin 2.0.21; build your app with the same versions.
See Install the SDK.
Products are empty
getProducts() returns only products that are configured in your project and that Google Play
returns for this device.
initialize()hasn't finished, or never loaded your configuration. On a cold offline launch the list is empty. Look forSCHEMA_FETCH_FAILEDorAUTHENTICATION_FAILEDdiagnostics; the latter means the publishable key is wrong.- The product isn't mapped to a Google Play product, or the IDs differ. Check the mapping in Products and perks.
- Google Play doesn't offer the product to this device. The product or base plan isn't active, the app's package name differs from the one in Play Console, the app was never uploaded to a testing track, or the device's Google account isn't a tester.
FAILED_TO_GET_PRODUCTSis thrown. Google Play couldn't be reached. Retry later.
In development mode, products come from your project, not Google Play; give each one a billing duration.
The paywall doesn't appear
Log result.error.code from FlowResult.Failed:
| Code | Fix |
|---|---|
FLOW_RENDERER_MISSING | Pass paywallRenderer = VoidhashUiPaywallRenderer() in VoidhashOptions. |
FLOW_NOT_ASSIGNED | Deploy a build and assign it to the location you pass, and check the slug's spelling. If you just changed the assignment, wait up to an hour or clear the app's data: answers are cached. See Paywall locations. |
FLOW_UNSUPPORTED_PACKAGE | The renderer's native library is missing or wasn't built for this device: rebuild it as in Add the paywall renderer and use an arm64-v8a or x86_64 device. Otherwise the build needs a newer SDK: update your clone. |
FLOW_UNAVAILABLE | The device has never resolved this location and is offline, or the download failed. Retry online, or list the location in preloadPlacements. |
FLOW_PRESENTATION_FAILED | The renderer couldn't show the flow or failed on screen. Turn on debug and check logcat for the message. |
FLOW_DISABLED | The client is disabled or shut down. |
A renderer that can't run the deployed build makes the location look unassigned, so
FLOW_NOT_ASSIGNED can also mean the native library is missing. Paywalls are in early access; if
Studio shows no Paywalls section, ask us to turn it on.
A purchase doesn't unlock the perk
- The product doesn't grant the perk. Attach the perk to the product in Studio.
- You check a different slug.
hasActivePerktakes the perk's slug, not the product's. - Voidhash hasn't recorded the purchase yet.
purchasereturns after 10 seconds even if Voidhash hasn't answered. ReadgetCurrentPerson(forceFetch = true)again;TRANSACTION_SYNC_DEFERREDmeans the SDK is still sending it. - Voidhash refused the purchase.
TRANSACTION_REJECTEDmeans Google Play isn't connected for this package name. A debug build with anapplicationIdSuffixhas a different package name. Connect Google Play (Help center), then relaunch. - The environment doesn't match the key. A test key doesn't see production access, and a store sandbox purchase unlocks production only while your project allows it. See Environments.
- The person changed. A purchase belongs to the identity that made it. See Identify users.
Test purchases with license testers
Google Play purchases need an app installed from Google Play.
- Upload a release build signed with your upload key to an internal or closed testing track.
- Add the tester's Google account under License testing in Play Console, and to the track.
- Install the app from the track's opt-in link on a device signed in with that account.
- Use the production publishable key. Purchases are store sandbox purchases and appear in Studio under Sandbox.
BILLING_CONNECTION_FAILED means Google Play services are missing or updating, or the account can't
buy. Emulators need a Google Play system image. To test without Google Play, use
development mode. See Test purchases (Help center).
Purchases are acknowledged twice in observer mode
When another billing integration owns purchases, Voidhash must not acknowledge or consume them.
readOnlyisn't set. Without it, the SDK acknowledges and consumes purchases it finds at launch, so a consumable can be consumed before your integration credits it. SetreadOnly = truebeforeinitialize(). See Observer mode.- Your app calls
purchaseor presents paywalls. In observer mode those fail withREAD_ONLY_PURCHASE_NOT_ALLOWED; buy through your integration and callreportTransaction. setReadOnly(false)ran during a migration. Ownership switches at once for new purchases. Switch only when you remove the other integration's purchase handling.
Events don't show up
- Consent isn't granted.
ANALYTICS_CONSENT_DENIEDmeansanalyticsConsentisDENIEDorPENDING. See Analytics consent. - Events are still queued. The SDK sends every 5 seconds in the foreground. Call
flush()and checkpending.ANALYTICS_SEND_FAILEDmeans delivery is being retried. - You're looking at the wrong environment. Events take the environment of the key that sent them; debug builds on the test key appear under Test.
- The event is blocked or invalid. Check Settings → Events for a blocked name, and look for
ANALYTICS_EVENT_INVALIDorANALYTICS_EVENT_DROPPED. - Voidhash runs in another process.
SECONDARY_PROCESS_INERTmeans it was configured outside the main process. See Create the client.
See Check your data for what Voidhash received and rejected, and Rejected after capture for why.
Next steps
- Errors for every code.
- Troubleshooting across platforms.
- Ask us on Discord.
Something wrong or missing on this page? Tell us by email or on Discord.