Skip to main content
Question

I clicked Restore Before Making A subscription and now getting an error

  • 14 September 2024
  • 2 replies
  • 116 views

Forum|alt.badge.img+1

I am using  purchases_flutter: ^8.1.1 and purchases_ui_flutter: ^8.1.1 with the Template 4 - Persian Content for purchases_ui_flutter.

I am testing on a real device.

Flutter (Channel stable, 3.24.2, on macOS 13.6.4 22G513 darwin-x64, locale
    en-GB)

The Template 4 - Persian Content paywall used to pop up fine on my device and working well on my android device with the offers showing fine. However, for the first test purchase I clicked the restore button in the paywall to test it out (out of curiousity) without first subscribing and it showed a message in the debug console suggesting that the restore was somehow successful. After that, whenever i call: await RevenueCatUI.presentPaywall(); it shows the following error and:

 

E/RevenueCatUI(23306): Paywall transitioned to error state: myAppPurchaseLogic is null, but is required when purchases.purchasesAreCompletedBy is .MY_APP. App purchases will not be successful.
W/RevenueCatUI(23306): Could not process value for variable 'sub_offer_duration' for package 'weekly'. Please check that the product for that package matches the requirements for that variable. Defaulting to empty string.
W/RevenueCatUI(23306): Could not process value for variable 'sub_offer_duration' for package 'monthly'. Please check that the product for that package matches the requirements for that variable. Defaulting to empty string.
W/RevenueCatUI(23306): Could not process value for variable 'sub_offer_duration' for package 'annual'. Please check that the product for that package matches the requirements for that variable. Defaulting to empty string.

 

I went to my revenuecat dashboard and noticed that the Service Account Credentials JSON was now showing Credentials need attention (Note that it was okay before and everything was working fine).

Could not validate subscriptions API permissions
Permissions to call inappproducts API
Permissions to call monetization API

 

 

Is it possible that clicking the restore button while testing the IAP for the first time somehow broke my API implementation for my android build?

I’m working on a project for the RevenueCat shipaton hackathon and building for android and ios. The iOS version is still going through the App Store review process while the android app is live and working fine until now. It’s kind of frustrating to experience a bug like this right now after putting in so much hard work.

Would appreciate a timely response.

 

Thanks.

 

This post has been closed for comments

2 replies

Forum|alt.badge.img+1
  • Author
  • New Member
  • 2 replies
  • September 14, 2024

Update: My 

Service Account Credentials JSON is now saying Valid Credentials but the myAppPurchaseLogic is null pop up bug is still there when I call await RevenueCatUI.presentPaywall();

 

The bug is showing on Debug mode. I just pushed an update to Open Testing on play console and the bug is also showing there.


Forum|alt.badge.img+1
  • Author
  • New Member
  • 2 replies
  • September 18, 2024

Fixed it by cross checking my configuration. Made a slight mistake with storekit parameter.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings