Android Question Error Sub _newconnection was not found

Neojoy

Member
Licensed User
Hi,

Anybody knows what means this error and how to fix or avoid it?

My app crash when this error happen and I don't know where is the trouble.

java.lang.Exception: Sub _newconnection was not found.
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:197)
at anywheresoftware.b4a.BA$2.run(BA.java:365)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6312)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
java.lang.RuntimeException: java.lang.Exception: Sub _newconnection was not found.
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:228)
at anywheresoftware.b4a.BA$2.run(BA.java:365)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6312)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762)
Caused by: java.lang.Exception: Sub _newconnection was not found.
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:197)
... 8 more
Thanks!
 

Neojoy

Member
Licensed User
Where is the relevant code you are using?

Are you using a ServerSocket and did set the Eventprefix to ""?
I don't know exactly where crash happens, because my app run as a service and it does many tasks.

Yes, I'm using ServerSocket and seting Eventprefix to "".

So, maybe ServerSocket is the responsable by this error?
 

DonManfred

Expert
Licensed User
Yes, I'm using ServerSocket and seting Eventprefix to "".
This is the Problem. It is a mistake not to set an EventPrefix for Objects which do use Events.

Set the prefix, make sure to have a Eventsub yourprefix_newconnection
 
Last edited:
Top