Skip to main content

I have installed the lasted version of revenue cat in my expo app and all work fine in IOS but when I created a build to test on android it crashed with 

```

Your app just crashed. See the error below.

com.amazon.a.a.o.a.b: Executing thread must be thread: 2, was: 206
at com.amazon.a.a.o.a.a.a(Assert.java:59)
at com.amazon.a.a.o.a.a.a(Assert.java:48)
at com.amazon.a.a.o.a.a.a(Assert.java:31)
at com.amazon.a.a.k.c.a(ResourceManagerImpl.java:50)
at com.amazon.a.a.k.c.<init>(ResourceManagerImpl.java:34)
at com.amazon.a.a.b(AppstoreSDK.java:171)
at com.amazon.a.a.<init>(AppstoreSDK.java:155)
at com.amazon.a.a.a(AppstoreSDK.java:234)
at com.amazon.device.iap.PurchasingService.registerListener(PurchasingService.java:89)
at com.onesignal.TrackAmazonPurchase.setListener(TrackAmazonPurchase.java:107)
at com.onesignal.TrackAmazonPurchase.<init>(TrackAmazonPurchase.java:84)
at com.onesignal.OneSignal.handleAmazonPurchase(OneSignal.java:978)
at com.onesignal.OneSignal.init(OneSignal.java:855)
at com.onesignal.OneSignal.setAppId(OneSignal.java:728)
at com.onesignal.OneSignal.reassignDelayedInitParams(OneSignal.java:1174)
at com.onesignal.OneSignal.onRemoteParamSet(OneSignal.java:882)
at com.onesignal.OneSignal$7.complete(OneSignal.java:1115)
at com.onesignal.OneSignalRemoteParams.processJson(OneSignalRemoteParams.java:211)
at com.onesignal.OneSignalRemoteParams.access$100(OneSignalRemoteParams.java:12)
at com.onesignal.OneSignalRemoteParams$1.onSuccess(OneSignalRemoteParams.java:156)
at com.onesignal.OneSignalRestClient$5.run(OneSignalRestClient.java:279)
at java.lang.Thread.run(Thread.java:1012)

```
Expo SDK : 45 (managed flow)
react-native-purchases: 5..0.0

Any help with why this may be happening? 

I’m also experiencing the same issue, but my app crashes on startup! From the logs, looks like it might be some conflict with OneSignal.

 

Note: I’m using the bare workflow with Expo SDK 45

 

Your app just crashed. See the error below.

com.amazon.a.a.o.a.b: Executing thread must be thread: 2, was: 2144
at com.amazon.a.a.o.a.a.a(Assert.java:59)
at com.amazon.a.a.o.a.a.a(Assert.java:48)
at com.amazon.a.a.o.a.a.a(Assert.java:31)
at com.amazon.a.a.k.c.a(ResourceManagerImpl.java:50)
at com.amazon.a.a.k.c.<init>(ResourceManagerImpl.java:34)
at com.amazon.a.a.b(AppstoreSDK.java:171)
at com.amazon.a.a.<init>(AppstoreSDK.java:155)
at com.amazon.a.a.a(AppstoreSDK.java:234)
at com.amazon.device.iap.PurchasingService.registerListener(PurchasingService.java:89)
at com.onesignal.TrackAmazonPurchase.setListener(TrackAmazonPurchase.java:107)
at com.onesignal.TrackAmazonPurchase.<init>(TrackAmazonPurchase.java:84)
at com.onesignal.OneSignal.handleAmazonPurchase(OneSignal.java:978)
at com.onesignal.OneSignal.init(OneSignal.java:855)
at com.onesignal.OneSignal.setAppId(OneSignal.java:728)
at com.onesignal.OneSignal.reassignDelayedInitParams(OneSignal.java:1174)
at com.onesignal.OneSignal.onRemoteParamSet(OneSignal.java:882)
at com.onesignal.OneSignal$7.complete(OneSignal.java:1115)
at com.onesignal.OneSignalRemoteParams.processJson(OneSignalRemoteParams.java:211)
at com.onesignal.OneSignalRemoteParams.access$100(OneSignalRemoteParams.java:12)
at com.onesignal.OneSignalRemoteParams$1.onSuccess(OneSignalRemoteParams.java:156)
at com.onesignal.OneSignalRestClient$5.run(OneSignalRestClient.java:279)
at java.lang.Thread.run(Thread.java:764)


Aashiq,

 

Try upgrading you’re onesignal package: https://github.com/OneSignal/react-native-onesignal/issues/1422


Thanks @Cameron Napoli that worked! 

I am now having an issue on the physical android device. trying to getOffers() and it says there is a configuration error. 

However I do not get this error in the emulator or on ios simulator and physical device. 


@Aashiq Durga have you gone over the potential issues in this list: Why are offerings or products empty? | RevenueCat Community


Hey @Jens 

I just went through the list and the only diff is I am on a internal track. Could this be the problem? 

I have other users on my closed track who I do not want to release to just yet.

Full exception
```
 

arguments: s{"nativeStackAndroid":d],"userInfo":{"underlyingErrorMessage":"There's a problem with your configuration. None of the products registered in the RevenueCat dashboard could be fetched from the Play Store.\nMore information: https://rev.cat/why-are-offerings-empty","readableErrorCode":"ConfigurationError","readable_error_code":"ConfigurationError","message":"There is an issue with your configuration. Check the underlying error for more details.","code":23},"message":"There is an issue with your configuration. Check the underlying error for more details.","code":"23","line":54,"column":1119,"sourceURL":"index.android.bundle"}], logger: console```

 


Hi @Aashiq Durga , yeah that’s likely the problem, I believe you need a Closed Track. That said, you should be able to create a second Closed Track if you don’t want to re-use your existing one.

See this document for further details: Play Store Sandbox Purchase Testing – RevenueCat


Hmmm no luck! @jens

Created a new closed track, promoted the release and still the same error. 

Not sure what i am doing wrong for the physical android device in specific. 

Just to confirm it gets offers for the emulator and on ios both simulator and physical device.

 


Did you check for any of these issues:

 


Hey @Jens ,

i just checked the app this morning and it started working. 

I assume there was some propagation that needed to take some time. 

Happy to close this ticket. 

Thanks for the help! 

 


That’s great to hear!


Seriously thank you. My team wasn't getting any errors on the crash and we were stumped. 

It would probably be helpful if this particular issue was called out on Github as it took us a few days to find this. 


Purchases works fine on Expo and React Native. But it crashes when Google AdMob and Purchases are installed together.

This is what the bundler spit out in React Native after install RevenueCat Purchase.


* What went wrong:
A problem occurred evaluating project ':react-native-purchases'.
> Failed to apply plugin 'kotlin-android'.
   > Could not create an instance of type org.jetbrains.kotlin.gradle.plugin.sources.DefaultKotlinSourceSet.
      > Could not initialize class org.jetbrains.kotlin.gradle.plugin.sources.DefaultKotlinSourceSetKt

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':react-native-purchases'.
> compileSdkVersion is not specified. Please add it to build.gradle

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 32s
5 actionable tasks: 5 up-to-date

 

When the Purchase uninstalled, building works fine again. The Purchases ruined my Expo app completely, and I had no luck to recover or reset to an earlier git commit.

 


@jc-kim-712b6b would you mind creating a new post for this, given that it’s a different problem? that way it’s more likely you’ll get help from someone who might be able to help.


Reply