Question

setupPurchases of null on react native / expo

  • 31 August 2023
  • 4 replies
  • 665 views

Badge +1

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.
 


4 replies

Userlevel 4
Badge +8

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?

Badge +4

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

Reply