react-native-image-crop-picker icon indicating copy to clipboard operation
react-native-image-crop-picker copied to clipboard

[Android: E_NO_IMAGE_DATA_FOUND] openCropper has an error and I can't crop the image

Open hukuryo opened this issue 1 month ago • 4 comments

Overview

I want to crop an image using openCropper, but I encounter the following error:

[Error: file]

E_NO_IMAGE_DATA_FOUND

The error only occurs on Android devices with the latest security patches applied.

Affected Device

The error only occurs on the following device:

  • Android Pixel 8a
  • Version 16
  • Latest security patches applied

This error does not occur on iOS.

Source

 try {
    console.log("path", photo.path);
    const croppedImage = await ImageCropPicker.openCropper({
      path: photo.path,
      width: image.width,
      height: image.height,
      cropping: true,
      mediaType: "photo",
      cropperCircleOverlay: false,
      freeStyleCropEnabled: false,
      includeBase64: false,
      includeExif: false,
      cropperRotateButtonsHidden: true,
      cropperChooseText: "OK",
      cropperCancelText: "CANCEL",
      cropperToolbarTitle: "CROP",
      hideBottomControls: true,
      showCropGuidelines: false,
      cropperChooseColor: "#ffffff",
      cropperCancelColor: "007AFF",
    });
    setImage({
      uri: croppedImage.path,
      width: croppedImage.width,
      height: croppedImage.height,
      fileName: image.fileName,
      type: "image",
    });
  } catch (error) {
    console.log("=== エラー詳細 ===");
    console.log("error:", error);
    console.log("error.message:", (error as any).message);
    console.log("error.code:", (error as any).code);
    console.log("typeof error:", typeof JSON.stringify(error));
    console.log("JSON:", JSON.stringify(error));
  }

The image is in jpeg format

hukuryo avatar Oct 22 '25 22:10 hukuryo