Capacitor v4 Share multiple files not working in Android

Here is my code for sharing multiple files using the Capacitor Share plugin. It is working in iOS.

 async shareFiles(files: ShareFile[]) {

    try {

      let filesUri: string[] = [];

      for (let i = 0; i < files.length; i++) {

        const file = files[i];

        const uriResult = await Filesystem.writeFile({
          path: file.fileName,
          data: file.base64String,
          directory: Directory.Cache



      const shareResult = await Share.share({
        files: filesUri

    catch(error) {
        console.error('There has been a problem with your Share operation:', error);

Android Studio is throwing this error message when trying to share more than 1 files. Tested on Android 10 to 13.

E/DatabaseUtils: Writing exception to parcel
    java.lang.SecurityException: Permission Denial: reading androidx.core.content.FileProvider uri content://com.myapp.fileprovider/my_cache_images/photo-6065831.jpg from pid=8770, uid=1000 requires the provider be exported, or grantUriPermission()
        at android.content.ContentProvider.enforceReadPermissionInner(
        at android.content.ContentProvider$Transport.enforceReadPermission(
        at android.content.ContentProvider$Transport.enforceFilePermission(
        at android.content.ContentProvider$Transport.openTypedAssetFile(
        at android.content.ContentProviderNative.onTransact(
        at android.os.Binder.execTransactInternal(
        at android.os.Binder.execTransact(

I have this in block in AndroidManifest.xml.


Please advise.

:pill: Capacitor Doctor :pill:

Latest Dependencies:

@capacitor/cli: 4.7.3
@capacitor/core: 4.7.3
@capacitor/android: 4.7.3
@capacitor/ios: 4.7.3

Installed Dependencies:

@capacitor/core: 4.7.3
@capacitor/cli: 4.7.3
@capacitor/android: 4.7.3
@capacitor/ios: 4.7.3

Looks like a bug.
Can you create an issue and provide a sample app that reproduces it?