-
-
Notifications
You must be signed in to change notification settings - Fork 647
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
Hard crash on iOS calling getSubscriptions() for subscription with trial / promotional offer #1717
Comments
Hello @bitfabrikken Looking at the logs. Seems like this is the line where it blows up: https://github.com/dooboolab/react-native-iap/blob/main/ios/RNIapIos.swift#L776 Could it be that the discount has a strange/null price Locale? or maybe a discount is null itself? Hard to tell just by looking at the logs |
Doesn't look like it can be null or have a strange value: https://developer.apple.com/documentation/storekit/skproduct/3043534-discounts |
This is my proposed solution: #1720 |
Reopened because this is reverted in |
We are also seeing this crash in
|
For visibility, the fix was reverted in PR #1724 |
New attempt to fix this: #1846 |
Unfortunately we haven't been able to deploy and verify this fix, as we've detected another crash after updating to 8.6.7 reported by @phillip-kic on #1696 |
I'll close this as completed. I'll take a look at the other issue |
Version of react-native-iap
8.0.10
Version of react-native
0.67.2
Platforms you faced the error (IOS or Android or both?)
IOS
Expected behavior
Call getSubscriptions() without crashing
Actual behavior
Calling getSubscriptions() crashes the app.
Tested environment (Emulator? Real Device?)
Both
Steps to reproduce the behavior
Call getSubscriptions() within an app that's live on the App Store, which has a subscription with a promotional offer for a trial of 1 week.
I call this:
Then the console in Xcode says "Add new object : supporter", and crash occurs.
Here's a crash log from device: https://pastebin.com/JvXBmzqz
Let me know if anything else can help.
The text was updated successfully, but these errors were encountered: