Discussion Forums  >  Buzztouch News and Announcements

Replies: 4    Views: 500

David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
01/27/17 08:53 AM (7 years ago)

App loads White Screen, Seems Broken?

I've been debugging a complaint we've heard several times recently. I've found / fixed an issue and think it may be affecting more than the folks that reported it. THIS FOLLOWING REMARKS OR MAY NOT CAUSE any issues in your app, but it could be? YOU MAY NEED TO RE-CREATE SOME MENUS in your app's control panel? --The symptom: App launches to white, blank screen, nothing shows. --The issue: In this app (a zillion things could cause this of course) the JSON data included in the XCode bundle was invalid. --The details: The BT_config_en.txt file included in the Xcode project has an array of BT_menus. This BT_menus array will be empty if the app doesn't have any menus configured. In this case it was not empty and the JSON data in the BT_menus structure was INVALID. Individual items in the BT_menus list are themselves JSON objects. Just like the screens list, themes list, etc. A valid menu item looks something like this: {"itemId":"1234", "itemType":"BT_menuItem", "titleText":"Row 1", "loadScreenWithItemId":"1234"} When debugging the app I was working on I found some INVALID items that looked like this: {"itemId":"1234", "itemType":"BT_menuItem", "titleText":"Row 1""loadScreenWithItemId":"1234"} Note the missing comma between the "titleText" and the "loadScreenWithItemId" keys. This breaks the entire structure. Not just the menu item itself but the entire BT_config_en.txt file becomes invalid. The joys of well structured data, it is or it isn't, there cannot be a "kind of structured" LOL. Fixing this fixed the app. So how did this happen? There was a problem in the control panel and the way it was formatting the JSON when adding / removing menu items. The test of course was tracking this down. If you added an item without also creating a new screen it worked fine. But, if you added an item and also created a new screen at the same time it didn't format the JSON. If you're having trouble and see any JSON errors in your projects you should remove any menu items and re-create them. Bet it fixes it. Lastly, and this is sometimes fun. Using a tool like JSON Lint .com to validate a JSON structure is useful, especially if you're app isn't behaving like you expect. Copy the past the app's Config Data into that tool, click Validate - it should turn green :-)
 
devapps123
Apple Fan
Profile
Posts: 50
Reg: Jul 12, 2012
Sarasota, FL
500
like
01/27/17 09:03 AM (7 years ago)
Hi, David. Can you please take a look at the thread I posted earlier this morning: http://www.buzztouch.com/forum/thread.php?tid=0A6547E302772EAAAE4A01D&fid=BC70C36A743CD4FAD95D17F&sortColumn=FT.id&sortUpDown=DESC&currentPage=1 I'm not sure if this is the same issue. The apps in question in my case were successfully published and functional up until yesterday. Your expertise would be much appreciated.
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/27/17 09:25 AM (7 years ago)
hi david, i am suddenly getting There was a problem downloading some required data when opening my main app on buzz, when i check the jason is sais, Error: Parse error on line 63220: ----------------------^ Expecting 'STRING', got '}' when i delete the line, in then just gives me the same error on a differant line, these arnt new new menu items they are old ones, Please dont tell me i have to amend each menu item, my app has 8500 screens lol Thanks Sean
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
01/27/17 07:48 PM (7 years ago)
Hi guys, responded on the other thread. I'll look for your emails.
 
FunkyMonkey
Aspiring developer
Profile
Posts: 1177
Reg: Aug 07, 2013
blackpool
14,570
like
01/28/17 02:40 AM (7 years ago)
Thanks David, Have emailed you sean All fixed now thanks David
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.