Flutter - RevenueCat - 存在凭据问题,请检查底层错误以获取更多详细信息,购买后会出现错误
Flutter - RevenueCat - There was a credentials issue, Check the underlying error for more details, error is coming after purchase
我正在通过 RevenueCat 将应用程序购买集成到我的 flutter 应用程序中,以支持 Android 和 IOS。我已按照文档中提到的所有步骤进行配置 (https://docs.revenuecat.com/docs/creating-play-service-credentials)、添加订阅详细信息、创建权利、产品、收入猫仪表板中的产品。
在代码中启动了 main.dart 中的收入猫平台,获取产品并获得正确的数据,启动购买并显示付款成功但一旦返回应用程序就显示错误(附上下面的日志):
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.
我从 google Play 商店收到第一封邮件收据,5 分钟后我收到取消收据并显示“购买未被确认”的原因。
我们将不胜感激任何形式的帮助。谢谢..
E/[Purchases] - ERROR(28086): ‼️ There was a credentials issue. Check the underlying error for more details.
该错误表明您上传到 RevenueCat 的 Play 商店凭据存在问题。通常,这是因为凭据可能需要一天的时间才能在整个过程中传播 Google - 因此,如果您最近设置了这些凭据,这可能就是原因。
参考文档:
我重新创建了 google 凭据并将新凭据与 revenuecat 相关联,几个小时后它工作正常。
我正在通过 RevenueCat 将应用程序购买集成到我的 flutter 应用程序中,以支持 Android 和 IOS。我已按照文档中提到的所有步骤进行配置 (https://docs.revenuecat.com/docs/creating-play-service-credentials)、添加订阅详细信息、创建权利、产品、收入猫仪表板中的产品。
在代码中启动了 main.dart 中的收入猫平台,获取产品并获得正确的数据,启动购买并显示付款成功但一旦返回应用程序就显示错误(附上下面的日志):
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.
我从 google Play 商店收到第一封邮件收据,5 分钟后我收到取消收据并显示“购买未被确认”的原因。
我们将不胜感激任何形式的帮助。谢谢..
E/[Purchases] - ERROR(28086): ‼️ There was a credentials issue. Check the underlying error for more details.
该错误表明您上传到 RevenueCat 的 Play 商店凭据存在问题。通常,这是因为凭据可能需要一天的时间才能在整个过程中传播 Google - 因此,如果您最近设置了这些凭据,这可能就是原因。
参考文档:
我重新创建了 google 凭据并将新凭据与 revenuecat 相关联,几个小时后它工作正常。