-
Notifications
You must be signed in to change notification settings - Fork 19
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
issue java.lang.IllegalStateException: Reply already submitted #39
Comments
@Renatinaveen how were you able to solve this ? |
@mishrabhilash i was calling getapps with upi and get subscription amount methods in the init state. Now I moved the get subscription method inside getapps with upi call issue didn't appear. |
java.lang.IllegalStateException: This is happening in a different scenario. We have around 160+ users who are affected in Production |
A common cause could be |
@mishrabhilash I load the UPI apps first and then the payment options like wallet and other users are clicking on the available apps while the payment options are still loading could that be the issue? I mean calling the Razorpay method again when one call is already happening might be causing this crash? |
Razorpay plugins provides the following methods
As per our UI, we call both the methods simultaneously.
|
@mrinaljain Unable to reproduce this issue. Can I get a code snippet where you're seeing this happen? |
Hi @vivekshindhe
Crash is happening on random on opening Subscription Screen We are calling
We are calling these method as well for getting logo as well on Checkout Page to show UI
|
@imofidul do you have any logs for the crash? Does it happen every run? |
Hi @vivekshindhe Log is already share by @mrinaljain .I happens randomly |
@imofidul from what I see, the issue is intermittent and you have a service written that wraps Razorpay's functions.
This way we reduce the chance of pendingResult clashing when using the same methodCall and by point reduce the intermittent crashes. |
@vivekshindhe thanks for the update.We will be waiting for permanent solution for this .we are calling like this
But You are suggesting like this
I guess technically both are same .Moreover we are passing paymentMethods ,upiApps as routeArgs to someother screen so using your suggested approach would be more error prone. |
@imofidul the problem here is while the await part waits, it's not letting flutter clear the pendingResult value that is created in the plugin for the first call which gets reused and hence the error Reply already submitted. My suggestion to use it this way was to give flutter enough time to clear the data from the previous call to go forward with the next one. From the code snippet you shared, I can see that it's setting up to different variables. I'm not sure how you are waiting for these values to be set before routing them, but the same logic can be reused here as well. |
Sure will try this |
Facing this issue and app is crashing because of this
The text was updated successfully, but these errors were encountered: