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.
secret_key_in_app
Section titled “secret_key_in_app”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.
invalid_key
Section titled “invalid_key”Not a publishable key: expected pk_test_… or pk_live_….
invalid_app_identifier
Section titled “invalid_app_identifier”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.
invalid_option
Section titled “invalid_option”An option is invalid: product must be 1–120 characters; embedOrigin must be https (http only for localhost).
window_unreachable
Section titled “window_unreachable”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.
app_not_allowed
Section titled “app_not_allowed”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.
sign_in_cancelled
Section titled “sign_in_cancelled”The shopper closed sign-in before finishing. Nothing to do.
sign_in_unavailable
Section titled “sign_in_unavailable”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?
Thank you. We read every answer.