Skip to main content
Question

setupPurchases of null on react native / expo


I do use Expo but when I try to initialize revenue cat SDK, I got ‘LOG {"error": :TypeError: Cannot read property 'setupPurchases' of null]}’ error.

my code just like that; await Purchases.configure({ apiKey: 'x' })

I’m  using andorid, in real device and emulator.
 

Hi, are you using a development build? Please see our guide here: 

 


Hi I have the same problem and I'm using the dev-client.
The error is in the catch of the setup() fonction that is calling the Purchases.configure


I do use Expo but when I try to initialize revenue cat SDK, I got ‘LOG {"error": :TypeError: Cannot read property 'setupPurchases' of null]}’ error.

my code just like that; await Purchases.configure({ apiKey: 'x' })

I’m  using andorid, in real device and emulator.
 

@onur-anil-mertoglu-271a59 have you fix the issue?


 I get the same error and I am running a dev build in my device (not expo go)


Did anybody found a way to fix this? I also get this error, I have a dev build installed and running. But In my root layout I have React Native Purchases and I get this problem. I have checked that env picks up well the api key, but don’t know why this happens.


facing the same issue , api key is fetched correctly but not sure what is causing this error  TypeError: Cannot read property 'setupPurchases' of null]” 
@ Revenue cart kindly provide your solution on this error


Has anyone figured  a work around for this issue , if yes then please do post it here 


It’s crazy, I’ve been stuck with this error for more than 2 weeks. Tried everything above, but had no luck.


I have the same issue. I am using the bare workflow and running the development build and still getting this error. Any resolution?


Has anyone found a solution to this?


Reply