-
Notifications
You must be signed in to change notification settings - Fork 169
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
Fatal Exception: java.lang.IllegalStateException Reply already submitted #245
Comments
I have never seen this issue before. I read a bit about it and looks like it's happening to more plugins. I made sure that we are not calling |
@vegaro Unfortunately, we're not able to reproduce it on our end. 80% of affected devices are Huawei, 19% Samsung and <1% Motorola. What is interesting that the crash occurs 91% when the app is in a background state. |
Hey @kestasb, I'm continuing to look into this issue...it's a tricky one to diagnose. Can you confirm to me how/where you are calling |
|
@beylmk We're calling
The next time we call
|
@beylmk Thanks! No, we're not working on the same app. |
Hey @kestasb, just an update -- I tried to reproduce this in a few different ways yesterday, with no success. This is definitely happening in other plugins, but it's really hard to tell whether it's a Flutter bug or an issue with our logic. For both you and @JCKodel. any other information you could provide would be great...such as:
|
I don't know. The SDK is updated to the last version (the error was not happening before).
I don't know. Those errors are from Crashlytics. I don't know when they appear.
I don't know. I don't have Crashlytics enabled for iOS. |
@JCKodel @kestasb Just an update -- we've only been able to reproduce this once. We believe it's a scenario wherein Google's BillingClient times out, calls the listener, then retries and calls it again. Both getOfferings and restorePurchases, the methods in the stacktraces from your crashes, call into BillingClient. We are looking into ways to verify this now.. |
@beylmk Glad to hear that you were able to reproduce the issue!
What we see in Crashlytics logs, the issue occurs with
We checked Crashlytics for iOS app and didn't find any similar issue. |
Hi @kestasb, it looks like we've managed to figure out what the issue is. Apparently Google is calling the callback to fetch the products twice. Looks like they retry when there's an error connecting to the Play Store which ends up calling the callback a second time. We are going to report it to Google and also patch it so there's only one callback triggered and this exception doesn't occur. We'll report back. |
We reported to Google https://issuetracker.google.com/issues/201628456 It looks like there's another report for the same issue here https://issuetracker.google.com/issues/189727982 |
@JCKodel @kestasb just pushed a release with the fix! Check out 3.4.6 If you're curious, here's the PR for the fix in our Android repo. |
@beylmk Thank you, it seems that the problem is fixed! |
@kestasb that's great news! I'll go ahead and close out the ticket for now. Let me know if you run into any other issues, and thanks for following up! |
I'm getting this issue again. Android only. |
I am also getting this issue again on Android Emulator Pixel XL API 33. It occurs only on first start after install the app. D/AndroidRuntime(30441): Shutting down VM |
We're using
purchases_flutter: ^3.4.5
in our app and receive the following crash reports from Android users:Any ideas what could cause this crash?
The text was updated successfully, but these errors were encountered: