App crashes when I open specific screen, but nothing wrong with blocks

I am developing an app that can track the location of the user for now, and I have perfect code that makes sense in my blocks section, and I originally had the problem of the app not giving any information on the user ( longitude, latitude and address)
even when location was given and permission was too, but then I accidentally messed with the fire base token by placing it in the url box, and then realising my mistake, put it back and I put in the token back in the correct place, although I didn’t change anything in it. And then I put in the url, and previously the problem had never been sudden crashing when I entered that screen, but now it is. Any other screen works fine, even an additional screen I have that uses fire base, so I am confused as to why the crashing suddenly happened.

I had set all the things I had changed back to the way they were before, yet it still crashed on the tracking screen, so I’m pretty sure I might have accidentally changed the token key, but I’m not sure because I have a clear memory of not changing it.

Again all my blocks are perfect and no issues, but if I delete the fire base it will come with some difficulties.

Hello Ciarakitten, welcome to the forum.

Hmm - my crystal ball is not working :upside_down_face: - do you think you could upload the Blocks of the Screen that has an issue?

Download from the Project:
download blocks

Upload to your Topic here:

1 Like

What exactly does that mean? Can you elaborate?
You also can use logcat to find out what is going on


I think the code is ok, but if there’s any problems with if and how it tracks the user can you tell me? I’m new enough to MIT app inventor so I may not have a key component that I need

I am making a bus tracking app but because it’s a prototype for a competition, I can only demonstrate tracking abilities by tracking the user, what I did try is replacing the fire base and that actually stopped the crashing, but I’m back to my base problem of the tracking via the location sensor not working and not updating

Why are you using an online database for this. You can simply assign the location sensor values to your labels and the map, without using, in this instance, firebase ?

I was following a tutorial from a channel called the coding bus on how to make this kind of an app, from this video and fire base was used so I thought it was something that I needed to use, although now I do see that I don’t properly need it, but I’m not sure how to go around making the app without it

Here is a tutorial showing a similar app. It may be helpful. Try the aia. How to broadcast a GPS location and share the information on a map with others in real time..CloudDB

1 Like


1 Like

If you want to share the location of the bus with other users you certainly need to use either a FirebaseDB or a CloudDB.

Can I ask — do I only get rid of the purple blocks, or do I do anything with the data changed blocks
as well?

you do not need the FirebaseDB at all... so remove the FireBaseDB component and all events will be removed automatically including the DataChanged event


With there being no label for the address, should I get rid of the address text box on the screen?

Also what specific block should I apply to the map pan to thing?

In this image

This should be about it:


Thank you so much! I’ll try this out, but thank you everyone here for helping me with this issue, I’m relatively new to MIT app creator so I definitely wouldn’t have been able to do this on my own <3

This is what my final code looks like

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.