Skip to main content
Question

Cannot read property 'productIdentifier' of undefined


Forum|alt.badge.img+7
  • Dedicated Member
  • 31 replies

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
  • 382 replies
  • 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+7
  • Author
  • Dedicated Member
  • 31 replies
  • 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.


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