Skip to main content
Question

MissingFieldException: Field 'product_plan_identifier'


Forum|alt.badge.img+4

Hi all, i’m getting this error just when i open up my flutter application in dev mode inside my android emulator:
 

D/[Purchases] - DEBUG(13399): Retrieving customer info with policy: CACHED_OR_FETCHED
D/[Purchases] - DEBUG(13399): ℹ️ Vending CustomerInfo from cache.
E/[Purchases] - ERROR(13399): Error deserializing subscription information. The input is not a SubscriptionInfo
E/[Purchases] - ERROR(13399): kotlinx.serialization.MissingFieldException: Field 'product_plan_identifier' is required for type with serial name 'com.revenuecat.purchases.common.responses.SubscriptionInfoResponse', but it was missing at path: $
E/[Purchases] - ERROR(13399): 	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:93)
E/[Purchases] - ERROR(13399): 	at kotlinx.serialization.json.Json.decodeFromString(Json.kt:107)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.common.CustomerInfoFactory.parseSubscriptionInfos(CustomerInfoFactory.kt:161)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.CustomerInfo$subscriptionsByProductIdentifier$2.invoke(CustomerInfo.kt:121)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.CustomerInfo$subscriptionsByProductIdentifier$2.invoke(CustomerInfo.kt:120)
E/[Purchases] - ERROR(13399): 	at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.CustomerInfo.getSubscriptionsByProductIdentifier(CustomerInfo.kt:120)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.hybridcommon.mappers.CustomerInfoMapperKt.map(CustomerInfoMapper.kt:26)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.hybridcommon.CommonKt$logIn$2.invoke(common.kt:408)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.hybridcommon.CommonKt$logIn$2.invoke(common.kt:403)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.ListenerConversionsKt$logInSuccessListener$1.onReceived(listenerConversions.kt:20)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.PurchasesOrchestrator$logIn$3$1.invoke(PurchasesOrchestrator.kt:550)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.PurchasesOrchestrator$logIn$3$1.invoke(PurchasesOrchestrator.kt:550)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.PurchasesOrchestrator.dispatch(PurchasesOrchestrator.kt:977)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.PurchasesOrchestrator.access$dispatch(PurchasesOrchestrator.kt:91)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.PurchasesOrchestrator$logIn$3.invoke(PurchasesOrchestrator.kt:550)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.PurchasesOrchestrator$logIn$3.invoke(PurchasesOrchestrator.kt:548)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.ListenerConversionsCommonKt$receiveCustomerInfoCallback$1.onReceived(ListenerConversionsCommon.kt:57)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.CustomerInfoHelper$retrieveCustomerInfo$callbackWithDiagnostics$1.invoke(CustomerInfoHelper.kt:65)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.CustomerInfoHelper$retrieveCustomerInfo$callbackWithDiagnostics$1.invoke(CustomerInfoHelper.kt:57)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.CustomerInfoHelper$getCustomerInfoCachedOrFetched$1.invoke(CustomerInfoHelper.kt:224)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.CustomerInfoHelper$getCustomerInfoCachedOrFetched$1.invoke(CustomerInfoHelper.kt:224)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.CustomerInfoHelper.dispatch(CustomerInfoHelper.kt:316)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.CustomerInfoHelper.getCustomerInfoCachedOrFetched(CustomerInfoHelper.kt:224)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.CustomerInfoHelper.retrieveCustomerInfo(CustomerInfoHelper.kt:85)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.CustomerInfoHelper.retrieveCustomerInfo$default(CustomerInfoHelper.kt:45)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.PurchasesOrchestrator.logIn(PurchasesOrchestrator.kt:543)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.Purchases.logIn(Purchases.kt:406)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.ListenerConversionsKt.logInWith(listenerConversions.kt:147)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.hybridcommon.CommonKt.logIn(common.kt:403)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases_flutter.PurchasesFlutterPlugin.logIn(PurchasesFlutterPlugin.java:495)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases_flutter.PurchasesFlutterPlugin.onMethodCall(PurchasesFlutterPlugin.java:181)
E/[Purchases] - ERROR(13399): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/[Purchases] - ERROR(13399): 	at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/[Purchases] - ERROR(13399): 	at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/[Purchases] - ERROR(13399): 	at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
E/[Purchases] - ERROR(13399): 	at android.os.Handler.handleCallback(Handler.java:959)
E/[Purchases] - ERROR(13399): 	at android.os.Handler.dispatchMessage(Handler.java:100)
E/[Purchases] - ERROR(13399): 	at android.os.Looper.loopOnce(Looper.java:232)
E/[Purchases] - ERROR(13399): 	at android.os.Looper.loop(Looper.java:317)
E/[Purchases] - ERROR(13399): 	at android.app.ActivityThread.main(ActivityThread.java:8705)
E/[Purchases] - ERROR(13399): 	at java.lang.reflect.Method.invoke(Native Method)
E/[Purchases] - ERROR(13399): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
E/[Purchases] - ERROR(13399): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
E/[Purchases] - ERROR(13399): Caused by: kotlinx.serialization.MissingFieldException: Field 'product_plan_identifier' is required for type with serial name 'com.revenuecat.purchases.common.responses.SubscriptionInfoResponse', but it was missing
E/[Purchases] - ERROR(13399): 	at kotlinx.serialization.internal.PluginExceptionsKt.throwMissingFieldException(PluginExceptions.kt:20)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.common.responses.SubscriptionInfoResponse.<init>(SubscriptionInfoResponse.kt:16)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.common.responses.SubscriptionInfoResponse$$serializer.deserialize(SubscriptionInfoResponse.kt:16)
E/[Purchases] - ERROR(13399): 	at com.revenuecat.purchases.common.responses.SubscriptionInfoResponse$$serializer.deserialize(SubscriptionInfoResponse.kt:16)
E/[Purchases] - ERROR(13399): 	at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:70)
E/[Purchases] - ERROR(13399): 	... 43 more
D/[Purchases] - DEBUG(13399): ℹ️ Checking if cache is stale AppInBackground false

 

It never happened before, any help is appreciated

 

4 replies

Forum|alt.badge.img+2

Same issue, after deleting emulator no issue. I’ve in parallel a real device and he didn’t got the issue. To got the issue i’ve hot reload the app quickly after payed my in app purchase subscription. Even after killing app and restarting it issue persisted, maybe something was broken.


Forum|alt.badge.img+5
  • New Member
  • 4 replies
  • April 29, 2025

I get this now too and reached out to support.

I’m not sure if this is happening only on the emulator or also in production.

Everything still appears to work properly, ignoring all the exceptions in the logs


Forum|alt.badge.img+5
  • New Member
  • 4 replies
  • April 30, 2025

Support responded and said this will be fixed in the next release:

https://github.com/RevenueCat/purchases-android/pull/2376

 

 


joan-cardona
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 402 replies
  • May 6, 2025

Hi all,

The fix has already been merged and it’s available in the 8.17.1 version of the SDK.

 

Best,


Reply


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