Ionic 2 showing error code 1

 let fileTransfer = new Transfer();", cordova.file.externalDataDirectory + ActualFileName).then((entry) => {

        this.showToast("Download Completed");

      }, (error) => {

        const alertFailure = this.alertCtrl.create({
          title: `Download Failed!`,
          subTitle: `${file} was not successfully downloaded. Error code: ${error.code}`,
          buttons: ['Ok']




Above is my code. after downloading server send file with actual file name. I tested it on android it showing error code 1.
Anybody knows the solution.

Error code 1 means that it couldn’t find the file:

1 Like

The docs tell you how to use the Transfer plugin. It does not include instantiating Transfer objects with new.

Is he using Ionic Native? Maybe he is just winging it with the plugin directly. ALthough, then he should probably switch to Ionic Native!

Thanks… It worked
Forgot to encode Url

how to do it.
can you help me

var uri = encodeURI(myUrl);
    let ft = new Transfer();
    var file =, location);

Use this code.