Skip to main content
Answer

[Expo react-native app] RevenueCat SDK crashes when Purchases.configure() is called

  • October 16, 2025
  • 3 replies
  • 164 views

Forum|alt.badge.img

Hi. I am running into problem initializing RevenueCat for my Expo react-native app. I spent a lot of time debugging the issue and finally narrowed to the Purchases.configure() call.

 

First of all I had everything working fine in a “development” build (a native build with “developmentClient=true”. It is not an Expo Go build.). I am using a RevenueCat “Test Store” because I haven’t set up anything on App Store or Play Store. It worked fine on both iOS and Android.

 

Then I tried to make internal “preview” builds  (with “developmentClient=false”) and it started having problem. On iOS the app immediately crashed and disappeared once the Purchases.configure() is called. On Android the app became a blank screen right after the configure() call, but it does seem like different symptoms of the same problem. I set up the “Purchases.configure()” call within a button onPress() event to help the debugging, and hardcoded the Test Store API key in codes to rule out the possible environment variable issue.

 

Can “Test Store” be used in an Expo build without the “developmentClient” at all? This is still a non-production build so I assume it should be still ok to use Test Store. I did notice a log line from RevenueCat saying “The Test Store is for development only. Never use a Test Store API key in production. Our SDK will crash if using it in production.”


This problem is driving me nut right now. Please let me know if you have any insight. Thanks!
 

In the Android Studio LogCat I saw the following error logs related to the RevenueCat:

 

Unhandled SoftException

com.facebook.react.bridge.ReactNoCrashSoftException: raiseSoftException(getOrCreateDestroyTask()): handleHostException(message = "There is an issue with your configuration. Check the underlying error for more details.")

at com.facebook.react.runtime.ReactHostImpl.raiseSoftException(ReactHostImpl.kt:787)

at com.facebook.react.runtime.ReactHostImpl.getOrCreateDestroyTask(ReactHostImpl.kt:1311)

at com.facebook.react.runtime.ReactHostImpl.destroy$lambda$10(ReactHostImpl.kt:473)

at com.facebook.react.runtime.ReactHostImpl.$r8$lambda$vrU67S1pce6ypI1MpEJ0yfM09iA(Unknown Source:0)

at com.facebook.react.runtime.ReactHostImpl$$ExternalSyntheticLambda35.call(D8$$SyntheticClass:0)

at com.facebook.react.runtime.internal.bolts.Task$Companion.call$lambda$2(Task.kt:315)

at com.facebook.react.runtime.internal.bolts.Task$Companion.$r8$lambda$MFqd_-X5KhHmu0hvNE2Bec_4mJM(Unknown Source:0)

at com.facebook.react.runtime.internal.bolts.Task$Companion$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1156)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:651)

at java.lang.Thread.run(Thread.java:1119)

Caused by: com.revenuecat.purchases.PurchasesException: There is an issue with your configuration. Check the underlying error for more details.

at com.revenuecat.purchases.PurchasesFactory.validateConfiguration(PurchasesFactory.kt:433)

at com.revenuecat.purchases.PurchasesFactory.createPurchases(PurchasesFactory.kt:77)

at com.revenuecat.purchases.PurchasesFactory.createPurchases$default(PurchasesFactory.kt:68)

at com.revenuecat.purchases.Purchases$Companion.configure(Purchases.kt:1082)

at com.revenuecat.purchases.hybridcommon.CommonKt.configure(common.kt:752)

at com.revenuecat.purchases.react.RNPurchasesModule.setupPurchases(RNPurchasesModule.java:99)

at com.facebook.jni.NativeRunnable.run(Native Method)

at android.os.Handler.handleCallback(Handler.java:995)

at android.os.Handler.dispatchMessage(Handler.java:105)

at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.kt:21)

at android.os.Looper.loopOnce(Looper.java:288)

at android.os.Looper.loop(Looper.java:393)

at com.facebook.react.bridge.queue.MessageQueueThreadImpl$Companion.startNewBackgroundThread$lambda$1(MessageQueueThreadImpl.kt:175)

at com.facebook.react.bridge.queue.MessageQueueThreadImpl$Companion.$r8$lambda$ldnZnqelhYFctGaUKkOKYj5rxo4(Unknown Source:0)

at com.facebook.react.bridge.queue.MessageQueueThreadImpl$Companion$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)

at java.lang.Thread.run(Thread.java:1119) 

 

'Error initializing RevenueCat:', [Error: There is no singleton instance. Make sure you configure Purchases before trying to get the default instance. More info here: https://errors.rev.cat/configuring-sdk]

Best answer by rick

Hi,

Sorry for the confusion here. Preview builds are production-like environments, which is why the Test Store isn’t available in these builds. In order to test the integration with the SDK in this environment the production Apple / Google API keys have to be used.

As you mentioned error messaging is not super clear here, which is something we will make sure to improve. Thanks for your feedback on this.

Please let me know in case you have any other questions.

Best,

Rick

This post has been closed for comments

3 replies

Forum|alt.badge.img
  • RevenueCat Staff
  • Answer
  • October 17, 2025

Hi,

Sorry for the confusion here. Preview builds are production-like environments, which is why the Test Store isn’t available in these builds. In order to test the integration with the SDK in this environment the production Apple / Google API keys have to be used.

As you mentioned error messaging is not super clear here, which is something we will make sure to improve. Thanks for your feedback on this.

Please let me know in case you have any other questions.

Best,

Rick


Forum|alt.badge.img
  • Author
  • New Member
  • October 17, 2025

Hi,

Sorry for the confusion here. Preview builds are production-like environments, which is why the Test Store isn’t available in these builds. In order to test the integration with the SDK in this environment the production Apple / Google API keys have to be used.

As you mentioned error messaging is not super clear here, which is something we will make sure to improve. Thanks for your feedback on this.

Please let me know in case you have any other questions.

Best,

Rick

Hi, Rick. Thanks for the clarification!


I’ve been having the exact same issue with the test store.

  • My app was working as expected on development build
  • I got the app crashing with configure on preview builds. My current config looks like this:
    • "preview": {

      "distribution": "internal",

      "environment": "preview",

      "channel": "preview"

      },​

  • So your comment above makes sense: “​​​​​​Preview builds are production-like environments”

  • As my preview stage is for internal distribution, this can’t be uploaded using eas submit. So it would be good to have a way to still use the test store in internal builds