Giter Club home page Giter Club logo

await controller.stopVideoRecording().then((XFile? file) in Unhandled Exception: CameraException(INVALID_PATH, The platform "TargetPlatform.android" did not return a path while reporting success. The platform should always return a valid path or report an error.) about flutter HOT 8 OPEN

krupalieBizTrait avatar krupalieBizTrait commented on June 7, 2024
await controller.stopVideoRecording().then((XFile? file) in Unhandled Exception: CameraException(INVALID_PATH, The platform "TargetPlatform.android" did not return a path while reporting success. The platform should always return a valid path or report an error.)

from flutter.

Comments (8)

darshankawar avatar darshankawar commented on June 7, 2024

@krupalieBizTrait Please provide complete minimal reproducible code sample that triggers the reported error.

from flutter.

krupalieBizTrait avatar krupalieBizTrait commented on June 7, 2024

Future _stopVideoRecording() async {
if (!controller.value.isRecordingVideo) {
return null;
}
try {
XFile video = await controller.stopVideoRecording();
CommonMethod().getXSnackBar("stopvideo", Colors.green);
if (video.path != "") {
isRecording.value = false;
_timer!.cancel();
}
} on CameraException catch (e) {
CommonMethod().getXSnackBar("catch..${e}", Colors.redAccent);
MyPrint(tag: "catch", value: e.toString());
}

Always getting catch exception in my above device in android

from flutter.

darshankawar avatar darshankawar commented on June 7, 2024

Above isn't a complete code as it contains custom implementation which we can't directly use. Please provide us complete reproducible code sample (ex: main.dart) that we can simply copy paste and run to verify further.

from flutter.

krupalieBizTrait avatar krupalieBizTrait commented on June 7, 2024

from flutter.

krupalieBizTrait avatar krupalieBizTrait commented on June 7, 2024

from flutter.

darshankawar avatar darshankawar commented on June 7, 2024

@krupalieBizTrait I used the code you shared above, ran on S10 (Android 12) using latest stable version and was able to record video using front and back camera properly without seeing the reported exception. Are there any specific steps to replicate the error ?

from flutter.

krupalieBizTrait avatar krupalieBizTrait commented on June 7, 2024

from flutter.

darshankawar avatar darshankawar commented on June 7, 2024

@krupalieBizTrait
I see that you are using community package like get in your code implementation. Can you narrow down your use case with only camera implementation and remove other third party code and check if you still get same exception or not. If yes, please update code sample.

from flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.