Can people test this APK to see if it is crashing for them?

I was on a chat for help after the firebase component was causing the app to crash and was told to publish my apk here to see if it was crashing on other peoples devices. Can you please report back if it crashes for you too.

Thanks

Apk url : https://firebasestorage.googleapis.com/v0/b/marsala-10db6.appspot.com/o/Marsala.apk?alt=media&token=34af837c-f2e9-4b14-991c-e1f9d4cedbc9

It crashes for me using Android 7.0. I will get a log later to find the exact cause.

It crashes on android 8.0

crashes in Android 4

It crashes for me. Android 7.0.

Crash Report below.

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.makeroid.josephandneo.Marsala/com.makeroid.josephandneo.Marsala.Screen1}: java.lang.NullPointerException: Attempt to invoke virtual method ‘boolean java.lang.String.equals(java.lang.Object)’ on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2683)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2744)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1493)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6195)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:874)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:764)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method ‘boolean java.lang.String.equals(java.lang.Object)’ on a null object reference
at com.google.appinventor.components.runtime.FirebaseDB.FirebaseURL(FirebaseDB.java:282)
at java.lang.reflect.Method.invoke(Native Method)
at gnu.expr.PrimProcedure.apply(PrimProcedure.java:285)
at gnu.mapping.CallContext.runUntilDone(CallContext.java:234)
at gnu.mapping.CallContext.runUntilValue(CallContext.java:298)
at gnu.expr.GenericProc.applyN(GenericProc.java:120)
at gnu.kawa.reflect.Invoke.applyN(Invoke.java:193)
at gnu.mapping.ProcedureN.apply3(ProcedureN.java:48)
at com.google.youngandroid.runtime.$PcSetAndCoerceProperty$Ex(runtime7037477730845575521.scm:1082)
at com.google.youngandroid.runtime.setAndCoerceProperty$Ex(runtime7037477730845575521.scm:196)
at com.makeroid.josephandneo.Marsala.Screen1.lambda5(Screen1.yail:34)
at com.makeroid.josephandneo.Marsala.Screen1$frame.apply0(Screen1.yail:457)
at gnu.expr.ModuleBody.applyN(ModuleBody.java:226)
at gnu.expr.ModuleMethod.applyN(ModuleMethod.java:216)
at gnu.kawa.functions.ApplyToArgs.applyN(ApplyToArgs.java:139)
at gnu.mapping.ProcedureN.apply1(ProcedureN.java:31)
at com.makeroid.josephandneo.Marsala.Screen1.$define(Screen1.yail:10201)
at com.google.appinventor.components.runtime.Form.onCreateFinish(Form.java:366)
at com.google.appinventor.components.runtime.Form.onCreate(Form.java:313)
at android.app.Activity.performCreate(Activity.java:6736)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2636)
… 9 more

This is the reason why the apk crashes:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.makeroid.josephandneo.Marsala/com.makeroid.josephandneo.Marsala.Screen1}: java.lang.NullPointerException: Attempt to invoke virtual method ‘boolean java.lang.String.equals(java.lang.Object)’ on a null object reference

This means that here boolean java.lang.String.equals(java.lang.Object) a object is not set but the app try to loading it.
That’s why we get a null pointer exception runtime error because a function is not set.

The error is created on the FirebaseURL property.


@Makeroid For all other developers:
The error is created in line 282 in the firebase component.


Here is the problem in the code: if (firebaseURL.equals(url)) {
You get the crash because there is something wrong with the firebase url (or the url is not set).
Are you sure you have set it right?

Have you set it on the designer screen?

Can you show the blocks?

2 Likes

No, problem is that Firebase component uses .equals() method for non-object date type. Strings are compared like this: “” == “”, that means it should be
if (firebaseURL == url) {
Try this.

No.
firebaseURL and url are strings.

And strings are checked with the equals method.

Read this:

And read this:
https://www.leepoint.net/data/expressions/22compareobjects.html

And as I have said, we have to see the blocks.
I think it’s not a code issue, because we have not changed anything on it.
We use the same firebase component like app inventor.

And this should not be a discussion how codes works.
I know what I’m talking about.

This is the issue, I had… Sometimes, you shoud listen. Everyone stopped in Makeroid team, except you are still complaining about every single word:

I had to use == instead of .equals(), because else my app crashed. In my local instance, when I use minsdk 14 or 16, I don’t remember, then Firebase is causing issues.

The null pointer exception is not created from the string method.
The error is created because the id is not set.
Thats because the name ‘null pointer’.

@hillj284 show us your blocks or send it privat

Well, if blocks are compared in a wrong way, null pointer exception occurs because, you are trying to compare things that cannot be.

To everyone, there are no blocks in this app. I was using the firebase component in another app and it was causing that app to crash as well. So I made this test app to test the firebase component, without any blocks. Like I said, I talked to someone in the chat bubble, and he suggested it could be a bug with makeriod. I uploaded the apk here to see if it was just my device, and it obviously seems that it is not.

Thanks

@mika

The apk crashes on every device because there is no firebase url set.
That is the issue creator.
What happens if you set in it a url?

I tried setting a url, setting a key, only using a url, only using a key and all times the app crashes

@mika

1 Like

I have done now some changes on the component.
Now we need to do some test if all works how it should.

Test succesful… it works! :slight_smile: