Base64 encoding suddenly stopped working

In order to upload a captured video on a phone to the cloud I use the function below to convert it into a base64 string. This used to work just fine, but now has all of a sudden stopped working.

the encodefile function works without an error, but when i console.log the base64File it’s just empty, it used to return the correct base64 string…

Does anyone know why it stopped working one moment to the next? i havent changed/updated anything

        (data : MediaFile[]) => { 
            console.log(data[0].size + " bytes");
            let reader  = new FileReader();

            this.base64.encodeFile(data[0].fullPath).then((base64File: string) => {
              console.log(base64File + " is the base of " + data[0].fullPath );
              var commaIndex = base64File.indexOf(',');
              var baseobject = { base64: base64File.slice(commaIndex + 1)}
              this.parseSrv.uploadVideo(data[0].name, baseobject, 'data:image/*;charset=utf-8;base64');
            }, (err: Error) => {console.error(err)});
        (err: CaptureError) => console.error(err)