-
Notifications
You must be signed in to change notification settings - Fork 23
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
Download failed and unknown exception #9
Comments
No problem, I am happy to receive questions. Especially when the error description is so detailed. First, this is what the response should look like: I can't say exactly what is causing the app error in your case. But it shows me that I should improve the error handling significantly. Currently many errors are simply caught under "Unknown Exception". If you want to see the complete error, you can do it like this (and I also see that I did not document this correctly :D ). cordova.plugins.apkupdater.setObserver(
{
exception: function (message, stack) {
console.error(message, stack);
}
}
);
await cordova.plugins.apkupdater.check('https://raw.githubusercontent.com/kolbasa/cordova-plugin-apkupdater-demo/master/update'); Then you get the complete stack. And then I can probably say why the connection does not work. |
Wow, you are a gold mine for improvements 😃 The problem with the missing internet authorization is a good point. I will fix that quickly. On the subject of FTP, yes, that is currently not planned. The url will then look like this:
And then the installation problem. This is how it looks like on my end:
For me this is an indication that the JavaScript code has a syntax error. Can you tell me the android + cordova version. I can't reproduce it on my end. |
I have found another bug: #11 I post this here because you mentioned Android 5 above. I'm going to tackle all the little problems this weekend. |
This is with log function (just takes 3 params and console logs them).
Tried with On side note you could update readme to include the hint with password and email. It downloads it (will need to recheck where) but my guess is when it needs to unzip or install it to crash, maybe more permissions are needed? |
I found the problem and fixed it in version 1.2.2. This section overwrote my config changes: Here is an example to test the complete process with one copy and paste: cordova.plugins.apkupdater.setObserver(
{
downloadProgress: console.log,
exception: console.error
}
);
cordova.plugins.apkupdater.check(
'https://raw.githubusercontent.com/kolbasa/cordova-plugin-apkupdater-demo/master/update',
function () {
cordova.plugins.apkupdater.download(
function () {
cordova.plugins.apkupdater.install(console.log, console.error);
},
console.error
);
},
console.error
); It looks like this with Android 8: |
Hi. I couldn't find a solution to update the app for a long time. But I found your plugin. There were problems, but I found the solution on this page. Thank you to the author for the complete answers! I'll give you a star! |
Thank you. If problems arise, just let me know. |
Hi,
I have problem getting this plugin to work with my application.
Problem:
I get: "Unknown exception"
I get: "Download failed"
Without callback I get:
This is what I have on 10.100.100.60/b :
On network it doesn't show that it creates a request for the said file regardless of what I try to do.
I read previous issues (closed) and tried with no manifest at the end, tried with other function calls like download, etc. But since it doesn't have a link to pass it aside from check url, I resorted to simply asking.
Cordova 9.0.0 on Android.
The text was updated successfully, but these errors were encountered: