Ionic social-sharing not attaching file (Unable to attach file)

I have a text file saved on my android on location:

FilesystemDirectory.Documents/mydata/text2.txt

What I want to do is to share this file. I have tried to attached it to gmail and send it.

Here is the code:

import { Component } from '@angular/core';
import { File } from '@ionic-native/file/ngx';
import { SocialSharing } from '@ionic-native/social-sharing/ngx';
import { Plugins, FilesystemDirectory, FilesystemEncoding } from '@capacitor/core';

const { Filesystem } = Plugins;

@Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
})
export class HomePage {

  constructor(
    private file: File,
    private socialSharing: SocialSharing
  ) {}


  sharefile() {

    this.socialSharing.share(null, null, 'file://' + FilesystemDirectory.Documents + '/mydata/text2.txt', null).then(e => {
      // Success
      alert('File has been shared');
    }).catch(e =>{
      console.log('Share failed:', e);
      alert('file has not been shared: ' + e);
    });
  }

}

When I select gmail and send the email I get "File has been shared" ... but the file is not attached to the email.

But I'm getting a message: "Unable to attach file"

What I'm I doing wrong?