-
Notifications
You must be signed in to change notification settings - Fork 180
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
_InternalLinkedHashMap<Object?, Object?>' is not a subtype of type 'Map<String, dynamic> error while purchasePackage() called #300
Comments
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 Community. |
I have this problem too. |
Confirm on Android also. STR
More tests to the god of tests, guys! Related to #295 |
Looking into it |
Looks like |
is this happing because of a change in server response to purchasePackage() from revenue cat? it looks like it, |
No. I just checked and this is not happening in version 3.8.0. I've reverted every commit and I think I isolated it to be caused by #270. But I still don't understand how that PR can cause to change what purchasePackage is returning from the Native side. |
Also, this is what response looks like: In the Java code: {productIdentifier: com.revenuecat.lifetime, purchaserInfo: {entitlements: {all: {entitlement_5: {identifier: entitlement_5, isActive: true, willRenew: false, periodType: NORMAL, latestPurchaseDateMillis: 1642501009000, latestPurchaseDate: 2022-01-18T10:16:49.000Z, originalPurchaseDateMillis: 1642501009000, originalPurchaseDate: 2022-01-18T10:16:49.000Z, expirationDateMillis: 1642501304000, expirationDate: 2022-01-18T10:21:44.000Z, store: PLAY_STORE, productIdentifier: weekly_intro_pricing_two_billing_periods, isSandbox: true, unsubscribeDetectedAt: 2022-01-18T10:19:03.000Z, unsubscribeDetectedAtMillis: 1642501143000, billingIssueDetectedAt: null, billingIssueDetectedAtMillis: null, ownershipType: UNKNOWN}, pro_cat: {identifier: pro_cat, isActive: true, willRenew: false, periodType: NORMAL, latestPurchaseDateMillis: 1642501196000, latestPurchaseDate: 2022-01-18T10:19:56.000Z, originalPurchaseDateMillis: 1642501196000, originalPurchaseDate: 2022-01-18T10:19:56.000Z, expirationDateMillis: null, expirationDate: null, store: PLAY_STORE, productIdentifier: com.revenuecat.lifetime, isSandbox: true, unsubscribeDetectedAt: null, unsubscribeDetectedAtMillis: null, billingIssueDetectedAt: null, billingIssueDetectedAtMillis: null, ownershipType: UNKNOWN}}, active: {entitlement_5: {identifier: entitlement_5, isActive: true, willRenew: false, periodType: NORMAL, latestPurchaseDateMillis: 1642501009000, latestPurchaseDate: 2022-01-18T10:16:49.000Z, originalPurchaseDateMillis: 1642501009000, originalPurchaseDate: 2022-01-18T10:16:49.000Z, expirationDateMillis: 1642501304000, expirationDate: 2022-01-18T10:21:44.000Z, store: PLAY_STORE, productIdentifier: weekly_intro_pricing_two_billing_periods, isSandbox: true, unsubscribeDetectedAt: 2022-01-18T10:19:03.000Z, unsubscribeDetectedAtMillis: 1642501143000, billingIssueDetectedAt: null, billingIssueDetectedAtMillis: null, ownershipType: UNKNOWN}, pro_cat: {identifier: pro_cat, isActive: true, willRenew: false, periodType: NORMAL, latestPurchaseDateMillis: 1642501196000, latestPurchaseDate: 2022-01-18T10:19:56.000Z, originalPurchaseDateMillis: 1642501196000, originalPurchaseDate: 2022-01-18T10:19:56.000Z, expirationDateMillis: null, expirationDate: null, store: PLAY_STORE, productIdentifier: com.revenuecat.lifetime, isSandbox: true, unsubscribeDetectedAt: null, unsubscribeDetectedAtMillis: null, billingIssueDetectedAt: null, billingIssueDetectedAtMillis: null, ownershipType: UNKNOWN}}}, activeSubscriptions: [weekly_intro_pricing_two_billing_periods], allPurchasedProductIdentifiers: [com.revenuecat.lifetime, weekly_intro_pricing_two_billing_periods], latestExpirationDate: 2022-01-18T10:21:44.000Z, latestExpirationDateMillis: 1642501304000, firstSeen: 2022-01-18T10:16:32.000Z, firstSeenMillis: 1642500992000, originalAppUserId: $RCAnonymousID:8fa520e1e940430a97ddc346600461b8, requestDate: 2022-01-18T10:20:00.000Z, requestDateMillis: 1642501200000, allExpirationDates: {weekly_intro_pricing_two_billing_periods: 2022-01-18T10:21:44.000Z}, allExpirationDatesMillis: {weekly_intro_pricing_two_billing_periods: 1642501304000}, allPurchaseDates: {weekly_intro_pricing_two_billing_periods: 2022-01-18T10:16:49.000Z, com.revenuecat.lifetime: 2022-01-18T10:19:56.000Z}, allPurchaseDatesMillis: {weekly_intro_pricing_two_billing_periods: 1642501009000, com.revenuecat.lifetime: 1642501196000}, originalApplicationVersion: null, managementURL: https://play.google.com/store/account/subscriptions, originalPurchaseDate: null, originalPurchaseDateMillis: null, nonSubscriptionTransactions: [{revenueCatId: a5f37c61ac, productId: com.revenuecat.lifetime, purchaseDateMillis: 1642501196000, purchaseDate: 2022-01-18T10:19:56.000Z}]}} |
We figured it out. PR incoming soon |
Confirm, the same bug. E/flutter (14125): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: type '_InternalLinkedHashMap<Object?, Object?>' is not a subtype of type 'Map<String, dynamic>' |
We just pushed 3.9.2 that fixes the problem. Sorry about the trouble. We are going to be writing more tests to prevent this type of issue from happening again. |
I got the same issue :( |
Just update |
Describe the bug
calling purchasePackage() would throw this error after subscription purchase is complete
Environment
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)
Debug logs that reproduce the issue
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']);
Additional context
none
The text was updated successfully, but these errors were encountered: