Android Question Error in HttpUtils2Service: java.io.FileNotFoundException: /data/user/0/myapp.package/files/1 (Quota exceeded)

peacemaker

Expert
Licensed User
Longtime User
HI, All

Did anyone see such error in hc_ResponseSuccess ?

B4X:
Sub hc_ResponseSuccess (Response As OkHttpResponse, TaskId As Int)
    Dim job As HttpJob = TaskIdToJob.Get(TaskId)
    job.Response = Response
    Response.GetAsynchronously("response", File.OpenOutput(TempFolder, TaskId, False), _
        True, TaskId)    'HERE THIS ERROR
End Sub

Error occured just at the app start, i have no idea what does it mean and Google does not help.
Full error log:
B4X:
** Activity (main) Resume **
** Service (httputils2service) Start **
Error occurred on line: 57 (HttpUtils2Service)
java.io.FileNotFoundException: /data/user/0/myapp.package/files/1 (Quota exceeded)
    at java.io.FileOutputStream.open0(Native Method)
    at java.io.FileOutputStream.open(FileOutputStream.java:287)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:223)
    at anywheresoftware.b4a.objects.streams.File.OpenOutput(File.java:448)
    at peacemaker.arcom.httputils2service._hc_responsesuccess(httputils2service.java:217)
    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$2.run(BA.java:387)
    at android.os.Handler.handleCallback(Handler.java:790)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6548)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)
Error occurred on line: 57 (HttpUtils2Service)
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])' on a null object reference
    at anywheresoftware.b4a.shell.Shell.runGoodChain(Shell.java:479)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:293)
    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$2.run(BA.java:387)
    at android.os.Handler.handleCallback(Handler.java:790)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6548)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)
--------- beginning of crash
java.lang.RuntimeException: java.net.SocketException: Socket closed
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:175)
    at anywheresoftware.b4a.ShellBA$1.run(ShellBA.java:77)
    at android.os.Handler.handleCallback(Handler.java:790)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6548)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)
Caused by: java.net.SocketException: Socket closed
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:116)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
    at anywheresoftware.b4a.shell.ShellConnector.sendControlMessage(ShellConnector.java:62)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:305)
    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)
    ... 8 more

B4A v.10.0
Only on one real device Android 8.1 occured, on others - no such error.
Which quota for the files may be exeeded ?
 
Last edited:

peacemaker

Expert
Licensed User
Longtime User
Does it also happen in release mode?

yes, initially it was found FC at realeased app, and now debugged.
BTW, the system button "Clear cache" of the app - does not work. If to delete all app's data and reboot - no error during some time, but after several days - again this error only on this device. The app works 24\7 on 4 devices - no this trouble on others.

HttpUtils2Service.bas is of v.2.7


Are you releasing all HttpJobs?

Hmmmm, seems, indeed, someting strange in some codes, rechecking all job.releases. Thanks, Erel !
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…