-
Notifications
You must be signed in to change notification settings - Fork 889
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
download
method failing on cordova / android platform with java.lang.NullPointerException
exception
#374
Comments
download
method failing on cordova / android platform with java.lang.NullPointerException
error.download
method failing on cordova / android platform with java.lang.NullPointerException
exception
@the-other-sunny, Hello, did you find any solution? |
the xhr approach ^^ |
@the-other-sunny can you explain it a bit more, may be with some code. I am facing the same issue |
Hello,
did someone find a solution ? I'm on cordova-android 12 Regards |
@anubhavs19 @lchanouha |
Hi, the following code is not working on Android..
err is:
the problem is the target path. With https:// fails this code in Cordova-Plugin-File
and file=NULL leads to java.lang.NullPointerException Quickfix: fileEntry.toNativeURL() also returns: fileEntry.nativeUrl is "file:///data/user/0/de.fuf.corodva-app/files/files/cordova_bot.png" Workaround: Code with workaround:
|
Hi !
I'm currently unable to make the plugin work properly.
FileTransfer.download
is failing with an error code 3 (FileTransferError.CONNECTION_ERR
) and an exceptionjava.lang.NullPointerException
.Minimal example
Add this child to the
widget
element inconfig.xml
.Add a call to the
demo
function below from withinonDeviceReady
.Run the app on the Android Studio
emulator
and attach Chrome DevTools .The output should be something like:
Workaround
Using web APIs.
Replacing
ft_approach
with thexhr_approach
function below works, although not idea for large files.Note: Update CSP accordingly
Versions
The text was updated successfully, but these errors were encountered: