Closed melWiss closed 1 week ago
We are encountering the same exception in one of our applications.
Hi @melWiss, @khalilyamoun
Which camera_android
plugin version are you using? (Please find it in pubspec.lock
file).
Could you also share the entire crash stack trace if any? (to see if this is similar to a case at https://github.com/flutter/flutter/issues/88598)
for the camera plugin, it's camera_android: 0.10.8+16
for the stack trace, this is all what we have:
java.lang.IllegalStateException: Reply already submitted
at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:435)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error(MethodChannel.java:268)
at io.flutter.plugins.camera.DartMessenger.lambda$error$2(DartMessenger.java:198)
at io.flutter.plugins.camera.DartMessenger$$ExternalSyntheticLambda2.run
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:8893)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
Thanks for the update. Does this occur if you run your project in release mode? If it does, please share the entire crash stack trace that may help us investigate this further.
the problem is it didn't occur on our end, our users faced the exception and it was reported by sentry, what we can say is that after taking the picture the exception happens and i tried the fix mentioned here https://github.com/flutter/flutter/issues/88598 but with no luck
https://github.com/flutter/flutter/issues/88598 is still open and needs to investigate further. I would suggest you follow up on that issue. It would be helpful if you can find a pattern to reproduce it. Closing this in favor of https://github.com/flutter/flutter/issues/88598.
Steps to reproduce
Steps to reproduce isn't so clear, this exception is reported using Sentry and judging from the exception stack, it's coming from camera plugin and it's only happening on Samsung devices. It probably happens after using the camera.
It'll be nice if there's a way to catch native exception that is coming from plugins
Expected results
the exception should not happen and if it does there should be at least a way to catch native exceptions. or we can have this following suggestion
Actual results
the exception happens and it's crashing the app with no way to reproduce it
Code sample
Code sample
```dart [Paste your code here] ```Screenshots or Video
Screenshots / Video demonstration
[Upload media here]Logs
Logs
```console java.lang.IllegalStateException: Reply already submitted at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:435) at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error(MethodChannel.java:268) at io.flutter.plugins.camera.DartMessenger.lambda$error$2(DartMessenger.java:198) at io.flutter.plugins.camera.DartMessenger$$ExternalSyntheticLambda2.run at android.os.Handler.handleCallback(Handler.java:958) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:230) at android.os.Looper.loop(Looper.java:319) at android.app.ActivityThread.main(ActivityThread.java:8893) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103) ```Flutter Doctor output
Doctor output
```console Doctor summary (to see all details, run flutter doctor -v): [!] Flutter (Channel [user-branch], 3.13.8, on Microsoft Windows [Version 10.0.22631.3374], locale fr-FR) ! Flutter version 3.13.8 on channel [user-branch] at C:\Users\oussa\flutter Currently on an unknown channel. Run `flutter channel` to switch to an official channel. If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install. ! Upstream repository unknown source is not a standard remote. Set environment variable "FLUTTER_GIT_URL" to unknown source to dismiss this error. [✓] Windows Version (Installed version of Windows is version 10 or higher) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2) [✓] Chrome - develop for the web [✓] Visual Studio - develop Windows apps (Visual Studio Build Tools 2022 17.5.1) [✓] Android Studio (version 2022.1) [✓] VS Code (version 1.88.1) [✓] Connected device (3 available) [✓] Network resources ! Doctor found issues in 1 category. ```