Open zahnooo opened 6 days ago
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
In the meantime I think I have identified the issue, and it doesn't have anything to do with the free trial period.
In RevenueCat's storeProductConversions.kt
internal fun String.createPeriod(): Period?
(line 40), there is a match for "SemiAnnually"
and "Annually"
. However, Amazon returns as subscriptionPeriod
(and assumably also freeTrialPeriod
) "SemiAnnual"
and "Annual"
, see https://developer.amazon.com/docs/in-app-purchasing/iap-implement-iap.html#successful-request .
Looks like there is a difference in Debug and Release though:
"SemiAnnually"
and "Annually"
"SemiAnnual"
and "Annual"
Hey @zahnooo ,
Thanks for reaching out and for the info here.
On Amazon Appstore, when an eligible user attempts to purchase a product that has an introductory offer (e.g. a free trial) the offer will be applied automatically. Are you possibly checking for eligibility before displaying this to user/starting the free trial? If you are, is it reporting that the user is eligible when you are running this in the debug environment?
I will share this with the rest of the team to get some more eyes on this, thanks for all the info provided here!
Describe the bug Summary:
AmazonStoreProduct
period
isnull
for subscription with free trial during Live App Testing on the Amazon App Store.In the Amazon Developer Console we have set up one subscription in-app items with two terms:
When testing our app with Amazon Live App Testing, we found that the annual subscription package object from RevenueCat (type
AmazonStoreProduct
) does not have a period set (it’s“period=null”
), however, the monthly subscription has a period set as expected (“period=Period(value=1, "unit=MONTH", iso8601=P1M)”
). The main difference between the two is that the annual subscription has a free trial period.This hinders us from displaying our available packages as desired with the proper subscription period.
I noticed that in the RevenueCat documentation,
StoreProduct
period
has documented(also see this issue), whereas the
AmazonStoreProduct
period
has documentedSo is it expected to be
null
or not, and why is it then notnull
for the monthly subscription?We’re using RevenueCat v8.1.0.
My device is a Amazon Fire HD 8 (12th Generation), running Android 11 (SDK 30).
Here are the RevenueCat Package objects, logged from a Live App Testing build of our app from the Amazon App Store:
Monthly:
Annual:
Please also note that, when using Amazon App Tester App with the
amazon.sdktester.json
exported from the Amazon developer console and a debug build from our app, the in-app products are received as expected from the RevenueCat SDK, and here, the annual subscription has both aperiod
and thefreeTrialPeriod
info set. It only is broken with Amazon Live App Testing.Environment
Platform: Android (Amazon)
SDK version: 8.1.0
OS version: Android 11 (SDK 30)
Android Studio version: Android Studio Jellyfish | 2023.3.1 Patch 1 Build #AI-233.14808.21.2331.11842104, built on May 15, 2024 Runtime version: 17.0.10+0-17.0.10b1087.21-11572160 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 15.0 GC: G1 Young Generation, G1 Old Generation Memory: 4096M Cores: 12 Metal Rendering is ON Registry: ide.experimental.ui=true
How widespread is the issue. Percentage of devices affected: Not live yet, but 100% reproducible in Amazon Live App Testing
Additional context I yesterday created a [question on the RevenueCat Community](I yesterday posted a question on the RevenueCat Community which might be related to this question: https://community.revenuecat.com/sdks-51/bug-amazonstoreproduct-period-is-null-when-it-contains-a-free-trial-4743?fid=51&tid=4743), however, I think this is actually a bug of some sorts and hence opening an issue here.