Comments (16)
Hi @beylmk I sent an email to you!
As for the question, in our product, the one-month free trial had already been set in App Store Connect before both the first subscription and the resubscription.
Thanks!
from purchases-unity.
@jswilliams we're currently investigating this issue.
As far as we can see, it can happen both in Sandbox and Production, though it's not 100% consistent. When it happens, the transactions don't show up in the receipt, neither on device nor from Apple's verifyReceipt
endpoint.
We're digging into ways of addressing this while trying to get Apple to fix their side.
from purchases-unity.
I can also share the code snippet about this issue:
public void BeginPurchase(Purchases.Package package)
{
Purchases.Instance.PurchasePackage(package, (productIdentifier, customerInfo, userCancelled, error) =>
{
if (!userCancelled)
{
if (error != null)
{
Debug.Log($"Purchase {productIdentifier} failed. PurchaseFailureReason: {error}");
AmplitudeManager.Instance.LogErrorEvent($"purchase_{productIdentifier}_failed_{error}", null);
NativeDialog.OpenDialog("Message", $"Purchase failed. Reason: {error}", "Ok");
return;
}
else
{
Debug.Log($"Finished purchase {productIdentifier}!");
UserDataManager.Instance.SetIsSubscribed(customerInfo.Entitlements.Active.ContainsKey(entitlementId));
subscribeWarning.text = UserDataManager.Instance.isSubscribed ? "" : "You are not subscribed yet";
UpdateUI();
}
}
else
{
Debug.Log($"Purchase {productIdentifier} failed. PurchaseFailureReason: {error}");
AmplitudeManager.Instance.logEvent($"purchase_{productIdentifier}_failed_userCancelled", null);
}
});
}
The expected behavior is:
After BeginPurchase
is called, customerInfo.Entitlements.Active.ContainsKey(entitlementId)
should be true
in the callback.
However, this is not the case.
from purchases-unity.
hi! Thanks for the detailed report! We'll take a look to see what's going on.
from purchases-unity.
I am looking into this trying to reproduce it. Some questions I have though:
- If I understand correctly this happens to you in both TestFlight and sandbox?
- It looks like resubscription has something to do with this since everyone is mentioning the same. Are you letting the subscription renew at all and waiting for it to automatically stop renewing in sandbox? Or are you cancelling the renewal after purchasing, then when it expires, you try to repurchase. If so, how are you cancelling that renewal. Are you closing the app, going to settings, waiting for the expiration then reopening the app? Or waiting for the subscription to expire while the app is open?
Sorry for all this questions, but we are really trying to figure this out.
Thanks!
from purchases-unity.
Another question. Do you see the purchase dialog when trying to resubscribe? Some of the other reports mention not seeing the purchase dialog at all
from purchases-unity.
Thanks for the response!
- Yes, we see it happening in both TestFlight and sandbox (via xcode installation).
- In TestFlight, I am sure the issue happened after I closed the app, waited for expiration, and reopened the app to resubscribe. As for sandbox, I just installed the app via xcode, made a subscription, went to settings to cancel the subscription, and reinstalled the app via xcode using the same build to resubscribe.
- And I didn't see the purchase dialog at all either when resubscribing.
from purchases-unity.
Any update?
from purchases-unity.
Hey @grtzsohalf the team is looking into this. Unfortunately we still haven't been able to reproduce it. I'll be working on it to day and will report back with any findings.
from purchases-unity.
@grtzsohalf I think it'd be really helpful if we could see the API logs for your app. Could you email [email protected] with the issue so that we can start a private thread for you to share your app ID and the affected user ID?
And one other question -- we are seeing some interesting behavior around re-subscribing to a cancelled subscription after a free trial has been added. i.e. when a user subscribed to a subscription, cancelled it, then you added a free trial to that product and they tried re-subscribing.
I see that the product in the purchase logs above had a free month...do you remember when you added that? Or was this a purchase of an offer?
from purchases-unity.
Just wanted to pop in and say we're seeing the exact same behavior/bug in cordova-plugin-purchases. Going to get a bug going over there later today. puchases-flutter seems to have the same bug recently opened as well:
RevenueCat/purchases-flutter#449
Another on flutter from 13 months ago that's closed with no real resolution/explaination:
RevenueCat/purchases-flutter#201
My main question that hasn't been answered yet is do we know if this is only something that happens in Sandbox / TestFlight or will it happen in prod as well?
Basically any time a subscription expires in Sandbox or TestFlight there is a chance (not sure how to reliably reproduce it but it happens at least 10% of the time for us) that when you try to repurchase the same package that the system purchase dialog won't come up. There's no errors that I can see. If you call the purchase function the amount of times the subscription renewed before it expired then it will finally pop up. This happens even if it's been a day+ since the TestFlight subscription expired so I don't think it's an Apple caching issue alone.
from purchases-unity.
@grtzsohalf we just released 4.3.0, which allows you to opt-in to use StoreKit 2 APIs under the hood.
This might fix the issue, could you please give it a shot?
To use StoreKit 2, all you need to do is:
if you're configuring the SDK programmatically:
Purchases.PurchasesConfiguration.Builder builder = Purchases.PurchasesConfiguration.Builder.Init("api_key");
Purchases.PurchasesConfiguration purchasesConfiguration =
builder.SetUsesStoreKit2IfAvailable(true)
.Build();
purchases.Configure(purchasesConfiguration);
if you're configuring the SDK through the Unity UI:
Look for a new checkbox called "Uses StoreKit 2 If Available", and make sure it's checked
from purchases-unity.
This issue has been automatically marked as stale due to inactivity. It will be closed if no further activity occurs. Please reach out if you have additional information to help us investigate further!
from purchases-unity.
@aboedo No, after I used RevenueCat v4.3.0 with StoreKit 2 API enabled, the issue still existed. After I clicked a button for resubscription, BeginPurchase
was called. Then no purchase dialog popped up, and the subscription status was still "unsubscribed" (by checking customerInfo.Entitlements.Active.ContainsKey(entitlementId)
).
By the way, in this case, the user was not newly created. However, this issue should still not happen.
So we will keep using the observer mode only in production.
from purchases-unity.
This issue has been automatically marked as stale due to inactivity. It will be closed if no further activity occurs. Please reach out if you have additional information to help us investigate further!
from purchases-unity.
Update here:
We've identified an issue on resubscribes where StoreKit will sometimes fail silently when attempting to finish a transaction. When attempting a new purchase of the same product, this will cause the iOS prompt not to show and StoreKit will report the transaction as successful.
We have issued a backend workaround that will ensure that on these occasions, the SDK will return an error and attempt to finish the transaction again. From this point on the user should be able to resubscribe to the product.
from purchases-unity.
Related Issues (20)
- error CS1525: Invalid expression term '>' HOT 5
- AmazonStore: "There as a problem with store. Code 2, UnderlyiningErrorMessage: Failed to get user data." HOT 11
- Receive Customer Info Bug HOT 3
- Purchases framework causes crash on older iOS devices HOT 14
- What about other Apple Platforms? MacOS/TVOS HOT 4
- Error parsing Discount objects in StoreProduct.cs HOT 4
- iOS: SetMixpanelDistinctID Incorrectly Sets $appsflyerId Instead of $mixpanelDistinctId in Purchases SDK v4.12.0 HOT 3
- Game Crashes on Start (Android) HOT 1
- Random login errors HOT 4
- Trying to understand entitlements - Not a bug HOT 2
- Unity PostProcessBuild scripts for Xcode HOT 3
- 3.5.0 Version NoSuchMethodError getSkus() HOT 5
- 📣 Have a question? Please use https://community.revenuecat.com 😁 HOT 1
- Unable to distribute to App Store Connect, Invalid bundle HOT 11
- RevenueCat Purchases SDK doesn't get initialized HOT 4
- Crash when not setting `deprecatedLegacyRevenueCatAPIKey` on simulator HOT 4
- [URGENT - LIVE VERSION] User has been charged but purchase isn't showing up HOT 6
- Issue within BillingClient 4.0 - SkuDetails missing freeTrialPeriod HOT 1
- `namespace Editor` for Unity/iOS colliding with UnityEditor.Editor
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from purchases-unity.