Persistent Companion Error: "java.lang.String.equals(java.lang.Object)' on a null object reference"

FreelancerPlatform__1 (1).aia (84.6 KB)

Hello everyone,

I am running into a very frustrating error on my registration screen, and despite extensive troubleshooting, I cannot get rid of it.

Whenever I trigger my "Create account" button, the Companion app throws this exact error: Error from Companion: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference

My Setup:

  • I have a registration screen (Screen1) with TextBoxes for Full Name and Email.

  • I have a Spinner (RoleSpinner) for the user to select either "Client" or "Freelancer".

  • I am using FirebaseDB to store the user's data as a list when they register.

  • Depending on the Spinner selection, it opens either ClientDashboard or FreelancerDashboard.

What I Have Already Tried (and verified is NOT the issue):

  1. Block Logic is Safe: I added an if/then safety check. The very first thing the button does is check if RoleSpinner.SelectionIndex = 0. If true, it throws a Notifier alert. The Firebase save block and screen switching are safely tucked inside the else bracket.

  2. Spinner is Populated: The ElementsFromString property in the Designer is correctly set to Client,Freelancer (no spaces).

  3. Firebase Settings: My ProjectBucket is NOT blank (it is set properly), and my Firebase Realtime Database is strictly set to the us-central1 server region.

  4. Empty Text Boxes: I made sure to type a test email into the Email text box before clicking the button, so it is not trying to save to an empty Firebase tag.

  5. Cache/Resets: I have done a hard reset on the connection, completely cleared the MIT AI2 Companion app cache/storage on my Android phone, and reconnected fresh.

Even with perfectly clean block logic and verifying all the Designer properties, the error persists. It seems like a "ghost" bug or something failing in the background.

I have attached the whole aia file of my platform

Does anyone know what else could possibly trigger this String.equals null error when the logic is protected and Firebase is configured correctly? Are there any known bugs with the latest Companion update regarding this?

Thank you in advance for any guidance!

Best,
Mubeen

See the first link at

The Firebase component is broken, for all purposes.

Use the Firebase RealtimeDatabase REST api with the AppInventor Web component.