purchases-android icon indicating copy to clipboard operation
purchases-android copied to clipboard

managementURL is null when in account hold

Open ubuntudroid opened this issue 4 years ago • 10 comments

Describe the bug The managementURL provided by PurchaserInfo is null when the user's subscription is in account hold. I would expect it to be non-null only after they have left account hold. It works fine while in grace period.

Btw, I found that the management URL does not point to the actual subscription, only to the subscription list. According to the docs Play Store allows for more precise routing directly into the actual subscription page.

  1. Environment
    1. Platform: Android
    2. SDK version: 4.0.5
    3. OS version: Likely affects all Android versions
    4. Android Studio version: Arctic Fox, but shouldn't make any difference
    5. How widespread is the issue: happened on all three devices I tested this on
  2. Logs: no errors
  3. Steps to reproduce: Enter account hold with any subscription, wait for the RevenueCat SDK to pick the state up (usually takes just a few minutes) and then check management URL. To speed the process up use license test accounts and always declined test credit cards as described here
  4. Other information My guess is that your backend sees that the subscription is expired (which it is, but the user can still recover during account hold) and thus returns null for the management URL.

Additional context N/A

ubuntudroid avatar Mar 31 '21 18:03 ubuntudroid

Hello! It doesn't seem like we have quite enough information to send this to a human yet to help out. We would love if you could provide more details about your issue by following the template without modifying any of the pre-filled text. If you're looking for support, head over to our Help Center to get in touch with our team directly.

ghost avatar Mar 31 '21 18:03 ghost

Not sure what is missing here... 🤔 Hope someone can still help out. 🙏

ubuntudroid avatar Mar 31 '21 18:03 ubuntudroid

hi @ubuntudroid! Don't mind the bot, it's still learning 🤖 . Not sure what was missing either but I think we have enough info to go on. Thanks for opening!

aboedo avatar Mar 31 '21 19:03 aboedo

btw I was curious about the bot thing and it turns out that it's looking for the words "Debug logs", as they're a part of the issue template, and you had "logs" instead. Just mentioning it in case others read this and wonder about it.

aboedo avatar Mar 31 '21 19:03 aboedo

update here: we're going to make a backend-side fix, will report back and close out the issue when it gets deployed. Thanks again for reporting!

aboedo avatar Apr 02 '21 19:04 aboedo

Neat! 🙏 Do you have a rough ETA? Just so that I know whether I should implement a client side workaround for the meantime.

ubuntudroid avatar Apr 02 '21 20:04 ubuntudroid

@aboedo Will the backend fix also include the "deeper" routing into Play Store as outlined in the issue description?

ubuntudroid avatar Apr 07 '21 15:04 ubuntudroid

Update: I've now checked the deeplink Google Play Store provides according to the documentation to link directly into the subscription (the one which includes the SKU and the package). Turns out either it doesn't work or I'm too dumb to properly fill in SKU and package. Only the generic https://play.google.com/store/account/subscriptions works for me (and it looks that's the one you guys are returning when in grace period). That's quite unfortunate, but it is what it is. 🤷

So for now I'll use the following workaround for account hold:

val managementUrl = purchaserInfo.managementURL ?: Uri.parse("https://play.google.com/store/account/subscriptions")

ubuntudroid avatar Apr 07 '21 16:04 ubuntudroid

thanks for the update and for posting a workaround! @ubuntudroid I'm sorry I missed the previous message. I don't have an ETA for a backend fix yet.

aboedo avatar Apr 07 '21 16:04 aboedo