Solved

App crashes on android with setup purchases


Badge

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? 

icon

Best answer by Cameron Napoli 29 August 2022, 00:49

View original

11 replies

Badge +1

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)

Badge +1

Aashiq,

 

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

Badge

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. 

Userlevel 4
Badge +7

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

Badge

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: [{"nativeStackAndroid":[],"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```

 

Userlevel 4
Badge +7

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

Badge

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.

 

Userlevel 4
Badge +7

Did you check for any of these issues:

 

Badge

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! 

 

Userlevel 4
Badge +7

That’s great to hear!

Badge +2

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. 

Reply