Docs
SDK

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

CallLoad failuresOther errors
Web: presentPaywall, mountPaywall, loadPaywallThe promise rejects. Use try/catch.onError
Mobile: presentIt 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 emptyonError
Auto placementsonErroronError
Web: React <Paywall>onErroronError
Web: <uikit-paywall>uikit-error eventuikit-error event
Mobile: preloadSilent: a placement that fails is skippednone

API error codes

The delivery API answers errors as { error: { code, message } }. The SDK throws UIKit: (web) or Miniwall: (mobile) followed by the message.

StatuscodeMessageCause and fix
401invalid_keyMissing or invalid public keyThe key is missing, mistyped, revoked, or not a pk_ key. Copy it from API keys.
403origin_not_allowedORIGIN is not in this project's allowed websitesWeb only. Add the site as a Website in Allowed sources. Apps send no origin, so it does not apply to them.
403app_not_allowedAPP_ID is not in this project's allowed appsMobile 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.
404not_foundPlacement not foundThe key matches no placement. Check spelling and the project.
404not_foundPaywall not foundThe placement has no screen chosen.
404not_foundPublished paywall not foundThe screen was never published (or was deleted). Publish it.
400bad_requestBody must be JSON, or a field messageAn events request was malformed. Not caused by normal use.
429rate_limitedToo many events, slow downMore than 1200 events a minute on one key. Events are dropped.
500internalSomething 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

MessageCause 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 loadNo 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 URLWeb: 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 JSONMobile: a linked screen's JSON is not a screen.
Miniwall: screens[ID] is not a screen JSONMobile: a JSON you passed in screens is not a screen.
UIKit: screen ID could not be loaded, Miniwall: screen ID could not be loadedA 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 buttonsA purchase button was tapped with no onPurchase. Sent to onError.
UIKit: set element.onPurchase to handle purchase buttonsThe 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 openA 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 iniOS: 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 ActivityAndroid: pass a live Activity to present.
Miniwall: no StoreKit product for package IDiOS: storeKitPurchase has no product for the tapped package.
Miniwall: the App Store could not verify the purchaseiOS: 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.

On this page