Permission Denied on cordova-plugin-file

Suddenly, doing fileentry moveto function creates a Permission Denied error. On the console it gives a status code of 1. I don’t have an issue accessing the temporary version of the file (in my case a picture) but when I try to move it to persistent storage it fails.

This is my config.xml:

<?xml version='1.0' encoding='utf-8'?>
<widget id="" version="1.1.230" xmlns="" xmlns:gap="" xmlns:mfp="">
    <name>app name</name>
    <description>app description</description>
    <content src="index.html" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="orientation" value="portrait" />
    <preference name="SplashScreen" value="none" />
    <preference name="android-minSdkVersion" value="29" />
    <preference name="android-targetSdkVersion" value="29" />
    <preference name="phonegap-version" value="cli-9.0.0" />
    <preference name="AndroidPersistentFileLocation" value="Compatibility" />
    <preference name="iosPersistentFileLocation" value="Compatibility" />
    <preference name="android-build-tool" value="gradle" />
	<preference name="AndroidLaunchMode" value="singleTop" />

    <access origin="*" />
	<access origin="cdvfile://*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
		<edit-config target="NSLocationAlwaysUsageDescription" file="*-Info.plist" mode="overwrite">
			<string>Allow the app to know your location</string>
		<edit-config target="NSLocationWhenInUseUsageDescription" file="*-Info.plist" mode="overwrite">
			<string>Allow the app to know your location</string>
		<edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="overwrite">
			<string>app uses the photos of the user's reptiles to save in records</string>
		<edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="overwrite">
			<string>appsaves the picture taken to local gallery and updates picture </string>
    <plugin name="cordova-plugin-whitelist" spec="1.3.4" />
    <plugin name="cordova-plugin-globalization" spec="~1.0.9" />
    <plugin name="cordova-plugin-network-information" spec="~1.2.1" />
    <plugin name="cordova-plugin-vibration" spec="~2.1.6" />
    <plugin name="cordova-launch-review" spec="^3.1.1" />
	<plugin name="cordova-plugin-file" source="npm" spec="~6.0.2" />
    <plugin name="cordova-plugin-camera" spec="~4.1.0" />
    <plugin name="phonegap-plugin-barcodescanner" spec="8.1.0" />
    <plugin name="cordova-plugin-inappbrowser" spec="^4.0.0" />

	<engine name="ios" spec="6.2.0" />
    <engine name="android" spec="9.0.0" />

A few questions:

  1. Did it work before? What’s different now?

  2. Android or iOS?

  3. Are there any other messages on the console?

My initial guess is a permissions issue, unrelated to VoltBuilder.

  1. It worked before, I updated the engines for both iOS and android.
  2. Both don’t work anymore.
  3. Looking into the app’s permissions it has access to media files but not all files. Which is what I suspect the issue is since I need to move the picture to persistent storage.

So I guess I just need to figure out how to allow for all files. Which is a config file thing right?

You might want to review the notes on the file plugin.