Do not remove any of the steps from the template below. If a step is not applicable to your issue, please leave that step empty.
There are a lot of things that can contribute to things not working. Having a very basic understanding of your environment will help us understand your issue faster!
Environment
[x] Output of flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.4, on macOS 14.5 23F79 darwin-arm64, locale en-BE)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.95.0)
[✓] Connected device (5 available)
[✓] Network resources
• No issues found!
- [x] Version of `purchases-flutter`
`8.2.1`
- [x] Testing device version e.g.: iOS 15.5, Android API 30, etc.
iOS 17.7
- [x] How often the issue occurs- every one of your customers is impacted? Only in dev?
Only happens in production builds with real subscriptions. On all tested devices.
Never with a sandbox environment.
- [x] [Debug logs](https://docs.revenuecat.com/docs/debugging) that reproduce the issue
0 (null) in assertionFailure(:_:file:line:flags:) ()
1 0x000000010056c3fc in closure #1 in variable initialization expression of static FatalErrorUtil.defaultFatalErrorClosure at /Users/stijl/dev/receptenvansandra_app/ios/Pods/PurchasesHybridCommon/ios/PurchasesHybridCommon/PurchasesHybridCommon/FatalErrorUtil.swift:15
2 0x000000010056c3fc in fatalError(_:file:line:) at /Users/stijl/dev/receptenvansandra_app/ios/Pods/PurchasesHybridCommon/ios/PurchasesHybridCommon/PurchasesHybridCommon/FatalErrorUtil.swift:27
3 0x000000010056c3fc in static CommonFunctionality.sharedInstance.getter at /Users/stijl/dev/receptenvansandra_app/ios/Pods/PurchasesHybridCommon/ios/PurchasesHybridCommon/PurchasesHybridCommon/CommonFunctionality.swift:21
4 0x000000010056c3fc in static CommonFunctionality.customerInfo(fetchPolicy:completion:) ()
5 0x000000010056c3fc in specialized static CommonFunctionality.customerInfo(completion:) at /Users/stijl/dev/receptenvansandra_app/ios/Pods/PurchasesHybridCommon/ios/PurchasesHybridCommon/PurchasesHybridCommon/CommonFunctionality.swift:380
6 (null) in @objc static CommonFunctionality.restorePurchases(completion:) ()
7 0x0000000100dae150 in -[PurchasesFlutterPlugin getCustomerInfoWithResult:] at /Users/stijl/.pub-cache/hosted/pub.dev/purchases_flutter-8.2.1/ios/Classes/PurchasesFlutterPlugin.m:373
8 0x0000000100dac974 in -[PurchasesFlutterPlugin handleMethodCall:result:] at /Users/stijl/.pub-cache/hosted/pub.dev/purchases_flutter-8.2.1/ios/Classes/PurchasesFlutterPlugin.m:104
9 0x0000000103fb770c in __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke ()
10 0x000000010392ae38 in invocation function for block in flutter::PlatformMessageHandlerIos::HandlePlatformMessage(std::_fl::unique_ptr<flutter::PlatformMessage, std::_fl::default_delete>) ()
- [x] Steps to reproduce, with a description of expected vs. actual behavior
In a production environment
Load subscriptions in the app
Click on a subscription
Native popup will open
Close subscription popu
App crashes
## Describe the bug ##
The app will crash on iOS when you close the native subscriptions popup of apple. Only in production.
## Additional context ##
The error shows an error that the purchases SDK is not configured. But The subscriptions can be fetched correctly from revenueCat. No issues when doing this in a sandox.
‼️ Required data ‼️
Do not remove any of the steps from the template below. If a step is not applicable to your issue, please leave that step empty.
There are a lot of things that can contribute to things not working. Having a very basic understanding of your environment will help us understand your issue faster!
Environment
flutter doctor
• No issues found!
0 (null) in assertionFailure(:_:file:line:flags:) ()
1 0x000000010056c3fc in closure #1 in variable initialization expression of static FatalErrorUtil.defaultFatalErrorClosure at /Users/stijl/dev/receptenvansandra_app/ios/Pods/PurchasesHybridCommon/ios/PurchasesHybridCommon/PurchasesHybridCommon/FatalErrorUtil.swift:15
2 0x000000010056c3fc in fatalError(_:file:line:) at /Users/stijl/dev/receptenvansandra_app/ios/Pods/PurchasesHybridCommon/ios/PurchasesHybridCommon/PurchasesHybridCommon/FatalErrorUtil.swift:27
3 0x000000010056c3fc in static CommonFunctionality.sharedInstance.getter at /Users/stijl/dev/receptenvansandra_app/ios/Pods/PurchasesHybridCommon/ios/PurchasesHybridCommon/PurchasesHybridCommon/CommonFunctionality.swift:21
4 0x000000010056c3fc in static CommonFunctionality.customerInfo(fetchPolicy:completion:) ()
5 0x000000010056c3fc in specialized static CommonFunctionality.customerInfo(completion:) at /Users/stijl/dev/receptenvansandra_app/ios/Pods/PurchasesHybridCommon/ios/PurchasesHybridCommon/PurchasesHybridCommon/CommonFunctionality.swift:380
6 (null) in @objc static CommonFunctionality.restorePurchases(completion:) ()
7 0x0000000100dae150 in -[PurchasesFlutterPlugin getCustomerInfoWithResult:] at /Users/stijl/.pub-cache/hosted/pub.dev/purchases_flutter-8.2.1/ios/Classes/PurchasesFlutterPlugin.m:373
8 0x0000000100dac974 in -[PurchasesFlutterPlugin handleMethodCall:result:] at /Users/stijl/.pub-cache/hosted/pub.dev/purchases_flutter-8.2.1/ios/Classes/PurchasesFlutterPlugin.m:104
9 0x0000000103fb770c in __45-[FlutterMethodChannel setMethodCallHandler:]_block_invoke ()
10 0x000000010392ae38 in invocation function for block in flutter::PlatformMessageHandlerIos::HandlePlatformMessage(std::_fl::unique_ptr<flutter::PlatformMessage, std::_fl::default_delete>) ()