Android Question EOFException

Tim Chapman

Active Member
Licensed User
Longtime User
I am using USB debugging.
Phone is Google Pixel 3XL
Android Version 12.

Same problem on rC608L phone running Android 12.

I have been having no problem for days. Now, I get EOFException.
When I look on my phone, I can't find the spreadsheet Todo List.xls.
Where should it be located?
Two different errors occur. See both error logs below.

Other applications work fine.

I have an earlier version of my code that still works fine. I have not been able to figure out what changed in the new code that makes it not work. I have attached the working code as well.

Code is attached.

Error log1:
Logger connected to: 96PY1BXBZ
--------- beginning of main
update notification to top
update notification to top
update notification to top
update notification to top
update notification to top
Check bat: 100
update notification to top
Check bat: 99
WakeLock already held.
Alternate lock: N/A
update notification to top
update notification to top
update notification to top
update notification to top
Check bat: 99
Check bat: 99
Check bat: 99
WakeLock already held.
Alternate lock: N/A
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
update notification to top
Check bat: 99
Check bat: 99
Copying updated assets files (10)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (sleep)
sending message to waiting queue (activity_permissionresult)
running waiting messages (2)
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (sleep)
Check bat: 99
sending message to waiting queue (activity_permissionresult)
running waiting messages (2)
** Activity (main) Resume **
Check bat: 99
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (sleep)
sending message to waiting queue (activity_permissionresult)
running waiting messages (2)
** Activity (main) Resume **
*** Service (tracker) Create ***
** Service (tracker) Start **
** Service (tracker) Start **
** Activity (main) Pause, UserClosed = true **
** Service (starter) Destroy (ignored)**
** Service (tracker) Destroy **
update notification to top
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
java.lang.RuntimeException: Unable to create service b4a.example.starter: java.lang.RuntimeException: java.io.EOFException
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4504)
at android.app.ActivityThread.access$1700(ActivityThread.java:247)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2076)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7842)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Caused by: java.lang.RuntimeException: java.io.EOFException
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:188)
at b4a.example.starter.onCreate(starter.java:48)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4491)
... 9 more
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:275)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:344)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
... 11 more

Error Log2:
Check bat: 100
java.lang.RuntimeException: Unable to create service b4a.example.starter: java.lang.RuntimeException: java.net.SocketException: Socket closed
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4504)
at android.app.ActivityThread.access$1700(ActivityThread.java:247)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2076)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7842)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Caused by: java.lang.RuntimeException: java.net.SocketException: Socket closed
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:188)
at b4a.example.starter.onCreate(starter.java:48)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4491)
... 9 more
Caused by: java.net.SocketException: Socket closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:118)
at java.net.SocketInputStream.read(SocketInputStream.java:173)
at java.net.SocketInputStream.read(SocketInputStream.java:143)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:239)
at java.io.BufferedInputStream.read(BufferedInputStream.java:258)
at java.io.DataInputStream.readByte(DataInputStream.java:273)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:344)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
... 11 more
 

Attachments

  • TimTodo Not Working.zip
    188.9 KB · Views: 107
  • TimTodo Works.zip
    188.7 KB · Views: 121
Last edited:

walterf25

Expert
Licensed User
Longtime User
I am using USB debugging.
Phone is Google Pixel 3XL
Android Version 12.

Same problem on rC608L phone running Android 12.

I have been having no problem for days. Now, I get EOFException.
When I look on my phone, I can't find the spreadsheet Todo List.xls.
Where should it be located?
Two different errors occur. See both error logs below.

Other applications work fine.

I have an earlier version of my code that still works fine. I have not been able to figure out what changed in the new code that makes it not work. I have attached the working code as well.

Code is attached.

Error log1:
Logger connected to: 96PY1BXBZ
--------- beginning of main
update notification to top
update notification to top
update notification to top
update notification to top
update notification to top
Check bat: 100
update notification to top
Check bat: 99
WakeLock already held.
Alternate lock: N/A
update notification to top
update notification to top
update notification to top
update notification to top
Check bat: 99
Check bat: 99
Check bat: 99
WakeLock already held.
Alternate lock: N/A
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
update notification to top
Check bat: 99
Check bat: 99
Copying updated assets files (10)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (sleep)
sending message to waiting queue (activity_permissionresult)
running waiting messages (2)
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (sleep)
Check bat: 99
sending message to waiting queue (activity_permissionresult)
running waiting messages (2)
** Activity (main) Resume **
Check bat: 99
** Activity (main) Pause, UserClosed = false **
sending message to waiting queue (sleep)
sending message to waiting queue (activity_permissionresult)
running waiting messages (2)
** Activity (main) Resume **
*** Service (tracker) Create ***
** Service (tracker) Start **
** Service (tracker) Start **
** Activity (main) Pause, UserClosed = true **
** Service (starter) Destroy (ignored)**
** Service (tracker) Destroy **
update notification to top
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
Check bat: 99
java.lang.RuntimeException: Unable to create service b4a.example.starter: java.lang.RuntimeException: java.io.EOFException
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4504)
at android.app.ActivityThread.access$1700(ActivityThread.java:247)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2076)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7842)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Caused by: java.lang.RuntimeException: java.io.EOFException
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:188)
at b4a.example.starter.onCreate(starter.java:48)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4491)
... 9 more
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:275)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:344)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
... 11 more

Error Log2:
Check bat: 100
java.lang.RuntimeException: Unable to create service b4a.example.starter: java.lang.RuntimeException: java.net.SocketException: Socket closed
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4504)
at android.app.ActivityThread.access$1700(ActivityThread.java:247)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2076)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7842)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
Caused by: java.lang.RuntimeException: java.net.SocketException: Socket closed
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:188)
at b4a.example.starter.onCreate(starter.java:48)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4491)
... 9 more
Caused by: java.net.SocketException: Socket closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:118)
at java.net.SocketInputStream.read(SocketInputStream.java:173)
at java.net.SocketInputStream.read(SocketInputStream.java:143)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:239)
at java.io.BufferedInputStream.read(BufferedInputStream.java:258)
at java.io.DataInputStream.readByte(DataInputStream.java:273)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:344)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
... 11 more
I've seen this happen when debugging, normally it happens if you have a bad USB connection where the adb connection will get lost intermittently, if you try doing it in release mode all will be OK, I suggest trying with a different USB cable, or even using B4A-Bridge.

Walter
 
Upvote 0

Tim Chapman

Active Member
Licensed User
Longtime User
Other applications work fine on the same USB cable. The problem is the same on two different phones and two different computers.
B4A won't work on my wireless networks. It simply won't connect to the phone(s) no matter what I do. The only way I can get b4A bridge to work is to use my phone as my access point for my computer and connect B4A bridge to the IP address of the phone. Then I get the socket closed error while other applications work fine.
Release mode gives a java.lang.reflect.InvocationTargetException error.
 
Upvote 0

Tim Chapman

Active Member
Licensed User
Longtime User
I wanted to give an update.
I opened the working older and non-working newer versions of the code.
I copied new code to the older instance to update it to the newest version.
It worked. Why? I don't know.
 
Upvote 0
Top