-
Notifications
You must be signed in to change notification settings - Fork 371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The SDK crashes during initialization when using with Amazon IAP AppStore SDK 3.0.2 #1595
Comments
@Avivma Thanks for reporting, your recommendation of calling on the main thread looks correct based on the error you are seeing. We address this and update this thread once a fix is released. |
Hi jkasten2, do know when this fix will be ready? |
Hi jkasten2, just a kindly reminder. I still can't use your services in my app. |
We don't have an update at this time, we will still address this issue. PRs are welcome if you are able to find a fix for the issue. |
Following, same issue here using RevenueCat 4.0.0 on Flutter. |
I work for RevenueCat and I just wanted to follow up here for visibility. We currently depend on the Amazon Appstore SDK 3.0.3 and we include it in our plugin. We don't use the jar anymore since v3 is finally being distributed on Maven Central. It looks like your SDK is not including the jar in runtime and it's only compiling against it, so when it runs alongside our plugin, it will crash due to the runtime version being different from what your code expects. |
Thanks folks. Interoperability with RevenueCat is of critical importance to us. We'll dig in deeper ASAP. |
Fixed by version 4.8.2 #1622 |
Have similar issue with Ionic + Capacitor + Vue newest versions of libs revenuecat was already integrated and worked fine, faced that issue on android 15 device when added OneSignal.initialize() method with OneSignal app id to App.vue |
Description:
App crashes after a call to OneSignal.initWithContext(context). See stacktrace below.
The reason is because TrackAmazonPurchase class calls for: PurchasingService.registerListener(this.context, this.osPurchasingListener); not on the main thread.
This method PurchasingService.registerListener, should only be called on the main thread.
According to Amazon IAP doc: https://developer.amazon.com/docs/in-app-purchasing/iap-implement-iap.html#purchasingservice
Environment
OneSignal 4.7.3
amazon-appstore-sdk 3.0.2
Steps to Reproduce Issue:
Anything else:
Stacktrace:
2022-05-26 18:06:05.317 E/AndroidRuntime: FATAL EXCEPTION: OS_REST_SUCCESS_CALLBACK
Process: com.checkpoint.zonealarm.mobilesecurity, PID: 5934
com.amazon.a.a.o.a.b: Executing thread must be thread: 2, was: 81373
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.(ResourceManagerImpl.java:34)
at com.amazon.a.a.b(AppstoreSDK.java:169)
at com.amazon.a.a.(AppstoreSDK.java:153)
at com.amazon.a.a.a(AppstoreSDK.java:232)
at com.amazon.device.iap.PurchasingService.registerListener(PurchasingService.java:89)
at com.onesignal.TrackAmazonPurchase.setListener(TrackAmazonPurchase.java:107)
at com.onesignal.TrackAmazonPurchase.(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:730)
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:923)
The text was updated successfully, but these errors were encountered: