Android Error on camera getphoto: Error: Unable to create photo on disk

I am getting this error when I attempt getphoto() in an Android capacitor App. It works fine in iOS.

It is pretty simple code. The Camera Plugin gets the photo and then loads it as the myImage src and also saves the path to localstorage to save that image on the page when the page is reloaded. I also want it to be saved in the image gallery.
Permissions are set as described for the plugin.

Camera doesn’t open and I get the Unable to create photo on disk error

var image = document.getElementById("myImage").src;
  return Capacitor.Plugins.Camera.getPhoto({
    quality: 100, // 0-100
    source: 'CAMERA', // Prompt | Camera | Photos
    saveToGallery: true,
    allowEditing: true,
    resultType: 'uri'  //uri, DataUrl, Base64
  }).then(function(result) {
const scannedImages = result.webPath;
if (scannedImages) {
const scannedImage = document.getElementById('myImage');
if (scannedImage) {
scannedImage.src = Capacitor.convertFileSrc(scannedImages);}
localStorage.setItem("imageSrc", scannedImage.src);
}
}).catch((error)=>{console.log("Error on camera getphoto:",error)});

For localstorage:

const storedImageSrc = localStorage.getItem('imageSrc');
const scannedImage = document.getElementById('myImage');
scannedImage.src = "../img/scan-temp.jpg";
if (storedImageSrc) {
  if (scannedImage) {
    scannedImage.src = storedImageSrc;
  }

Any help would be appreciated

I am also having this issue, any idea on how to fix? I am not saving the photo to gallery, still the same message.

const image = await Camera.getPhoto({
 quality: 100,
 allowEditing: true,
 resultType: CameraResultType.DataUrl,
source: CameraSource.Camera,
saveToGallery: false,

});

that is my code.

Here is the solution: