Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onSingleDownloadProgress is not a function #108

Open
jasonz1987 opened this issue Jun 27, 2016 · 3 comments
Open

onSingleDownloadProgress is not a function #108

jasonz1987 opened this issue Jun 27, 2016 · 3 comments

Comments

@jasonz1987
Copy link

error logs:

onSingleDownloadProgress is not a function. (In 'onSingleDownloadProgress(new ProgressEvent())', 'onSingleDownloadProgress' is undefined)

cordova:6.2.0
cordova-app-loader: 1.2.0
cordova-plugin-file 4.1.1
cordova-plugin-file-transfer 1.5.0

@lwk618
Copy link

lwk618 commented Jun 29, 2016

I have the same issue when using "autoupdate.js".
To fix it, modify the follow code in "autoupdate.js" file
from
loader.download()
to
loader.download(function(){})

@jasonz1987
Copy link
Author

jasonz1987 commented Jul 11, 2016

@lwk618 tks,but i used CordovaAppLoader.js with promise:

loader.download(onprogress)
     .then(function (manifest){
            loader.update();
      }, function (error) {
            $log.info(error);
      }
);

i tried to print onSingleDownloadProgress ,but it returned null.

so, i have to add this line in onDone function:

if(onSingleDownloadProgress) onSingleDownloadProgress(new ProgressEvent());

@zineer
Copy link

zineer commented Sep 1, 2016

I also came across this issue. There is a pull request which has a fix for it #110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants