[TypeError: Cannot read property 'identifier' of undefined]

  • 23 April 2024
  • 2 replies


I am setting up a one-time purchase with Revenuecat

I have set up subscriptions before, but never a one-time purchase like the “coins” I am attempting to sell now. 


I am logging “currentOffering?.availablePackages and see the correct product I want to sell. When I run:


const { customerInfo } = await Purchases.purchasePackage(currentOffering?.availablePackages?.coins);


I get this error: 


[TypeError: Cannot read property 'identifier' of undefined]


Please let me know if you can see what I am doing wrong. Please see the attached screenshot to see what is logging out for my currentOfferings

2 replies

Userlevel 4
Badge +8

Hi, can you make sure you are passing a package to the purchasePackage method?

Additionally, could you please provide the entire debug logs for this? You can enable them here:

Userlevel 4
Badge +8

Hi @jacksoRoss apologies, it looks like the post closed out before you could respond. Are you still having problems with this? If so please let me know the information requested in the previous reply.