# Permission Denial Error on social share

**URL:** <https://forum.ionicframework.com/t/permission-denial-error-on-social-share/197702>\
**Category:** Ionic Framework\
**Created:** [October 10, 2020, 8:26pm UTC](https://forum.ionicframework.com/t/permission-denial-error-on-social-share/197702 "2020-10-10T20:26:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arbaaz](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@arbaaz](https://forum.ionicframework.com/u/arbaaz)\
**Post date:** [October 10, 2020, 8:26pm UTC](https://forum.ionicframework.com/t/permission-denial-error-on-social-share/197702/1 "2020-10-10T20:26:26Z")

</div>

I am using this [plugin](https://github.com/moberwasserlechner/capacitor-filesharer) for social share.  
I am am able to share file via whatsapp and email etc. But the problem is as soon as I click share, even though the in-app pop up to share opens up the app throws an error in the console :

```auto
E/DatabaseUtils: Writing exception to parcel
    java.lang.SecurityException: Permission Denial: reading com.byteowls.capacitor.filesharer.FileSharerProvider uri content://io.ionic.starter.filesharer.fileprovider/capfilesharer/test2.jpg from pid=14504, uid=1000 requires the provider be exported, or grantUriPermission()
        at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:820)
        at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:684)
        at android.content.ContentProvider$Transport.enforceFilePermission(ContentProvider.java:674)
        at android.content.ContentProvider$Transport.openTypedAssetFile(ContentProvider.java:548)
        at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:327)
        at android.os.Binder.execTransactInternal(Binder.java:1154)
        at android.os.Binder.execTransact(Binder.java:1123)

```

Invocation:

```auto
this.toDataUrl(self.meme.imgUrl, function(myBase64) {

      console.log(myBase64.split(',')[1]); // myBase64 is the base64 string

      let imageBase = myBase64.split(',')[1] ;

       Plugins.FileSharer.share({

          filename: "test2.jpg",

          text:"www.abc.com",

          base64Data: imageBase ,

          contentType: "image/jpeg",

      }).then(() => {

          //empty
      }).catch(error => {

          console.error("File sharing failed", error.message);

      });

    });

```
