Skip to content
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

IAP 5.xx does not work with one signal on Android #1291

Closed
mozadeh opened this issue Mar 31, 2021 · 5 comments
Closed

IAP 5.xx does not work with one signal on Android #1291

mozadeh opened this issue Mar 31, 2021 · 5 comments
Labels
🥋 compatibility Compatibility issue ❌ invalid Can't do anything

Comments

@mozadeh
Copy link

mozadeh commented Mar 31, 2021

Description:

If an app has both IAP (react-native-iap 5.x.x+) and Onesignal. As soon as Onesignal.init is called app crashes. This is not an issue with react-native-iap version before 5.x.x

Platform:

Android only

Steps to Reproduce Issue:

install react-native-onesignal
install react-native-iap (https://github.com/dooboolab/react-native-iap)
call onesignal.init and app crashes with this message "d.b.a.a.c.f cannot be cast to d.b.a.a.a"

Tested Environment:

Prod

Error Message

2020-11-24 10:22:58.203 13843-14028/? E/unknown:ReactNative: CatalystInstanceImpl caught native exception
java.lang.ClassCastException: d.b.a.a.c.f cannot be cast to d.b.a.a.a
at com.onesignal.z2.(Unknown Source:62)
at com.onesignal.v1.Q(Unknown Source:9)
at com.onesignal.v1.a(Unknown Source:110)
at com.geektime.rnonesignalandroid.RNOneSignal.init(Unknown Source:41)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(Unknown Source:149)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(Unknown Source:21)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(Unknown Source:0)
at android.os.Looper.loop(Looper.java:237)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(Unknown Source:37)
at java.lang.Thread.run(Thread.java:919)
2020-11-24 10:22:58.203 13843-14028/? E/unknown:DisabledDevSupportManager: Caught exception
java.lang.ClassCastException: d.b.a.a.c.f cannot be cast to d.b.a.a.a
at com.onesignal.z2.(Unknown Source:62)
at com.onesignal.v1.Q(Unknown Source:9)
at com.onesignal.v1.a(Unknown Source:110)
at com.geektime.rnonesignalandroid.RNOneSignal.init(Unknown Source:41)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(Unknown Source:149)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(Unknown Source:21)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(Unknown Source:0)
at android.os.Looper.loop(Looper.java:237)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(Unknown Source:37)
at java.lang.Thread.run(Thread.java:919)

--------- beginning of crash
2020-11-24 10:22:58.203 13843-14028/? E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
Process: com.bitapps.freshbit, PID: 13843
java.lang.ClassCastException: d.b.a.a.c.f cannot be cast to d.b.a.a.a
at com.onesignal.z2.(Unknown Source:62)
at com.onesignal.v1.Q(Unknown Source:9)
at com.onesignal.v1.a(Unknown Source:110)
at com.geektime.rnonesignalandroid.RNOneSignal.init(Unknown Source:41)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(Unknown Source:149)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(Unknown Source:21)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(Unknown Source:0)
at android.os.Looper.loop(Looper.java:237)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(Unknown Source:37)
at java.lang.Thread.run(Thread.java:919)

@hrishiakhade
Copy link

Facing same issue

@hyochan
Copy link
Member

hyochan commented May 9, 2021

Could someone post this to onesignal repo and share link here? I can't see any log on our side.

@hyochan hyochan added ❌ invalid Can't do anything 🥋 compatibility Compatibility issue 👣 waiting for response Need feedback to continue labels May 9, 2021
@mozadeh
Copy link
Author

mozadeh commented May 9, 2021

@hyochan hyochan removed the 👣 waiting for response Need feedback to continue label May 10, 2021
@hyochan hyochan pinned this issue May 10, 2021
@andresesfm
Copy link
Collaborator

@mozadeh can you please test with 6.0.6? I recently updated the android plugin and some dependencies. Please let us know if that helps. Note that in another project we also have onesignal and 5.x and we haven't seen that error

@mozadeh
Copy link
Author

mozadeh commented May 11, 2021

Finally works, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🥋 compatibility Compatibility issue ❌ invalid Can't do anything
Projects
None yet
Development

No branches or pull requests

4 participants