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

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.) #148123

Open
krupalieBizTrait opened this issue May 10, 2024 · 8 comments
Labels
in triage Presently being triaged by the triage team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds

Comments

@krupalieBizTrait
Copy link

Steps to reproduce

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.)

in my device info
Product name: Galaxy S20 Ultra 5G
Model Name SM-G988B/DS
One UI Version : 5.1
Android Version: 13
Current version: G988BXXSJHXC1 / G988BOXMJHXC1/ G988BXXSJHXC1

Expected results

Issue resolved in my device

Actual results

Issue resolved in my device

Code sample

Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output ✓] Flutter (Channel stable, 3.16.5, on macOS 14.3.1 23D60 darwin-x64, locale en-IN) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.2)
@krupalieBizTrait krupalieBizTrait changed the title 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.) 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.) May 10, 2024
@darshankawar darshankawar added the in triage Presently being triaged by the triage team label May 10, 2024
@darshankawar
Copy link
Member

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

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 10, 2024
@krupalieBizTrait
Copy link
Author

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

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 10, 2024
@darshankawar
Copy link
Member

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.

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 13, 2024
@krupalieBizTrait
Copy link
Author

krupalieBizTrait commented May 13, 2024 via email

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 13, 2024
@krupalieBizTrait
Copy link
Author

krupalieBizTrait commented May 13, 2024 via email

@darshankawar
Copy link
Member

@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 ?

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 14, 2024
@krupalieBizTrait
Copy link
Author

krupalieBizTrait commented May 14, 2024 via email

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 14, 2024
@darshankawar
Copy link
Member

@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.

@darshankawar darshankawar added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in triage Presently being triaged by the triage team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds
Projects
None yet
Development

No branches or pull requests

2 participants