I created an app that uses Firebase DB. But it keeps breaking down. I tried everything, but it keeps breaking down. Please help me. There is no problem with the code. Because even though I erased all the code, the crash continued.
Why are you using 4 firebase components? Are you calling data from 4 different firebase projects? If only one project then you really only need 1 firebase component.
Are you able to temporarily convert your aia project to English language and output all the blocks, this will make it easier for most people here to debug and help.
The screen is divided into several parts, adding several fire base DBs to simplify coding. I will change all blocks to English additionally.
turtle_school_copy_copy1_a_copy.aia (39.2 KB) I don't know if I translated well because I am not good at English. (The screen with the problem is Screen2.)
Not sure where the problem is, even removing all the blocks from their calls / screen initialise, when moving from Screen1 to Screen6 in companion crashes the companion.
Hi
I suggest:
- tidy-up the code, there should be no empty puzzle pieces
- Build an APK and record what happens using LogCat:
Capturing Device Logs using adb logcat
--------- beginning of crash
08-29 22:45:31.604 25072 25072 E AndroidRuntime: FATAL EXCEPTION: main
08-29 22:45:31.604 25072 25072 E AndroidRuntime: Process: edu.mit.appinventor.aicompanion3, PID: 25072
08-29 22:45:31.604 25072 25072 E AndroidRuntime: com.google.appinventor.components.runtime.errors.YailRuntimeError: Value failed to convert from JSON.
08-29 22:45:31.604 25072 25072 E AndroidRuntime: at com.google.appinventor.components.runtime.FirebaseDB.DataChanged(FirebaseDB.java:560)
08-29 22:45:31.604 25072 25072 E AndroidRuntime: at com.google.appinventor.components.runtime.FirebaseDB$1$1.run(FirebaseDB.java:154)
08-29 22:45:31.604 25072 25072 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:789)
08-29 22:45:31.604 25072 25072 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:98)
08-29 22:45:31.604 25072 25072 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
08-29 22:45:31.604 25072 25072 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6944)
08-29 22:45:31.604 25072 25072 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
08-29 22:45:31.604 25072 25072 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
08-29 22:45:31.604 25072 25072 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
This is a bug output by adb.