-
-
Notifications
You must be signed in to change notification settings - Fork 655
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
Android crashes in many devices after release #315
Comments
Could you try our recent version |
I can't. Because it was an immediate situation. So, I changed the iap package. Now there are no crashes in +3k users. But, thank you. I will try it in my next project. |
Hi, can you reopen this issue? I have the same problem and I'm using version 2.3.21 java.lang.RuntimeException: this is my componentDidMount
|
@LinusU Could you help us out here? Why would |
Hmmm, what does |
@LinusU Thanks for your feedback. I've no idea currently. I've just saw issue line below. In
Do you have any further idea? |
@LinusU If you don't have any idea about this one, I'd consider rolling this back to where we were at previously. |
Okay, here is the problem: For some reason we are calling the callback more than once, should be easy to fix! |
@LinusU Looks great because you are in a track! Could you give us a |
Why is there a RuntimeException in that method?
is not something like this enough? |
@hyochan sorry, didn't get time to look at this yesterday, hopefully I can take a look soon @Ilario17 It's probably to flag that there is a logic error somewhere, to be fair, we shouldn't call that method multiple times edit: ah, the problem comes when |
@LinusU So do you mean |
If you want a quick and dirty solution, I would add a local variable to that function, A cleaner solution would simply be to deregister the listener after the first call altogether... |
|
I've just released |
@hyochan I will try this new version |
Please try 2.4.0-beta3 since beta2 had regression issue. |
@hyochan after the update the error is still there :( |
@Ilario17 What about |
I have some information relevant to this discussion. On 2.4.0-beta5, I am getting the following error
pointing to To reproduce: mount a react-native component that calls The variable I can confirm that I'm not getting Potential Fix: set |
@mitchellmcm27 Thanks for your catch. This is very promising and I agree with you. It was hard for me to fix the problem without any minimal reproduction. Also, I'd like to solve the problems together. Please give us any Best, regards. |
I've released 2.4.0-beta6 in the latest version of my app, with a few thousand upgrades so far. No crashes yet 👍 |
Sounds great. Thank you so much for the fix! I will close this issue for now then. |
I already have some crash with the same stacktrace but much less than before.
|
Also still getting same stacktrace on 2.4.0-beta6 |
I'm not sure that the recent changes didn't cause their own problems, e.g. if |
I would like to know which version started showing this error, so that I can roll back to a stable version. |
I too think the issue should be reopened. The original issue had to do with the callback, and the fixes for that surfaced the "null object reference" error. Although the latter may have been fixed (I agree with @LinusU that there may be more problems there), we are still dealing with the original issue. I've gotten a few crashes related to the callback in beta6 as well. |
I've reopened this. Hope someone can give |
Do you guys know when this was introduced? I'd be more than happy to roll back. |
I can confirm the crashes exist on beta6 as well as 2.3.23 on Android. Fairly easy to recreate per this [1] comment. Edit: Now that I'm at home, I'm debugging into the Android native code for beta6. In case this is helpful, this is what's going on (at least in my app, calling getAvailablePurchases):
I'll experiment with killing off the listener once it's no longer needed. [1] |
I've merged #379 and released to |
Is this fixed in the latest version? Is it safe to upgrade to latest? |
@hyochan this issue still appears in 3.0.0-rc-2 any idea?
|
@fokoz Could you try |
@hyochan If I use |
Version of react-native-iap
"react-native": "0.55.4"
"react-native-iap": "^2.3.2"
Platforms you faced the error (IOS or Android or both?)
Android
Expected behavior
Please help me, I need to fix this immediately. Because there are already +2k users
Actual behavior
App crashes because of rniap in many devices. In play console, I saw this error causes the crash :
java.lang.RuntimeException:
Tested environment (Emulator? Real Device?)
here is the report from play console :
https://ibb.co/gDxZQA
Steps to reproduce the behavior
I don't know what to do, I used rniap like in example.
in componentDidMount :
try {
const result = await RNIap.initConnection();
} catch (err) {
console.log(err);
}
in componentWillUnmount:
RNIap.endConnection();
The text was updated successfully, but these errors were encountered: