Android Question Private Key signning

iCAB

Well-Known Member
Licensed User
Longtime User
Hello there

I am using b4A 5.50. In order to use Google Map APIs, I used "Private Key Sign" and I created a keystore.
The minute I did this ( I am not sure if it is a coincidence), I started getting
B4X:
java.lang.RuntimeException: java.io.EOFException
    at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:167)
    at anywheresoftware.b4a.shell.Shell.start(Shell.java:99)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:88)
    at com.hidata.cabcubedriver.main.afterFirstLayout(main.java:94)
    at com.hidata.cabcubedriver.main.access$000(main.java:17)
    at com.hidata.cabcubedriver.main$WaitForLayout.run(main.java:80)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:135)
    at android.app.ActivityThread.main(ActivityThread.java:5310)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)
Caused by: java.io.EOFException
    at libcore.io.Streams.readFully(Streams.java:83)
    at java.io.DataInputStream.readInt(DataInputStream.java:103)
    at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:139)
    ... 13 more

if I try to use debug key , i continue to get the same error.

What I have to do now is the following:
1. Select Use Debug Key
2. Select "Release" and compile and the application to the attached device. The application runs ok.
3. switch back to debug mode to run the app

if I close B4A, and recompile the project ( even in debug mode ), I get the following error
B4X:
java.lang.RuntimeException: java.net.SocketException: Socket closed
    at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:167)
    at anywheresoftware.b4a.shell.Shell.start(Shell.java:99)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:88)
    at com.hidata.cabcubedriver.main.afterFirstLayout(main.java:94)
    at com.hidata.cabcubedriver.main.access$000(main.java:17)
    at com.hidata.cabcubedriver.main$WaitForLayout.run(main.java:80)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:135)
    at android.app.ActivityThread.main(ActivityThread.java:5310)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)
Caused by: java.net.SocketException: Socket closed
    at libcore.io.Posix.recvfromBytes(Native Method)
    at libcore.io.Posix.recvfrom(Posix.java:161)
    at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:250)
    at libcore.io.IoBridge.recvfrom(IoBridge.java:553)
    at java.net.PlainSocketImpl.read(PlainSocketImpl.java:485)
    at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37)
    at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237)
    at java.io.InputStream.read(InputStream.java:162)
    at java.io.BufferedInputStream.fillbuf(BufferedInputStream.java:149)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:295)
    at libcore.io.Streams.readFully(Streams.java:81)
    at java.io.DataInputStream.readInt(DataInputStream.java:103)
    at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:139)
    ... 13 more

*******************
I just edit this post, but I didn't know how to change the title. I believe that the private key signing may have been a coincidence.
I did re-install B4A 5.20 and I tried using legacy debugger no issue in debug mode so far


Thanks in advance
 
Last edited:

iCAB

Well-Known Member
Licensed User
Longtime User
No matter what I try with Ver 5.50 ( and the project in question ) I keep getting this error

B4X:
java.lang.RuntimeException: java.io.EOFException
    at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:167)
    at anywheresoftware.b4a.shell.Shell.start(Shell.java:99)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:88)
    at com.hidata.cabcubedriver.main.afterFirstLayout(main.java:94)
    at com.hidata.cabcubedriver.main.access$000(main.java:17)
    at com.hidata.cabcubedriver.main$WaitForLayout.run(main.java:80)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:135)
    at android.app.ActivityThread.main(ActivityThread.java:5310)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)
Caused by: java.io.EOFException
    at libcore.io.Streams.readFully(Streams.java:83)
    at java.io.DataInputStream.readInt(DataInputStream.java:103)
    at anywheresoftware.b4a.shell.Shell.virtualAssets(Shell.java:139)
    ... 13 more

Here is what I tried so far:
1. Re-installed B4A 5.50
2. Performed a factory reset on the phone
3. added: #DebuggerForceStandardAssets: true
4. Tried different USB ports

I am stuck.. This was working perfectly ok, it just started this strange behaviour out of nowhere.
May be 10% of the tries go through, the other 90% fail.

V5.20 legacy works no problem, whoever I do prefer to work with the latest version for future updates

May be it is worth mentioning that smaller example projects seem to be ok

Please advise
 
Upvote 0

iCAB

Well-Known Member
Licensed User
Longtime User
Ok great, I didn't realize that the legacy debugger is there.
I will use that for now.
I will get couple of other phones/tablets first and I'll try the rapid debugger before wasting your time ( it could be device related )

Thank you for the great support
greatly appreciated
 
Upvote 0
Top