Skip to content

Mobile SDK errors

The mobile SDKs raise errors with the same stable codes on every platform: TryYourSizeError (Swift, code.rawValue), TryYourSizeException (Kotlin, code.wire; Dart, code) and, in React Native, loaderror events with code. Each error’s docURL / docUrl points at the matching section below.

A secret (sk_…) or restricted (rk_…) key was passed to the app. Apps are public: anyone can extract a key from them. Use your publishable key and roll the secret key if a build shipped with it.

Not a publishable key: expected pk_test_… or pk_live_….

The bundle identifier (iOS) or package name (Android) cannot be used as an app origin. It must be reverse DNS, for example com.brand.shop. Set bundleIdentifier / packageName in the configuration if your build uses an unusual identifier.

An option is invalid: product must be 1–120 characters; embedOrigin must be https (http only for localhost).

Our window did not answer: the device is offline, or a network filter blocks embed.tryyoursize.com. The sheet shows the shopper a short note in their language; your app gets the error with loadError.

This app is not registered for the key’s store. In Studio, add ios-app://<bundle id> or android-app://<package> (lower case) to the allowed sites for test mode. Live mode for apps is coming soon.

The shopper closed sign-in before finishing. Nothing to do.

Sign-in through the system browser is not available yet; shoppers sign in inside the window (email and a code), which works today.

Was this page helpful?