managementURL is null when in account hold
- [x] I have updated Purchases SDK to the latest version
- [x] I have read the Contribution Guidelines
- [x] I have read the Help Center
- [x] I have read docs.revenuecat.com
- [x] I have searched for existing Github issues
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.
- Environment
- Platform: Android
- SDK version: 4.0.5
- OS version: Likely affects all Android versions
- Android Studio version: Arctic Fox, but shouldn't make any difference
- How widespread is the issue: happened on all three devices I tested this on
- Logs: no errors
- 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
- 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
nullfor the management URL.
Additional context N/A
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.
Not sure what is missing here... 🤔 Hope someone can still help out. 🙏
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!
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.
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!
Neat! 🙏 Do you have a rough ETA? Just so that I know whether I should implement a client side workaround for the meantime.
@aboedo Will the backend fix also include the "deeper" routing into Play Store as outlined in the issue description?
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")
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.