Android Question http download error

donnyy

Member
Licensed User
Longtime User
I am trying to download some data from a php script, but i get a java error, looks like it's looking for a directory on my device but couldn't find it. Just wondering what i did wrong. Here is the error message (i am running this on a Samsung Tab A):


JobName = OrderJob, Success = truestring=Array{"orderid":"10","orderdate":"2017-04-09 17:14:32","custname":"Coast Plaza","address":"1316 - 36 street NE","client_addr":"30 evnasmeade close nw","comment":"test 3","status":"1"}
mainmenu_jobdone (java line: 559)
java.io.FileNotFoundException: /data/user/0/com.dispatch.dyc/cache/2: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:452)
at java.io.FileInputStream.<init>(FileInputStream.java:76)
at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:209)
at anywheresoftware.b4a.samples.httputils2.httpjob._getstring2(httpjob.java:185)
at anywheresoftware.b4a.samples.httputils2.httpjob._getstring(httpjob.java:174)
at com.dispatch.dyc.mainmenu._jobdone(mainmenu.java:559)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:179)
at anywheresoftware.b4a.keywords.Common$5.run(Common.java:996)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:7325)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
at libcore.io.IoBridge.open(IoBridge.java:438)
... 15 more
 

DonManfred

Expert
Licensed User
Longtime User
show your code. Post the code of your JobDone sub.

Without seeing it it is hard to answer.
 
Upvote 0

donnyy

Member
Licensed User
Longtime User
Thank you guys. I have it figured out, i was calling the same routine multiple times without using 'Dim' in the httpjob variable. Thanks for your reply
 
Upvote 0
Top