Skip to main content
Question

Cannot read property 'productIdentifier' of undefined

  • January 23, 2024
  • 2 replies
  • 117 views

Forum|alt.badge.img+8

I have seen this error sometimes:

Cannot read property 'productIdentifier' of undefined

Why would RevenueCat have an incomplete response when: const info = await Purchases.getCustomerInfo();

Then I access by:
info?.entitlements?.active?.[entitlementName]?.productIdentifier

 

This only seems to be in production, of course.

This post has been closed for comments

2 replies

Michael Fogel
Forum|alt.badge.img+6
  • Dedicated Contributor
  • January 25, 2024

Hey @lucksp !

 

Are you able to reproduce this? It could be internet related or something causing an interruption, but if you are able to debug this can you please create a support ticket so we can look further into what might be happening here? 

 

Ticket form: https://app.revenuecat.com/settings/support

 

We look forward to helping! 


Forum|alt.badge.img+8
  • Author
  • Helper
  • January 25, 2024

I can’t replicate it, but I had seen this error surprising amount in my BugSnag reporting:

 

 

It does seem like it’s related to AppState change of inactive/active...but there is connectivity always it seems in terms of WiFi or Mobile Network.


I put optional chaining on all the RevenueCat results…

 

I do have my logs for you set to Debug, so i hope they can find something when I submit the support request.