Hello RevenueCat community,
We would like to open a discussion around the initialization behavior of the Amazon Appstore SDK when used with RevenueCat, particularly on Fire TV devices and low-spec kindle tablets.
Environment
- React Native Purchases: react-native-purchases: 8.11.10
- RevenueCat Amazon Store: purchases-store-amazon:8.22.0
- Amazon Appstore SDK: com.amazon.device:amazon-appstore-sdk:3.0.5
Devices tested:
- Fire TV Stick (Fire OS 5.2.9.5)
- Kindle Fire 7, 7th generation (Fire OS 5.7.1.0)
Issue observed
When configuring RevenueCat with
Purchases.configure({ apiKey: REVENUE_CAT_API_KEY_AMAZON, useAmazon: true })we sometimes experience very long initialization times (up to 30–60 seconds). This affects the ability to fetch offerings at app startup.
Errors observed in React Native:
[RevenueCat] Error obtaining storefront in Amazon: PurchasesError(
code=UnknownError,
underlyingErrorMessage=Timeout error trying to get Amazon user data.,
message='Unknown error.'
)
[RevenueCat] 😿‼️ PurchasesError(
code=UnknownError,
underlyingErrorMessage=Timeout error trying to get Amazon user data.,
message='Unknown error.'
)
[RevenueCat] 🤖‼️ Error fetching offerings - PurchasesError(
code=UnknownError,
underlyingErrorMessage=Timeout error trying to get Amazon user data.,
message='Unknown error.'
)
After checking the native logs via ADB, we found multiple errors and warnings coming directly from the Amazon Appstore SDK, which appear to delay or prevent RevenueCat from presenting offerings. Key log entries include:
E/AmazonAppstore.AccountSummaryProviderImpl: accountManager is null, didnt we call init?
I/AmazonAppstore.DeviceServiceSSOAuthenticator: still fetching tokens for ready account, forceDS = false
I/AmazonAppstore.TokenFetcher: appstore registered, only reading shared prefs
I/AmazonAppstore.AuthUtils: Found value to be blank when fetching from shared pref for: .deviceKey
I/AmazonAppstore.AuthUtils: Found value to be blank when fetching from shared pref for: .deviceToken
I/AmazonAppstore.AuthUtils: Found value to be blank when fetching from shared pref for: .lastName
W/AmazonAppstore.DummyAndroidAccountAccessor: Could not retrieve any account from the Account Cache, regardless of index
W/AmazonAppstore.DfatEventsTable: DFAT events table has reached maximum capacity
Key point
From our investigation, this appears to be agnostic of RevenueCat and React Native. The root cause seems to be something with Amazon Appstore SDK fails to initialize user/storefront data reliably in certain environments (Fire TV Stick, low-memory Kindle devices). However, in the same session, when applying a retry mechanism (e.g. calling .getOfferings() again after a delay), the offerings can sometimes be retrieved successfully.
Discussion points
- Have others in the community observed similar delays (30–60s) when initializing the Amazon Appstore SDK on Fire TV / Firestick or older Kindle devices?
- Are there any recommended strategies for handling these cases (e.g. retries, lazy initialization, deferring storefront calls)?
- Could different Amazon SDK versions reduce this latency?
We’d like to hear if this is a known characteristic of the SDK on these platforms/devices, or if there are best practices we can apply to mitigate the impact on purchase flows.
Thanks in advance for any insights.
