Description
- I have updated Purchases SDK to the latest version
- I have read the Contribution Guidelines
- I have searched the Community
- I have read docs.revenuecat.com
- I have searched for existing Github issues
Describe the bug
calling purchasePackage() would throw this error after subscription purchase is complete
_InternalLinkedHashMap<Object?, Object?>' is not a subtype of type 'Map<String, dynamic>
-
Environment
- Output of
flutter doctor
[✓] Flutter (Channel stable, 2.8.0, on macOS 11.5.2 20G95 darwin-x64, locale en-ET) [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) [!] Xcode - develop for iOS and macOS (Xcode 12.5.1) ! Flutter recommends a minimum Xcode version of 13.0.0. Download the latest version or update via the Mac App Store. [✓] Chrome - develop for the web [✓] Android Studio (version 2020.3) [✓] VS Code (version 1.63.2) [✓] Connected device (2 available)
- How widespread is the issue. Percentage of devices affected
I only tested on Android.
- Output of
-
Debug logs that reproduce the issue
Issue is not caught by package but error thrown is type '_InternalLinkedHashMap<Object?, Object?>' is not a subtype of type 'Map<String, dynamic>'
-
Steps to reproduce, with a description of expected vs. actual behavior
call purchasePackage method with subscription packages should reproduce the error
PurchaserInfo purchaserInfo = await Purchases.purchasePackage( offering.availablePackages.first, );
-
Other information (e.g. stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, etc.)
final prorationMode = upgradeInfo?.prorationMode; final response = await _channel.invokeMethod('purchasePackage', { 'packageIdentifier': packageToPurchase.identifier, 'offeringIdentifier': packageToPurchase.offeringIdentifier, 'oldSKU': upgradeInfo?.oldSKU, 'prorationMode': prorationMode?.index }); return PurchaserInfo.fromJson(response['purchaserInfo']);
return PurchaserInfo.fromJson(response['purchaserInfo']); seems to be where the error is happening
Additional context
none
Activity