NativeScript / nativescript-background-http

Background Upload plugin for the NativeScript framework
Apache License 2.0
102 stars 50 forks source link

File Not found Error #94

Closed Sharique-Hasan closed 6 years ago

Sharique-Hasan commented 6 years ago

On Nexus 6 with Android 7.1.1, plugin gives out an error of file not found. Where as on other devices it works fine.

Sample project: https://github.com/mrazahasan/imagePicker

lini commented 6 years ago

Hi,

Do you still experience the issue? I tried to reproduce it using the sample project but saw no errors. If possible, give us more detailed steps on how to trigger the error.

Device: Nexus 6 with Android 7.1.1 NativeScript: 3.4.1

I cloned the repo, ran "npm i", "tns run android" and then proceeded to try all three options: open camera, open image picker and open video picker. I saw no "file not found" error in the console and the three files uploaded successfully. Here is the console log:

JS: [{"name":"NSIMG_20180115_14332.jpg","filename":"/storage/emulated/0/DCIM/Camera/NSIMG_20180115_14332.jpg","mimeType":"image/jpg"}]
JS: Upload: 0.01789722899760177
JS: Upload: 35.20528121660249
JS: Upload: 96.36430576648718
JS: /storage/emulated/0/DCIM/Camera/NSIMG_20180115_14332.jpg
JS: [{"name":"NSIMG_20180115_14332.jpg","filename":"/storage/emulated/0/DCIM/Camera/NSIMG_20180115_14332.jpg","mimeType":"image/jpg"}]
JS: Upload: 0.01789722899760177
JS: Upload: 35.20528121660249
JS: Upload: 95.52651090963946
JS: Upload: 100
JS: complete
JS: Upload: 100
JS: complete
JS: /storage/emulated/0/DCIM/Camera/VID_20180115_143406.mp4
JS: [{"name":"VID_20180115_143406.mp4","filename":"/storage/emulated/0/DCIM/Camera/VID_20180115_143406.mp4","mimeType":"video/mp4"}]
JS: Upload: 0.0026452247500683094
JS: Upload: 5.263492672192281
JS: Upload: 14.40734656893708
JS: Upload: 23.175425648007437
JS: Upload: 30.440405456380017
JS: Upload: 38.83270971777593
JS: Upload: 47.09975570661369
JS: Upload: 55.61731824056775
JS: Upload: 64.1348807745218
JS: Upload: 71.39986058289438
JS: Upload: 79.04061520894142
JS: Upload: 87.55817774289547
JS: Upload: 95.57470718661693
JS: Upload: 100
JS: complete
Sharique-Hasan commented 6 years ago

Yes it is still reproducing at my end. I ll confirm the more detailed steps to reproduce it.

On Jan 15, 2018 5:41 PM, "Stoyan Stratev" notifications@github.com wrote:

Hi,

Do you still experience the issue? I tried to reproduce it using the sample project but saw no errors. If possible, give us more detailed steps on how to trigger the error.

Device: Nexus 6 with Android 7.1.1 NativeScript: 3.4.1

I cloned the repo, ran "npm i", "tns run android" and then proceeded to try all three options: open camera, open image picker and open video picker. I saw no "file not found" error in the console and the three files uploaded successfully. Here is the console log:

JS: [{"name":"NSIMG_20180115_14332.jpg","filename":"/storage/emulated/0/DCIM/Camera/NSIMG_20180115_14332.jpg","mimeType":"image/jpg"}] JS: Upload: 0.01789722899760177 JS: Upload: 35.20528121660249 JS: Upload: 96.36430576648718 JS: /storage/emulated/0/DCIM/Camera/NSIMG_20180115_14332.jpg JS: [{"name":"NSIMG_20180115_14332.jpg","filename":"/storage/emulated/0/DCIM/Camera/NSIMG_20180115_14332.jpg","mimeType":"image/jpg"}] JS: Upload: 0.01789722899760177 JS: Upload: 35.20528121660249 JS: Upload: 95.52651090963946 JS: Upload: 100 JS: complete JS: Upload: 100 JS: complete JS: /storage/emulated/0/DCIM/Camera/VID_20180115_143406.mp4 JS: [{"name":"VID_20180115_143406.mp4","filename":"/storage/emulated/0/DCIM/Camera/VID_20180115_143406.mp4","mimeType":"video/mp4"}] JS: Upload: 0.0026452247500683094 JS: Upload: 5.263492672192281 JS: Upload: 14.40734656893708 JS: Upload: 23.175425648007437 JS: Upload: 30.440405456380017 JS: Upload: 38.83270971777593 JS: Upload: 47.09975570661369 JS: Upload: 55.61731824056775 JS: Upload: 64.1348807745218 JS: Upload: 71.39986058289438 JS: Upload: 79.04061520894142 JS: Upload: 87.55817774289547 JS: Upload: 95.57470718661693 JS: Upload: 100 JS: complete

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NativeScript/nativescript-background-http/issues/94#issuecomment-357672253, or mute the thread https://github.com/notifications/unsubscribe-auth/ACYjwUM7argtjBrETzPxqAa6E10q6O1aks5tK0digaJpZM4RYMqB .

Sharique-Hasan commented 6 years ago

Looks like it is not an issue with browsed file. This was an issue with nativescript-videorecorder. This plugin was not creating the file on Nexus6 therefore nativescript-background-http was unable to find the file. Closing the issue now.