Android Question [Firestore lib] java.lang.RuntimeException: Method: getSize not found in: java.lang.Boolean

peacemaker

Expert
Licensed User
Longtime User
Hi, Don (i guess, only you can reply for this in your lib)

Lib is v.0.59.
My database is, sure, without "drivers" collection, so
Code: Copy
Log($"Driver_Snapshot(${snap.Size},${snap})"$)
this line (snap.Size) in your example gives error:

*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Setting query to get users
** Activity (main) Resume **
Error occurred on line: 64 (Main)
java.lang.RuntimeException: Method: getSize not found in: java.lang.Boolean
at anywheresoftware.b4a.shell.Shell$MethodCache.getMethod(Shell.java:985)
at anywheresoftware.b4a.shell.Shell.getMethod(Shell.java:644)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:731)
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:176)
at anywheresoftware.b4a.shell.DebugResumableSub$RemoteResumableSub.resume(DebugResumableSub.java:22)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:250)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:137)
at anywheresoftware.b4a.BA$2.run(BA.java:370)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Maybe should it return zero ?
Other methods of such "empty" QuerySnapshot return the same error.
 
Last edited:
Try to add some logs for the object itself to find out what the problem may be

Code: Copy
Log($"Driver_Snapshot(${snap})"$)
what is the result?

Code: Copy
Log($"Driver_Snapshot(${snap.Size},${snap})"$)
 
Upvote 0
snap = true
snap.Size or snap.Empty or snap.Metadata = the described error
 
Last edited:
Upvote 0
Thanks, Don - now this event works.
Code: Copy
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Setting query to get users
** Activity (main) Resume **
true
Driver_Snapshot(0,com.google.firebase.firestore.QuerySnapshot@8f540427)

Now i need to understand how to request data... Correct data path.
And, please, document these event signatures anywhere.

"info" - what returned here ?
 
Last edited:
Upvote 0
Back
Top