triniwiz / nativescript-downloader

Apache License 2.0
32 stars 18 forks source link

JS ERROR TypeError: null is not an object (evaluating 'owner.downloadsData') in downloader.js:60 #4

Closed AdamDenoon closed 6 years ago

AdamDenoon commented 6 years ago

Which platform(s) does your issue occur on?

Please, provide the following version numbers that your issue occurs with:

Please, tell us how to recreate the issue in as much detail as possible.

Use sample code provided

Is there any code involved?

var downloader = new Downloader();
var videoDownloaderId = downloader.createDownload({
    url:
      video_url,
    path:
      filePath
  });

  downloader
    .start(videoDownloaderId, progressData => {
      console.log(`Progress : ${progressData.value}%`);
    })
    .then(completed => {
      console.log(`Video : ${completed.path}`);
    })
    .catch(error => {
      console.log(error.message);
    });
triniwiz commented 6 years ago

Should be fixed in the latest version

FranciZ commented 6 years ago

@triniwiz I get this issue on iOS with version 1.1.0. It doesn't always happen so I'm guessing there's a race condition somewhere?

The error is: null is not an object (evaluating 'owner.downloadsData')