-
Notifications
You must be signed in to change notification settings - Fork 235
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
java.lang.IllegalStateException upon ending billing connection. #106
Comments
I think it looks expected. Try to wrap your |
The published app is using the following statement, as of now. I will wrap this statement within the try and catch block in my next update. Moreover, I didn't personally encountered this issue on any of my devices, so it will be hard for me to check if it still crashes after the change.
Again thanks for replying, I think the issue doesn't have any more depth into it so I will close it, will report you if I encounter the error again. |
Began getting the same issue after updating the library version to v2.
I'm not sure if it's related to a missing google play services, but the problem appears on many different devices: Samsungs, LG, Huawei, Motorolas. Seems like catching errors on the dart side doesn't help here. |
@xPutnikx have you tried the above step and when did you faced this error? Upon initiating connection or on ending connection. |
Could you guys try |
@dipinarora9 The problem is I can't reproduce it myself on any of my 5 phones. But i'm getting a about a hundreds crash reports daily. |
@hyochan The issue still there. One more thing from crashlitycs which might be helpful:
|
I checked how the callback |
I've updated this in |
Hey @hyochan We experience a similar issue in the app running in prod. I wasn't able to reproduce this issue on my own devices but observe hundreds of crash reports coming in google console. Stack trace looks almost identical to those posted above. Version of flutter_inapp_purchase : 2.0.4Problem faced on Android devices
Flutter doctor output:
|
Hey there @psipaylo !
Does your production app includes in snippet? |
Hey @dipinarora9 No, there isn't a listener for connection state in our app. And seems like that's the issue, right? On Android, this is crucial to wait for the connection to billing services being established? |
Yes, it is necessary. |
Thanks for the help. @dipinarora9 I am curious, do you think having the below statement on the very start of the app might be not enough?
We do initialize connection as part of the initial setup, and as far as I can say following the code of Android native part it should do the trick, shouldn't it? |
Why this issue closed, it still produce on ^2.0.4. I see huge of crashs on firebase dashboard. |
@uzumaki258 Have you ensured the |
@psipaylo This snippet only initialises the in-app purchase billing services. As you said the error that this issue concern was not faced by you but by your users. That's why the plugin recommends using connectionUpdated stream only to take an extra step while the app deals with billing services and allowing you to monitor the connection more thoroughly. |
Hey there @arkanmgerges !
Does your production app includes this snippet? And I suppose you are using the latest version of the flutter_inapp_purchase in your app? |
Hi @dipinarora9,
|
Hello again @arkanmgerges ,
In your case, just make the following changes and you will be good to go.
|
Hi @dipinarora9, Thank you, I've modified the code and now I pushed it into google play console for a new release, |
Version of flutter_inapp_purchase : 2.0.0+12
Problem faced on a Android device - Vivo 1818
Hi @hyochan once again!
Today, I got a crash report from my play console the stack trace is shown below.
My guess is that, this might have occured when the plugin called upon end connection of billing services.
Is this stacktrace of any help for making the plugin more stable.
Thanks in advance!
The text was updated successfully, but these errors were encountered: