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

IllegalStateException: Reply already submitted" error #72

Closed
bvedam opened this issue Jan 4, 2019 · 4 comments
Closed

IllegalStateException: Reply already submitted" error #72

bvedam opened this issue Jan 4, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@bvedam
Copy link

bvedam commented Jan 4, 2019

Hi - I have an app, where I retrieve events for a given date. It works for all days except the current date. You can see in the below logs, it works for Jan 5 and Jan 3, but for Jan 4 I get the "IllegalStateException: Reply already submitted" error. I tried messing with the dates, and it appears like the issue occurs when the date overlaps with current date, and retrieveEvents is called. Could you please shed some light on what's going on. Thanks.

Flutter version: 1.0.0+1
device_calendar: ^0.0.7
Device: Android 7.0 (API 27)

Stacktrace:
D/ViewRootImpl@7f9cfc6MainActivity: ViewPostImeInputStage processPointer 1
I/flutter (18333): Sat, Jan 5, 2019
I/flutter (18333): startDate: 2019-01-05 00:00:00.000, endDate: 2019-01-06 00:00:00.000

D/ViewRootImpl@7f9cfc6MainActivity: ViewPostImeInputStage processPointer 0
D/ViewRootImpl@7f9cfc6MainActivity: ViewPostImeInputStage processPointer 1
I/flutter (18333): Fri, Jan 4, 2019
I/flutter (18333): startDate: 2019-01-04 00:00:00.000, endDate: 2019-01-05 00:00:00.000
I/System.out(18333): title must not be null
E/MethodChannel#plugins.builttoroam.com/device_calendar(18333): Failed to handle method call
E/MethodChannel#plugins.builttoroam.com/device_calendar(18333): java.lang.IllegalStateException: Reply already submitted

E/MethodChannel#plugins.builttoroam.com/device_calendar(18333): at io.flutter.view.FlutterNativeView$1.reply(FlutterNativeView.java:174)
E/MethodChannel#plugins.builttoroam.com/device_calendar(18333): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:203)
E/MethodChannel#plugins.builttoroam.com/device_calendar(18333): at com.builttoroam.devicecalendar.CalendarDelegate.finishWithSuccess(CalendarDelegate.kt:571)
E/MethodChannel#plugins.builttoroam.com/device_calendar(18333): at com.builttoroam.devicecalendar.CalendarDelegate.retrieveEvents(CalendarDelegate.kt:305)
E/MethodChannel#plugins.builttoroam.com/device_calendar(18333): at com.builttoroam.devicecalendar.DeviceCalendarPlugin.onMethodCall(DeviceCalendarPlugin.kt:82)
E/MethodChannel#plugins.builttoroam.com/device_calendar(18333): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:200)
E/MethodChannel#plugins.builttoroam.com/device_calendar(18333): at io.flutter.view.FlutterNativeView.handlePlatformMessage(FlutterNativeView.java:163)
E/MethodChannel#plugins.builttoroam.com/device_calendar(18333): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#plugins.builttoroam.com/device_calendar(18333): at android.os.MessageQueue.next(MessageQueue.java:323)
E/MethodChannel#plugins.builttoroam.com/device_calendar(18333): at android.os.Looper.loop(Looper.java:136)
E/MethodChannel#plugins.builttoroam.com/device_calendar(18333): at android.app.ActivityThread.main(ActivityThread.java:6780)
E/MethodChannel#plugins.builttoroam.com/device_calendar(18333): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#plugins.builttoroam.com/device_calendar(18333): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1500)
E/MethodChannel#plugins.builttoroam.com/device_calendar(18333): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1390)
E/FlutterNativeView(18333): Uncaught exception in binary message listener
E/FlutterNativeView(18333): java.lang.IllegalStateException: Reply already submitted
E/FlutterNativeView(18333): at io.flutter.view.FlutterNativeView$1.reply(FlutterNativeView.java:174)
E/FlutterNativeView(18333): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:218)
E/FlutterNativeView(18333): at io.flutter.view.FlutterNativeView.handlePlatformMessage(FlutterNativeView.java:163)
E/FlutterNativeView(18333): at android.os.MessageQueue.nativePollOnce(Native Method)
E/FlutterNativeView(18333): at android.os.MessageQueue.next(MessageQueue.java:323)
E/FlutterNativeView(18333): at android.os.Looper.loop(Looper.java:136)
E/FlutterNativeView(18333): at android.app.ActivityThread.main(ActivityThread.java:6780)
E/FlutterNativeView(18333): at java.lang.reflect.Method.invoke(Native Method)
E/FlutterNativeView(18333): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1500)
E/FlutterNativeView(18333): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1390)
I/flutter (18333): PlatformException(500, title must not be null, null)
Reloaded 1 of 429 libraries in 1,227ms.
D/ViewRootImpl@7f9cfc6MainActivity: ViewPostImeInputStage processPointer 0
D/ViewRootImpl@7f9cfc6MainActivity: ViewPostImeInputStage processPointer 1
I/flutter (18333): Thu, Jan 3, 2019
I/flutter (18333): startDate: 2019-01-03 00:00:00.000, endDate: 2019-01-04 00:00:00.000

@bvedam
Copy link
Author

bvedam commented Jan 5, 2019

Resolved the issue. It was a data problem. I had created an event with no title for test purpose that was causing this exception. I did look at the "title must not be null" error but the IllegalStateException took me in a different direction. Closing the issue

@bvedam bvedam closed this as completed Jan 5, 2019
@bvedam
Copy link
Author

bvedam commented Jan 5, 2019

Though the root cause for the failure is data, I still think the call should succeed containing the event item with null title, rather than totally failing. Agree?

@bvedam bvedam reopened this Jan 5, 2019
@MaikuB
Copy link
Contributor

MaikuB commented Jul 5, 2019

Agreed, could you consider submitting a PR?

@MaikuB MaikuB closed this as completed Jul 5, 2019
@MaikuB MaikuB reopened this Jul 5, 2019
@MaikuB MaikuB added the enhancement New feature or request label Jul 5, 2019
@nickrandolph nickrandolph added bug Something isn't working and removed enhancement New feature or request labels Aug 4, 2019
@MaikuB
Copy link
Contributor

MaikuB commented Aug 28, 2019

This should be resolved in the latest release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants