Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subscriptionPeriod is null #960

Open
Toubap opened this issue Apr 11, 2023 · 4 comments
Open

subscriptionPeriod is null #960

Toubap opened this issue Apr 11, 2023 · 4 comments
Assignees

Comments

@Toubap
Copy link

Toubap commented Apr 11, 2023

Describe the bug
Recently experiencing a rare but annoying issue where StoreProduct.subscriptionPeriod is null which leads to a crash in our case.
I guess it could be avoided by handling this specific case and skipping StoreProduct objects with null subscriptionPeriod.
But then what happens to the user who is not able to proceed to the payment.

  1. Environment
    1. Platform: Android
    2. SDK version: 5.8.2 (waiting a bit more to upgrade to the 6.x)
    3. OS version: 10, 12, 13..
    4. Android Studio version: last stable - Android Studio Electric Eel | 2022.1.1 Patch 2
    5. How widespread is the issue. Percentage of devices affected: low which makes me believe the issue could come on your side or google's

Not reproduced in local environment

@Toubap Toubap added the bug label Apr 11, 2023
@RCGitBot
Copy link
Contributor

RCGitBot commented Apr 11, 2023

👀 SDKONCALL-251 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

@tonidero
Copy link
Contributor

Hi @Toubap, thanks for reaching out! Let me try to help you.

In 5.8.2, there are two situations where StoreProduct.subscriptionPeriod could be null:

  • If it's a non-subscription product (an In-app product within the Play store console).
  • If it's an Amazon product.

Do you have any products matching that situation? If that's not your issue, could you share a code snippet of how you're obtaining your StoreProduct's along with some logs of that flow so it's easier to debug?

@tonidero tonidero self-assigned this Apr 12, 2023
@Toubap
Copy link
Author

Toubap commented Jun 15, 2023

Here's what I get from the StoreProduct

StoreProduct(sku=xxx, type=SUBS, price=$18.00 , priceAmountMicros=18000000, priceCurrencyCode=USD, originalPrice=$18.00 , originalPriceAmountMicros=18000000, title=xxx , description=xxx  , subscriptionPeriod=null, freeTrialPeriod=null, introductoryPrice=null, introductoryPriceAmountMicros=0, introductoryPricePeriod=null, introductoryPriceCycles=0, iconUrl=, originalJson={"productId":"xxx","type":"subs","price":"$18.00 ","title":"xxx","name":"xxx","localizedIn":["de_DE","en_AU","en_CA","en_GB","en_IN","en_SG","en-US","en_ZA","fr_CA","fr_FR","ja_JP","ko_KR","zh_CN","zh_HK","zh_TW"],"description":"xxx","price_amount_micros":18000000,"price_currency_code":"USD","skuDetailsToken":"xxx","subscriptionOfferDetails":[{"offerIdToken":"xxx","pricingPhases":[{"priceAmountMicros":18000000,"priceCurrencyCode":"USD","formattedPrice":"$18.00 ","billingPeriod":"P1M","recurrenceMode":1}],"offerTags":["baseplan"]}]})

Its not an in app purchase nor an amazon product

initially obtained through getOfferingsWith

@tonidero
Copy link
Contributor

Hi @Toubap,

Unfortunately I'm not able to repro the issue. Could you share a snippet of your call to getOfferingsWith along with how you're getting this StoreProduct and also share the logs before this happens?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants