Errors
Every error and warning the SDK and its delivery API can produce, what causes it and how to fix it.
Where errors show up
| Call | Load failures | Other errors |
|---|---|---|
Web: presentPaywall, mountPaywall, loadPaywall | The promise rejects. Use try/catch. | onError |
Mobile: present | It throws (iOS and Android), or the promise rejects with code miniwall_error (React Native and Flutter). Use try/catch. | onError |
| Embedded screen (mobile) | onError; the view stays empty | onError |
| Auto placements | onError | onError |
Web: React <Paywall> | onError | onError |
Web: <uikit-paywall> | uikit-error event | uikit-error event |
Mobile: preload | Silent: a placement that fails is skipped | none |
API error codes
The delivery API answers errors as { error: { code, message } }. The SDK throws UIKit: (web) or Miniwall: (mobile) followed by the message.
| Status | code | Message | Cause and fix |
|---|---|---|---|
| 401 | invalid_key | Missing or invalid public key | The key is missing, mistyped, revoked, or not a pk_ key. Copy it from API keys. |
| 403 | origin_not_allowed | ORIGIN is not in this project's allowed websites | Web only. Add the site as a Website in Allowed sources. Apps send no origin, so it does not apply to them. |
| 403 | app_not_allowed | APP_ID is not in this project's allowed apps | Mobile only. Your project has app entries in Allowed sources and this app is not one of them. The SDK sends the app's ID in the X-Miniwall-App header: the bundle ID on iOS (ios:com.acme.app), the application ID on Android (android:com.acme.app). Add exactly that ID as an iOS or Android entry in Allowed sources (under API keys), or clear the list to accept every app. Debug and release builds with a different application ID (a .debug suffix, for example) each need an entry. |
| 404 | not_found | Placement not found | The key matches no placement. Check spelling and the project. |
| 404 | not_found | Paywall not found | The placement has no screen chosen. |
| 404 | not_found | Published paywall not found | The screen was never published (or was deleted). Publish it. |
| 400 | bad_request | Body must be JSON, or a field message | An events request was malformed. Not caused by normal use. |
| 429 | rate_limited | Too many events, slow down | More than 1200 events a minute on one key. Events are dropped. |
| 500 | internal | Something went wrong on our side. Try again. | Server fault. A saved copy is used if there is one. |
A 5xx answer, a network failure or a timeout uses the saved copy when one exists. A 4xx answer is never replaced by a copy.
Messages thrown by the SDK
| Message | Cause and fix |
|---|---|
Web: UIKit: call configure({ apiKey }) before loading a placement. iOS: Miniwall: call Miniwall.configure(apiKey:) before loading a placement. Android: ... configure(context, apiKey) ... | Call configure first. |
UIKit: the paywall took too long to load, Miniwall: the screen took too long to load | No answer within timeoutMs (the timeout on mobile) and no saved copy. |
UIKit: could not load paywall (STATUS), Miniwall: could not load the screen (STATUS) | A non-OK answer with no message. |
Could not load paywall (STATUS) from URL | Web: a URL source answered non-2xx. |
Not a paywall JSON: expected components_config.base (web), Miniwall: not a screen JSON (expected components_config.base.stack) (mobile) | The JSON or URL does not hold a screen. |
Miniwall: screen ID is not a screen JSON | Mobile: a linked screen's JSON is not a screen. |
Miniwall: screens[ID] is not a screen JSON | Mobile: a JSON you passed in screens is not a screen. |
UIKit: screen ID could not be loaded, Miniwall: screen ID could not be loaded | A linked screen failed to load. It is retried on the next tap. Sent to onError. |
UIKit: pass onPurchase to handle purchase buttons, Miniwall: pass onPurchase in PresentOptions to handle purchase buttons | A purchase button was tapped with no onPurchase. Sent to onError. |
UIKit: set element.onPurchase to handle purchase buttons | The same, for the web component. |
UIKit: not opening "..." : only http(s), mailto and tel links open, Miniwall: not opening "...": only http(s), mailto and tel links open | A link with another scheme was refused. Sent to onError. |
Miniwall: there is no view controller to present from, Miniwall: the screen could not be presented over the current view controller, Miniwall: there is no window to show the screen in | iOS: nothing could be shown. Sent to onError, and present finishes with closed. Present from a visible screen, or pass from:. |
Miniwall: present needs a source (placement, paywallId or json) | React Native or Flutter was called without a source. |
Miniwall: present needs an Activity | Android: pass a live Activity to present. |
Miniwall: no StoreKit product for package ID | iOS: storeKitPurchase has no product for the tapped package. |
Miniwall: the App Store could not verify the purchase | iOS: the StoreKit transaction was not verified. |
Warnings
On web, [UIKit] No price for package(s) ... Pass them in products is logged to the console when a package ID has no price.
Related
Events and privacy
What the SDK sends to Miniwall, what it never sends, what it stores, how to answer the App Store and Google Play privacy questions, and how to turn analytics off.
Versioning
How the SDK packages are versioned, what stays compatible, and how new components and display formats reach older sites and apps.