Flutter - RevenueCat - There was a credentials issue, Check the underlying error for more details, error is coming after purchase

1,257

Solution 1

E/[Purchases] - ERROR(28086): 🤖‼️ There was a credentials issue. Check the underlying error for more details.

The error is indicating that there's a problem with the Play Store credentials that you've uploaded to RevenueCat. Usually, this is due to the fact that it can take over a day for the credentials to propagate throughout Google - so if you recently set these up this is likely the cause.

Referencing documentation:

Solution 2

I recreated google credentials and linked the new one with revenuecat and after few hours it worked fine.

Share:
1,257
Araju
Author by

Araju

Updated on November 25, 2022

Comments

  • Araju
    Araju over 1 year

    I am integrating in app purchase in my flutter application through RevenueCat and to support both Android and IOS. I have followed all the steps mentioned in the documentation for configuration (https://docs.revenuecat.com/docs/creating-play-service-credentials), added subscription details, created entitlements, offerings, products in revenue cat dashboard.

    In code initiated the revenue cat platform in main.dart, fetching the offerings and getting correct data, initiated purchase and it is showing payment successful but as soon as it comes back to application it is showing the error (attaching the log below) :

    D/[Purchases] - DEBUG(28086): ℹ️ SDK Version - 4.0.5
    D/[Purchases] - DEBUG(28086): 👤 Initial App User ID - null
    D/[Purchases] - DEBUG(28086): 👤 Identifying App User ID: $RCAnonymousID:1990da266b524c10a34f3118b99cef30
    D/[Purchases] - DEBUG(28086): ℹ️ Deleting old synced subscriber attributes that don't belong to $RCAnonymousID:1990da266b524c10a34f3118b99cef30
    D/[Purchases] - DEBUG(28086): ℹ️ App foregrounded
    D/[Purchases] - DEBUG(28086): ℹ️ PurchaserInfo cache is stale, updating from network in foreground.
    D/[Purchases] - DEBUG(28086): ℹ️ Offerings cache is stale, updating from network in foreground
    D/[Purchases] - DEBUG(28086): 😻 Offerings updated from network.
    D/[Purchases] - DEBUG(28086): ℹ️ Skipping updating pending purchase queue since BillingClient is not connected yet.
    D/[Purchases] - DEBUG(28086): ℹ️ No subscriber attributes to synchronize.
    D/[Purchases] - DEBUG(28086): ℹ️ Listener set
    D/[Purchases] - DEBUG(28086): ℹ️ Sending latest PurchaserInfo to listener.
    D/[Purchases] - DEBUG(28086): ℹ️ Starting connection for com.android.billingclient.api.BillingClientImpl@a7f65c2
    D/[Purchases] - DEBUG(28086): ℹ️ Ending connection for com.android.billingclient.api.BillingClientImpl@d4289d5
    D/[Purchases] - DEBUG(28086): ℹ️ Billing Service Setup finished for com.android.billingclient.api.BillingClientImpl@a7f65c2
    D/[Purchases] - DEBUG(28086): ℹ️ Updating pending purchase queue
    D/[Purchases] - DEBUG(28086): ℹ️ API request started: GET /subscribers/%24RCAnonymousID%3A1990da266b524c10a34f3118b99cef30
    D/[Purchases] - DEBUG(28086): ℹ️ API request completed with status: GET /subscribers/%24RCAnonymousID%3A1990da266b524c10a34f3118b99cef30 200
    D/[Purchases] - DEBUG(28086): ℹ️ PurchaserInfo updated, sending to listener.
    D/[Purchases] - DEBUG(28086): ℹ️ API request started: GET /subscribers/%24RCAnonymousID%3A1990da266b524c10a34f3118b99cef30/offerings
    D/[Purchases] - DEBUG(28086): ℹ️ API request completed with status: GET /subscribers/%24RCAnonymousID%3A1990da266b524c10a34f3118b99cef30/offerings 200
    D/[Purchases] - DEBUG(28086): ℹ️ Requesting products from the store with identifiers: labh_premium
    D/[Purchases] - DEBUG(28086): ℹ️ Querying subs
    D/[Purchases] - DEBUG(28086): ℹ️ Querying inapp
    D/[Purchases] - DEBUG(28086): ℹ️ Cleaning previously sent tokens
    D/[Purchases] - DEBUG(28086): ℹ️ Tokens already posted: []
    D/[Purchases] - DEBUG(28086): ℹ️ Saving tokens []
    D/[Purchases] - DEBUG(28086): ℹ️ Tokens already posted: []
    D/[Purchases] - DEBUG(28086): ℹ️ Products request finished for labh_premium
    D/[Purchases] - DEBUG(28086): 💰 Retrieved skuDetailsList: SkuDetails: {"productId":"labh_premium","type":"subs","price":"₹329.87","price_amount_micros":329870000,"price_currency_code":"INR","title":"Labh Premium (Labh)","description":"To get unlimited product additions, notifications and all features access","subscriptionPeriod":"P1M","freeTrialPeriod":"P12W6D","skuDetailsToken":"AEuhp4LH4Q6C1qQKx2QJ_dGdjtBeF_-zqyo1n6A9ZAt6YOi1tpbQ9n5RvEOUEyxm5bE="}
    D/[Purchases] - DEBUG(28086): 💰 labh_premium - SkuDetails: {"productId":"labh_premium","type":"subs","price":"₹329.87","price_amount_micros":329870000,"price_currency_code":"INR","title":"Labh Premium (Labh)","description":"To get unlimited product additions, notifications and all features access","subscriptionPeriod":"P1M","freeTrialPeriod":"P12W6D","skuDetailsToken":"AEuhp4LH4Q6C1qQKx2QJ_dGdjtBeF_-zqyo1n6A9ZAt6YOi1tpbQ9n5RvEOUEyxm5bE="}
    D/[Purchases] - DEBUG(28086): ℹ️ Vending PurchaserInfo from cache.
    D/[Purchases] - DEBUG(28086): ℹ️ Checking if cache is stale AppInBackground false
    D/[Purchases] - DEBUG(28086): ℹ️ Vending Offerings from cache
    D/[Purchases] - DEBUG(28086): ℹ️ Checking if cache is stale AppInBackground false
    D/[Purchases] - DEBUG(28086): ℹ️ Vending Offerings from cache
    D/[Purchases] - DEBUG(28086): 💰 Purchase started - product:  SkuDetails: {"productId":"labh_premium","type":"subs","price":"₹329.87","price_amount_micros":329870000,"price_currency_code":"INR","title":"Labh Premium (Labh)","description":"To get unlimited product additions, notifications and all features access","subscriptionPeriod":"P1M","freeTrialPeriod":"P12W6D","skuDetailsToken":"AEuhp4LH4Q6C1qQKx2QJ_dGdjtBeF_-zqyo1n6A9ZAt6YOi1tpbQ9n5RvEOUEyxm5bE="}  - offering: Default
    D/[Purchases] - DEBUG(28086): 💰 Purchasing product: labh_premium
    D/[Purchases] - DEBUG(28086): ℹ️ Checking if cache is stale AppInBackground false
    E/sqlite3_android(28086): [IKR-38846] ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
    E/sqlite3_android(28086): [IKR-38846] ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
    D/ViewRootImpl(28086): support adaptive color gamut feature!
    V/ViewRootImpl(28086): The specified message queue synchronization  barrier token has not been posted or has already been removed
    D/ViewRootImpl[MainActivity](28086): windowFocusChanged hasFocus=false inTouchMode=true
    E/sqlite3_android(28086): [IKR-38846] ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
    E/sqlite3_android(28086): [IKR-38846] ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
    E/sqlite3_android(28086): [IKR-38846] ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
    E/sqlite3_android(28086): [IKR-38846] ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
    D/DecorView(28086): onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@a52f5b8[ProxyBillingActivity]
    D/ViewRootImpl[ProxyBillingActivity](28086): windowFocusChanged hasFocus=true inTouchMode=true
    D/ViewRootImpl[ProxyBillingActivity](28086): windowFocusChanged hasFocus=false inTouchMode=true
    W/BillingHelper(28086): Couldn't find purchase lists, trying to find single data.
    D/[Purchases] - DEBUG(28086): ℹ️ BillingWrapper purchases updated: labh_premium GPA.3376-1240-3145-24419 incnbbphcdfjpldpihckgkkn.AO-J1Ozpf81-Sw2aVSSj45AWwZc_-GEoB3UGeyZ2uuXWy34eXFHnBy-O-xrPywEeNuTS7cJz_z1Z2IDjL0E5IOPGCPb6dnSOay5WBpePNJXitLoC29yNFyk
    D/[Purchases] - DEBUG(28086): ℹ️ Requesting products from the store with identifiers: labh_premium
    D/DecorView(28086): onWindowFocusChangedFromViewRoot hasFocus: true, DecorView@a4a7730[MainActivity]
    D/ViewRootImpl[MainActivity](28086): windowFocusChanged hasFocus=true inTouchMode=true
    E/sqlite3_android(28086): [IKR-38846] ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
    D/[Purchases] - DEBUG(28086): ℹ️ Products request finished for labh_premium
    D/[Purchases] - DEBUG(28086): 💰 Retrieved skuDetailsList: SkuDetails: {"productId":"labh_premium","type":"subs","price":"₹329.87","price_amount_micros":329870000,"price_currency_code":"INR","title":"Labh Premium (Labh)","description":"To get unlimited product additions, notifications and all features access","subscriptionPeriod":"P1M","freeTrialPeriod":"P12W6D","skuDetailsToken":"AEuhp4LH4Q6C1qQKx2QJ_dGdjtBeF_-zqyo1n6A9ZAt6YOi1tpbQ9n5RvEOUEyxm5bE="}
    D/[Purchases] - DEBUG(28086): 💰 labh_premium - SkuDetails: {"productId":"labh_premium","type":"subs","price":"₹329.87","price_amount_micros":329870000,"price_currency_code":"INR","title":"Labh Premium (Labh)","description":"To get unlimited product additions, notifications and all features access","subscriptionPeriod":"P1M","freeTrialPeriod":"P12W6D","skuDetailsToken":"AEuhp4LH4Q6C1qQKx2QJ_dGdjtBeF_-zqyo1n6A9ZAt6YOi1tpbQ9n5RvEOUEyxm5bE="}
    D/[Purchases] - DEBUG(28086): ℹ️ Found 0 unsynced attributes for App User ID: $RCAnonymousID:1990da266b524c10a34f3118b99cef30
    E/sqlite3_android(28086): [IKR-38846] ONEPLUS_NAME_PARTS_MATCH SQLITE_OK
    D/[Purchases] - DEBUG(28086): ℹ️ API request started: POST /receipts
    D/[Purchases] - DEBUG(28086): ℹ️ API request completed with status: POST /receipts 503
    E/[Purchases] - ERROR(28086): 🤖‼️ There was a credentials issue. Check the underlying error for more details.
    

    And I am getting the 1st receipt in mail from google play store and after 5 minutes I get cancellation receipt and shows the reason "Purchase is not acknowledged".

    Any kind of help will be appreciated. Thanks..

    • GrahamD
      GrahamD almost 3 years
      How long before testing did you set up the credentials on play store?
    • Araju
      Araju almost 3 years
      its already more than 48 hours
  • Araju
    Araju almost 3 years
    But if it was bcz of credential issue then why I am getting the product details correctly from @revenuecat through my code?
  • enc_life
    enc_life almost 3 years
    Credentials aren't required to fetch products, only to validate the purchase token server-side. So the purchase will even complete with Google, but the credentials cannot validate it.
  • Araju
    Araju almost 3 years
    shall I recreate the credentials? and it will again take next 36 hours to activate?