Hi, I went to do some work on my Pet Tracker this morning and the thunkable app is crashing. I checked the details and its a really long list, however it starts off by saying:
“com.google.maps.api.android.li66.common.c: Error using newLatLngBounds(LatLngBounds,int): Map size can’t be 0…” and it just goes on and on.
When my app opens it doesn’t even open up to the map page, it opens up to the home page. So, I tried taking away all “when page opens block” and it didn’t fix the issue. I tried hiding the maps page in another navigator (the bottom tab navigator to be specific).
The only thing that has worked was when I made a copy of the whole project so I could delete the page that contained my maps, and that seemed to help the issue. I don’t know if it’s a specific map block or if it’s map itself that is causing the issue…
If the project crashes on a single screen that contains a map, can you post a link to a simple project that just contains that? Someone may be able to narrow down the problem further or at least replicate it and report it as a bug.
No, it crashes before I even open the screen. It opens the app in general then crashes before I can do anything. It never even goes to the map page. I had to remove the page entirely to make the app open. However, now I also noticed the Bluetooth is not working anymore. I’m using the scan block and it never returns anything. It’s like it’s in an endless loop or something.
My phone did update over the night, so maybe the phone update has something to do with it?
I’m not sure I’m understanding. So you open the app and without even going to the screen containing a map, it crashes immediately? If that’s the case then there’s something else causing the issue. It’s really hard to troubleshoot this without seeing a project.
I apologize for the confusion, but yes you are correct. It crashes as soon as I open the app. I was only able to fix the issue when I made a copy of the project for the app and took out the map page entirely. That still did not fix the Bluetooth issue though.
Here is the link for my project: https://x.thunkable.com/projectPage/6302cad2af21e70ff335e8e4
I also want to note that after my phones update last night, I noticed that all the permissions had been revoked for the thunkable app. So enabled all the accesses again (location, bluetooth, storage, etc…), but it still did not fix any of the issues.
Okay so the “maps” aspect of your project has nothing to do with the actual “map” component?
I’m assuming it doesn’t crash for me because I don’t have your bluetooth device. I’m not sure what to look for because I thought this was a problem related to lat/lon info. Or maybe it’s Android only. On my iPhone, it doesn’t crash.
That’s correct, it’s just the title of the page that contains the map component. I didn’t have time to go through it block by block to see what was causing the issue, so I just got rid of the page entirely in the project copy.
Well the error for the crash never said anything about the bluetooth, I think the bluetooth issue is just another side effect from whatever is causing the problem. It is for Android. I think it was a security update that I got on my phone last night.
I’ve attached the screenshots from my phone listing the entire details.
Hi Josh,
I took a look at the project that you linked. I didn’t have an errors when I opened up on an android device and so I wasn’t able to replicate your error. There are a few questions I want to ask.
What android device are you currently using and what version of the thunkable app are you on?
Although this most likely isn’t the issue, does this error occur if you are not connected via bluetooth?
If you change the long and lat coordinates your map component, does the error still occur?
If you delete all blocks in your “Map” page but keep the map component, does the error still occur? (Please make a copy before doing this. I wouldn’t want you to lose all your progress.)
Thank you.
On a side note, I really like your app’s design, it’s really cool!
I am using a Samsung Galaxy Note 10 (verizon). App version: v335-47
I can’t connect to bluetooth because it crashes before I can do anything. So, it does occur while I’m not connected via bluetooth.
Yes it still does occur after trying that unfortunately.
I deleted all the blocks in my copy project, and it still has the same crash. So, think it has something to do with the map display component itself.
I would like to add that in the copy project, after I take away the map component, it works. However, I am unable to connect via bluetooth anymore. Something is wrong with the scan block. It has no output anymore. I tried to get it to produce an error or a list of bluetooth devices, but it seems like it is stuck in an endless loop. So bluetooth is not working either
Can relate, I have an app live on app and play store. With android I have no issues, but with IOS (100% of the time on iPhone 14’s, but can’t replicate on iPhone 6 or older) where when the user opens a screen with any map component, the app will go straight to a white screen.
That’s definitely frustrating. Hopefully they can get this all worked out here soon. I’d like to make my app go live here soon. I’m almost done with it. Just got a few kinks to work out.
UPDATE:
I got the map components to work. For some reason, they have to be set to visible. The issue is the other 2 map layers that I have are set “visible to false”. That is because I want the user to be able to choose which map layer it is that they would like to use…
I’m finding all sorts of other issues in regards to the layout. apparently something in the security update messed up how things should/are laid out.
I can’t get my logo to show anymore on the home page. I’ll attach screenshots to show. I still cannot get the bluetooth to work either. I’ll keep playing around with things and see if I can find out anything else.
The second to last screenshot is showing that it is not accessing “nearby devices” permission in the info of the “ThunkableLive app”. So the Bluetooth is def not working.
The last screenshot is showing what updated on my phone. It’s upgrade 38 from Verizon on the note 10.
Something called “visible core” was updated. I’m sure this is what is causing the issues for everything. I just don’t know how to fix it…
the error message states “Map size can’t be 0”. So please set the size of the map component to a fixed value (like 300 width and 300 height) just for testing purposes. If this helps to run your app you can change this size later.
in the blocks you set the values for latitude and longitude from list entries. This may lead to an error, because list entries may be stored as strings and latitude and longitude inputs don’t understand strings. So try to replace in the blocks “call …map setmarker” the direct assignement “latitude = [in list … get #…]” to "latitude = 0 + [in list … get #…] because that converts a string to a number. Hope you understand this advice, I may show you an example block.
I think we were typing at the same time lol. I figured out that all the map layers need to be visible to keep it from crashing.
The block values for lat and lng are okay, because they previously worked before this, and I deleted all the blocks in a troubleshooting attempt that still did not solve the issue.
It’s something to do with layout for sure tho. Thank you for your input!
Hi Josh,
Don’t want you leave you hanging so just wanted to let you know that we are aware of the issues that you have having. We are currently taking a look at everything you have said and trying to find the root issues.
In the meantime, for your maps, could you try having them visible at the start then making them invisible in a “on open block”. That might temporary solve the map issue for now while we look through everything.
Thank you Brian.
So, I uninstalled thunkable live and then downloaded an older APK from August. Now everything works since I’m using the app version: 331-2 now.
I did try starting them off as visible however, it crashed as soon as I made them “invisible”.
For now, I’ll just keep using the older Thunkable Live app until there is a fix. Thanks for all the help and suggestions!
Hi Brian,
I enabled it and installed the current version of thunkable live, but I still get the same crash and error. So now I am using V331-2 again. It seems to work on my phone for most everything.
EDIT 2** I’ve noticed that if I clear the storage but not the cache, it resolves the issue. It ask’s me for the permissions again. But then once I close out of the app and try to reopen it, I get the same crash with the map errors. Then I have to repeat, clear data, approve permissions, etc…
EDIT** It actually stopped working again
I’m getting the same crash with the maps. It was working earlier today. But now it’s not. I’m not sure what happened…
Just wanted to let you know a new update came out and it solved the ble and crashing issues. So I’m going to mark this as solved.