Bug? httpjob bug and cache

pulketo

New Member
I guess i found a bug on httpjob, and found out that httpjob also caches information,which in 2016 @Erel said it doesn't

B4X:
The specific error was:
Error occurred on line: 292 (HttpJob)
java.io.FileNotFoundException: /data/user/0/b4a.example/cache/1: open failed: ENOENT (No such file or directory)
    at libcore.io.IoBridge.open(IoBridge.java:492)
    at java.io.FileInputStream.<init>(FileInputStream.java:160)
    at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:215)
    at b4a.example.httpjob._getstring2(httpjob.java:467)
    at b4a.example.httpjob._getstring(httpjob.java:107)
    at b4a.example.main$ResumableSub_fnRemotePost.resume(main.java:617)
    at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resumeAsUserSub(DebugResumableSub.java:48)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
    at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resume(DebugResumableSub.java:43)
    at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:267)

The error comes by after you in certain part of your Sub do a j.Release which erases something in the cache but the "cache key exists somewhere", then whenever you try to fetch again, it tries to get that "cache": /data/user/0/b4a.example/cache/1.
It was "workarounded" easily adding a nonce in the url to fetch, so it never gets the cached version.

Fix, maybe delete cache keys too?
 
Top