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

Doesn't work with In App Purchases #1093

Closed
sadooghi opened this issue Nov 16, 2020 · 19 comments
Closed

Doesn't work with In App Purchases #1093

sadooghi opened this issue Nov 16, 2020 · 19 comments

Comments

@sadooghi
Copy link

sadooghi commented Nov 16, 2020

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

Environment

  1. What version of the OneSignal React-Native SDK are you using? 3.9.0
  2. How did you add the SDK to your project (eg. npm) npm

Steps to Reproduce Issue:

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

rgomezp commented Nov 24, 2020

Howdy,
Can you please include a log with the OneSignal loglevel set to VERBOSE?

Cheers

@sadooghi
Copy link
Author

sadooghi commented Nov 24, 2020

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)

@felipegmg
Copy link

Hi! I have exactly the same issue!

"react": "16.13.1"
"react-native": "0.63.3"
"react-native-onesignal": "^3.9.2"

Any solution?

@sadooghi
Copy link
Author

Hi

Any updates on this?

@rgomezp
Copy link
Contributor

rgomezp commented Jan 13, 2021

Howdy,
Unfortunately no updates yet. Thanks for your patience.

@mozadeh
Copy link

mozadeh commented Feb 6, 2021

Hi
This is still a problem with the latest version as well 4.0.3

@PradoGuilherme
Copy link

hey, same issue here. Any updates?

@PradoGuilherme
Copy link

@rgomezp any updates about that? I need to release my app and the error keeps occurring

@mozadeh
Copy link

mozadeh commented Mar 19, 2021

Any updates on this? this is a big blocker.

@rgomezp
Copy link
Contributor

rgomezp commented Mar 30, 2021

Howdy,

This is not an issue with react-native-iap version before 5.x.x

If this isn't an issue in older versions of react-native-iap, I would like to think the issue is with version 5+ of the same package.

I would recommend opening an issue with that package and downgrading to version 4 as a temporary workaround.

This sounds like a non-OneSignal issue.

If anyone has any information indicating otherwise, please share and we'll take a look.

Cheers

@PradoGuilherme
Copy link

hey @rgomezp,

I made downgrade to version 3 but the problem still occurs.

@rgomezp
Copy link
Contributor

rgomezp commented Mar 31, 2021

You need to downgrade the other package.

@PradoGuilherme
Copy link

@rgomezp So, you have the versions to I make a new test here?

@mozadeh
Copy link

mozadeh commented Mar 31, 2021

The crash happens in one-signal not IAP and between IAP and OneSignal, IAP is more critical to the success of our product, so I think we'll have to migrate off one-signal since I doubt IAP will fix a crash in another package.

@rgomezp
Copy link
Contributor

rgomezp commented Mar 31, 2021

@mozadeh ,
How is this an issue with OneSignal given that it only started happening with react-native-iap versions after 5.x.x ?

@PradoGuilherme the OP reported any 4 versions working fine. It only started happening with version 5+

@mozadeh
Copy link

mozadeh commented Mar 31, 2021

IAP updates support new Android / iOS versions. This problem occurs only on Android only and the relevant change I see for react-native-iap for version 5.0.0 is Fixes on missing [userId] and [profileId] on android #1141 and Support Amazon IAP feature#1134 these two packages (i.e. one signal and IAP) collide at one point. The issue is filed here is because of where the crash occurs. My thought is, if this is a relatively easy fix for the one-signal package, it would be great the team can look into it.

@hrishiakhade
Copy link

Facing same issue

"react-native-iap": "5.1.1",
"react-native": "^0.63.2",
"react-native-onesignal": "^4.0.4",

@hrishiakhade
Copy link

I downgraded iap package to "4.6.3" . It worked !!

@rgomezp
Copy link
Contributor

rgomezp commented Apr 27, 2021

Howdy! That's great news @hrishiakhade

Others, please open an issue with react-native-iap regarding the issue.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants