You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
E/MethodChannel#plugins.flutter.io/camera_android(18473): java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Surface android.media.MediaRecorder.getSurface()' on a null object reference
E/MethodChannel#plugins.flutter.io/camera_android(18473): at io.flutter.plugins.camera.Camera.startCapture(Camera.java:535)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at io.flutter.plugins.camera.Camera.startVideoRecording(Camera.java:764)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at io.flutter.plugins.camera.MethodCallHandlerImpl.onMethodCall(MethodCallHandlerImpl.java:122)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:258)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at android.os.Handler.handleCallback(Handler.java:942)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at android.os.Handler.dispatchMessage(Handler.java:99)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at android.os.Looper.loopOnce(Looper.java:226)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at android.os.Looper.loop(Looper.java:313)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at android.app.ActivityThread.main(ActivityThread.java:8757)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
E/flutter (18473): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: CameraException(videoRecordingFailed, prepare failed:-12)
E/flutter (18473): #0 handleErrorWithHandler
methods.dart:28
E/flutter (18473): #1 CameraPickerState.startRecordingVideo
camera_picker_state.dart:701
E/flutter (18473):
E/flutter (18473):
E/DartMessenger(18473): Uncaught exception in binary message listener
E/DartMessenger(18473): java.lang.IllegalStateException: Reply already submitted
E/DartMessenger(18473): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:435)
E/DartMessenger(18473): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:278)
E/DartMessenger(18473): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
E/DartMessenger(18473): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322)
E/DartMessenger(18473): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/DartMessenger(18473): at android.os.Handler.handleCallback(Handler.java:942)
E/DartMessenger(18473): at android.os.Handler.dispatchMessage(Handler.java:99)
E/DartMessenger(18473): at android.os.Looper.loopOnce(Looper.java:226)
E/DartMessenger(18473): at android.os.Looper.loop(Looper.java:313)
E/DartMessenger(18473): at android.app.ActivityThread.main(ActivityThread.java:8757)
E/DartMessenger(18473): at java.lang.reflect.Method.invoke(Native Method)
E/DartMessenger(18473): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
E/DartMessenger(18473): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
I/ViewRootImpl@dc47214MainActivity: ViewPostIme pointer 1
I/MediaRecorderJNI(18473): finalize
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, 3.10.5, on macOS 13.4.1 22F82 darwin-x64, locale en-EG)
! Warning: dart on your path resolves to /usr/local/Cellar/dart/2.18.4/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/hesham/flutter. Consider adding /Users/hesham/flutter/bin to the front of your path.
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.79.2)
[✓] Connected device (2 available)
[✓] Network resources
The text was updated successfully, but these errors were encountered:
I had the same issue, it seems to be caused by a problem with the camera package, I upgraded the camera_android package and then this plugin works fine on Android 13 devices.
Hi ,
I'm using latest version 3.8.0
E/MethodChannel#plugins.flutter.io/camera_android(18473): java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.Surface android.media.MediaRecorder.getSurface()' on a null object reference
E/MethodChannel#plugins.flutter.io/camera_android(18473): at io.flutter.plugins.camera.Camera.startCapture(Camera.java:535)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at io.flutter.plugins.camera.Camera.startVideoRecording(Camera.java:764)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at io.flutter.plugins.camera.MethodCallHandlerImpl.onMethodCall(MethodCallHandlerImpl.java:122)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:258)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at android.os.Handler.handleCallback(Handler.java:942)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at android.os.Handler.dispatchMessage(Handler.java:99)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at android.os.Looper.loopOnce(Looper.java:226)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at android.os.Looper.loop(Looper.java:313)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at android.app.ActivityThread.main(ActivityThread.java:8757)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
E/MethodChannel#plugins.flutter.io/camera_android(18473): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
E/flutter (18473): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: CameraException(videoRecordingFailed, prepare failed:-12)
E/flutter (18473): #0 handleErrorWithHandler
methods.dart:28
E/flutter (18473): #1 CameraPickerState.startRecordingVideo
camera_picker_state.dart:701
E/flutter (18473):
E/flutter (18473):
E/DartMessenger(18473): Uncaught exception in binary message listener
E/DartMessenger(18473): java.lang.IllegalStateException: Reply already submitted
E/DartMessenger(18473): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:435)
E/DartMessenger(18473): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:278)
E/DartMessenger(18473): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
E/DartMessenger(18473): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:322)
E/DartMessenger(18473): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/DartMessenger(18473): at android.os.Handler.handleCallback(Handler.java:942)
E/DartMessenger(18473): at android.os.Handler.dispatchMessage(Handler.java:99)
E/DartMessenger(18473): at android.os.Looper.loopOnce(Looper.java:226)
E/DartMessenger(18473): at android.os.Looper.loop(Looper.java:313)
E/DartMessenger(18473): at android.app.ActivityThread.main(ActivityThread.java:8757)
E/DartMessenger(18473): at java.lang.reflect.Method.invoke(Native Method)
E/DartMessenger(18473): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
E/DartMessenger(18473): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
I/ViewRootImpl@dc47214MainActivity: ViewPostIme pointer 1
I/MediaRecorderJNI(18473): finalize
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, 3.10.5, on macOS 13.4.1 22F82 darwin-x64, locale en-EG)
! Warning:
dart
on your path resolves to /usr/local/Cellar/dart/2.18.4/libexec/bin/dart, which is not inside your current Flutter SDK checkout at /Users/hesham/flutter. Consider adding /Users/hesham/flutter/bin to the front of your path.[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.79.2)
[✓] Connected device (2 available)
[✓] Network resources
The text was updated successfully, but these errors were encountered: