Discussion Forums  >  Config Data, JSON, App Refresh

Replies: 6    Views: 183

piggilypoo
Aspiring developer
Profile
Posts: 172
Reg: Jun 28, 2011
San Diego
5,120
05/03/13 04:01 PM (11 years ago)

Help! JSON data not valid after adding plugins

Just recently added the App Rater and SP Youtube plugins to my app, and corresponding menus/screens, and when I try to open my app in the emulator, it crashes and says to check logcat, which returns this: 05-03 22:22:38.200: W/ZZ(568): BT_application:validateApplicationData EXCEPTION trying to parse JSON data? ERROR: org.json.JSONException: Unterminated object at character 56982 of {"BT_appConfig": { "BT_items":[ {"itemId":"JA7C309EE9D180AA0F148229A", "itemType":"BT_app", "buzztouchAppId":"JA7C309EE9D180AA0F148229A", "buzztouchAPIKey":"861D0302EE4AADA65FA11AA", "dataURL":"http://www.buzztouch.com/api/app/?command=getAppData&appGuid=JA7C309EE9D180AA0F148229A&apiKey=861D0302EE4AADA65FA11AA&apiSecret=6EB294FF71F57D6293F6185", "reportToCloudURL":"http://www.buzztouch.com/api/app/?command=reportToCloud&appGuid=JA7C309EE9D180AA0F148229A&apiKey=861D0302EE4AADA65FA11AA&apiSecret=6EB294FF71F57D6293F6185&deviceId=[deviceId]&deviceLatitude=[deviceLatitude]&deviceLongitude=[deviceLongitude]&deviceModel=[deviceModel]&userId=[userId]", "registerForPushURL":"", "lastModified":"Fri, 03 May 2013 21:58:48 -0700", "lastPublished":"Sun, 11 Mar 2012 19:44:54 -0700", "name":"Hackers Handbook", "version":"2.0", "currentMode":"Design", "startLocationUpdates":"0", "promptForPushNotifications":"0", "allowRotation":"allDevices", "BT_themes":[{"itemId":"ABBB5716B8767EF63BFD5EA", "itemType":"BT_theme", "itemNickname":"Default Theme", "splashScreenItemId":"12AFA58DEFD1AE2F53DE289", "splashScreenNickname":"Splash", "statusBarStyle":"default", "navBarStyle":"solid", "toolbarStyle":"transparent", "tabBarColor":"clear", "backgroundColor":"#FFFFFF"} ], "BT_tabs":[{"itemId":"6055EF267B90CDF13A6812A", "itemType":"BT_tab", "textLabel":"Tutorials", "iconName":"home.png", "homeScreenItemId":"7FF02CDD0E327AF250935CA"}, {"itemId":"F8C60E803C5857C546205A3", "itemType":"BT_tab", "textLabel":"Blog", "iconName":"rss.png", "homeScreenItemId":"96F17A987158C5381CAD6B8"}, {"itemId":"746405566066DE37A2580B0", "itemType":"BT_tab", "textLabel":"Hitlist", "iconName":"hitlist.png", "homeScreenItemId":"E39A5B0EEE5DFDE92B0633B"}, {"itemId":"920C1C55C7CA762243ADE14", "itemType":"BT_tab", "textLabel":"Chat", "iconName":"chat.png", "homeScreenItemId":"AF299E4F447748C8EFA0953"}, {"itemId":"FB82A7B57F73BCDC52857DD", "itemType":"BT_tab", "textLabel":"Notepad", "iconName":"notepad.png", "homeScreenItemId":"89BE2878279071063B4C221"} ], "BT_screens":[{"itemId":"0CCF7D7C639F23178E42F66", "itemType":"BT_screen_menuListSimple", "itemNickname":"Facebook/Twitter/Youtube", "navBarTitleText":"Facebook/Twitter/Youtube", "backgroundColor":"#000000", "backgroundImageNameSmallDevice":"background.png", "backgroundImageNameLargeDevice":"background.png", "backgroundImageScale":"center", "listBackgroundColor":"clear", "listRowBackgroundColor":"clear", "listTitleFontColor":"#FFFFFF","childItems":[{"itemId":"10D32FB54A77C9B53EB9C12", "itemType":"BT_menuItem", "loadScreenWithItemId":"6BC72DEA8948D2DAEE362B9","titleText":"Using Firefox"},{"itemId":"FAF8E7514219BBB14A11F49", "itemType":"BT_menuItem", "loadScreenWithItemId":"A3B04C4AB3C5DDCF0C781DD","titleText":"BackTrack 5"},{"itemId":"844B526FD8CDBF301DF0EBF", "itemType":"BT_menuItem", "loadScreenWithItemId":"66F952C5507BF43039CCD5E","titleText":"Phishing"},{"itemId":"DF08713971887F5301A4CC3", "itemType":"BT_menuItem", "loadScreenWithItemId":"DD4BE5BEE733989B2D62E85","titleText":"Virus Method"},{"itemId":"5076FFC6BAFEADD6FC90FA2", "itemType":"BT_menuItem", "loadScreenWithItemId":"731252547715A5686ACCF6C","titleText":"Flooding Facebook"},{"itemId":"BB210A281E707EF6F01DEA5", "itemType":"BT_menuItem", "loadScreenWithItemId":"2034FAA39467E1DD1AA7CBE", "titleText":"Close FB accounts"}]}, {"itemId":"4120FC477D5B8C26EF18B65", "itemType":"BT_screen_customHTML", "itemNickname":"Genuine WinXP", "dataURL":"http://www.buzztouch.com/applications030812/JA7C309EE9D180AA0F148229A/documents/customHTML_4120FC477D5B8C26EF18B65.html", "navBarTitleText":"Genuine WinXP", "forceRefresh":"1"}, {"itemId":"32690074B7FFAAB658BDD44", "itemType":"BT_screen_customHTML", "itemNickname":"Browse Anonymously", "dataURL":"http://www.buzztouch.com/applications030812/JA7C309EE9D180AA0F148229A/documents/customHTML_32690 05-03 22:22:38.200: W/ZZ(568): BT_activity_root: application data is not valid JOSN data? You could try to use an online JSON validator. Several good ones exist online. Exiting App. not sure what's wrong? Please help!
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
05/03/13 04:08 PM (11 years ago)
Line 2 of your log paste ERROR: org.json.JSONException: Unterminated object at character 56982 of {"BT_appConfig": { "BT_items":[ Should pretty much sum it up. Take your config.txt file and paste it into JSONLint.com and see how it comes up. If there are errors in your json file you should be able to see them that way. Cheers! -- Smug
 
piggilypoo
Aspiring developer
Profile
Posts: 172
Reg: Jun 28, 2011
San Diego
5,120
like
05/03/13 04:13 PM (11 years ago)
The results show: Parse error on line 1820: ..."videoDescription": "How to Make a faceb -----------------------^ Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[' but I'm not sure what its saying is wrong..?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
05/03/13 04:16 PM (11 years ago)
well, the error is showing you the 'region' of the error. It could be a missing or extra symbol somewhere in that neighborhood. First, see which plugin that json applies to. Then take a look at your control panel entries for that plugin. Chances are there is a character that is not welcome somewhere in your text. Cheers! -- Smug
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
05/03/13 04:20 PM (11 years ago)
Yep - do a search on your config.txt file for "How to Make a" and copy that entire line of text - paste it in here.
 
piggilypoo
Aspiring developer
Profile
Posts: 172
Reg: Jun 28, 2011
San Diego
5,120
like
05/03/13 04:33 PM (11 years ago)
Got it! Turns out it was a line break lol. Thanks guys
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
05/03/13 04:55 PM (11 years ago)
no problem - JSON errors are usually the easiest to fix but the ones that drive you crazy the most! :)
 

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.