nickjames
Aspiring developer
Profile
Posts: 15
Reg: Jun 06, 2013
Reading, Berksh...
2,900
11/14/13 05:09 AM (12 years ago)

Problem With Config File On Installation Of Apps?

Hi All, I have a simple app with three screens. Everything was okay previously however my apps will no longer install on Android for some reason. I now see an error of: "There was a problem loading the app's configuration data. See the Output Console in your development tool. (Eclipse Android Studio, etc, (2)" I have taken a look at a similar thread and unlike the previous member, I only have a small config file and only three screens in my app. Screen 1 is a video player linking to an external mp4 video hosted on Amazon S3, Screen 2 is a PDF linking again to Amazon S3 and Screen 3 is linking to an external URL. It's just a very simply app. What's gone wrong with recent updates? Thanks Nick
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/14/13 05:45 AM (12 years ago)
That error usually indicates some kind of json error. Could be bad json due to a special character or something odd in your config file. Did you change any screen names, menu assignments, etcetera? Try copy/pasting your BT_config.txt file into jsonlint.com and see if it returns valid. If it comes back good, do the same thing with the config in your control panel, and see if it also returns valid. Cheers! -- Smug Also, check your logcat file. It can give good indicators on where exactly the app fails, there might be a clue you can use.
 
tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
like
11/14/13 05:47 AM (12 years ago)
Copy your all configuration data (from Buzztouch control panel) to this website ngiven, and then report back to us what the problem is. This should highlight why the confi data is not valid. http://jsonlint.com/ PS. Do you want to come to the Oxford meet, the only one in the UK, and the only regular meetup in the world. We talk Buzztouch stuff, with apps and troubleshooting sessions. Here's all the details: http://www.buzztouch.com/forum/thread.php?tid=AD61EBFDBA67150AE491AF3 I'm still gathering interest, so if you could come, it would be great... it's only 11 minutes by train from Reading to Oxford! Please don't feel pressured to come though.
 
tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
like
11/14/13 05:48 AM (12 years ago)
@Smug seems to be a quicker typer than me!
 
nickjames
Aspiring developer
Profile
Posts: 15
Reg: Jun 06, 2013
Reading, Berksh...
2,900
like
11/14/13 05:55 AM (12 years ago)
Smug, Thanks for your help. The BT_config file.txt and the config file from my control panel on my BT account online also comes back as valid when I check it in http://jsonlint.com/ Sorry to sound daft but where to I look for the logcat? Nick
 
nickjames
Aspiring developer
Profile
Posts: 15
Reg: Jun 06, 2013
Reading, Berksh...
2,900
like
11/14/13 05:57 AM (12 years ago)
Thomas, Yes would love to head to Oxford and meet you guys. :-) will take a look at this with Interest. No errors found on the file using http://jsonlint.com/ :-( Nick
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/14/13 06:33 AM (12 years ago)
The 'LogCat' is (usually) found in the tabs at the bottom of your eclipse screen, but its one of those windows that may or may not be there, depending on your window config. Check out this tutorial from GoNorthWest, and it outlines the basics of checking for this sort of thing. It's a good tool to know. https://www.buzztouch.com/files/howtos/Problem_Reporting_and_Basic_Debug_v1.0.pdf Cheers! -- Smug
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/14/13 08:29 AM (12 years ago)
This is very interesting, because I'm working with somebody else who is having a similar problem. The similarity here seems to be the use of an mp4 file from a link? Are you using a customURL plugin for that? The LogCat say this: 11-13 22:34:59.164: W/ZZ(420): BT_application:parseJSONData JSONObject ERROR: org.json.JSONException: Value ? of type java.lang.String cannot be converted to JSONObject 11-13 22:34:59.214: W/ZZ(420): BT_fragment_load_config_data:loadAppConfigData "BT_config.txt" file does not use a dataURL for remote updates... 11-13 22:34:59.264: W/ZZ(420): BT_fileManager:deleteFile cachedAppConfig.txt 11-13 22:34:59.324: W/ZZ(420): BT_fragment_load_config_data:loadAppConfigData continuing to load with "BT_config.txt" data in project... 11-13 22:34:59.324: W/ZZ(420): BT_application: validateApplicationData 11-13 22:34:59.364: W/ZZ(420): BT_application:validateApplicationData EXCEPTION trying to parse JSON data? ERROR: org.json.JSONException: Value ? of type java.lang.String cannot be converted to JSONObject 11-13 22:34:59.425: W/ZZ(420): BT_fragment_load_config_data:loadAppConfigData application data is not valid JOSN data? You could try to use an online JSON validator. Several good ones exist online. Exiting App. However, when I run it through a JSON validator, all comes up well. And I can't spot anything obvious in the config file! I'm wondering if this has to do with the use of mp4 files from a custom URL? Mark
 
nickjames
Aspiring developer
Profile
Posts: 15
Reg: Jun 06, 2013
Reading, Berksh...
2,900
like
11/14/13 09:37 AM (12 years ago)
Hi Guys, I am using a plug in I bought from another BT user. The AT53 plug in found here: https://www.buzztouch.com/account/plugin.php?from=plugins.php&pid=3C06F75263AE92A0B802F44 The MP4 is hosted with Amazon S3, here is the line of code on the config file that talks about the video... {"itemId":"9D5A8F04C1EA54518A7CF95", "itemType":"At53_video_player", "itemNickname":"Video Lesson", "navBarTitleText":"Video Lesson", "videoURL":"http://njappvideo.s3.amazonaws.com/imm001.mp4", "videoImageFileName":"FirstFrame.png", "videoDescriptionColor":"#000000", "backgroundColor":"#000000"} I will build a version of the app without the MP4 video, which is called in remotely because of it's size and let you know if the error message goes away. Nick
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/14/13 09:40 AM (12 years ago)
I'd love to know if you're getting the same errors in your LogCat file.
 
nickjames
Aspiring developer
Profile
Posts: 15
Reg: Jun 06, 2013
Reading, Berksh...
2,900
like
11/14/13 10:12 AM (12 years ago)
Hi Guys, I am using a plug in I bought from another BT user. The AT53 plug in found here: https://www.buzztouch.com/account/plugin.php?from=plugins.php&pid=3C06F75263AE92A0B802F44 The MP4 is hosted with Amazon S3, here is the line of code on the config file that talks about the video... {"itemId":"9D5A8F04C1EA54518A7CF95", "itemType":"At53_video_player", "itemNickname":"Video Lesson", "navBarTitleText":"Video Lesson", "videoURL":"http://njappvideo.s3.amazonaws.com/imm001.mp4", "videoImageFileName":"FirstFrame.png", "videoDescriptionColor":"#000000", "backgroundColor":"#000000"} I will build a version of the app without the MP4 video, which is called in remotely because of it's size and let you know if the error message goes away. Nick
 
nickjames
Aspiring developer
Profile
Posts: 15
Reg: Jun 06, 2013
Reading, Berksh...
2,900
like
11/14/13 10:12 AM (12 years ago)
dupe post
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/14/13 10:21 AM (12 years ago)
If you refresh your browser after making a post, it'll post the same thing again. I'm sure that's what happened!
 
nickjames
Aspiring developer
Profile
Posts: 15
Reg: Jun 06, 2013
Reading, Berksh...
2,900
like
11/14/13 10:50 AM (12 years ago)
Guys, Thanks for your patience. Okay so the app is running on the Emulator, however I see an error message when I try watching the video. The Error in the Emulator states that: "There was a problem loading the video file or stream." I have now found how to customise Eclipse to ensure the LogCat window pane is also showed. Below is the last few lines of the LogCat when I tried watching the video. 11-14 17:41:10.821: W/ZZ(368): BT_screen_customURL:onPause (BASE CLASS) 11-14 17:41:10.821: W/ZZ(368): At53_video_player:onResume (BASE CLASS) 11-14 17:41:10.821: W/ZZ(368): At53_video_player:reportToCloud 11-14 17:41:10.821: W/ZZ(368): BT_activity_root_tabs:onTabChanged Tab: 0 11-14 17:41:10.831: W/ZZ(368): At53_video_player:reportToCloudWorkerThread getting lastModified from reportToCloudURL https://www.buzztouch.com/api/app/?command=reportToCloud&appGuid=JA101FB7F94D6EC716B030656&apiKey=05331815E56196BAC5AA27C&apiSecret=98B4E5C6B529846D2F4104A&deviceId=&deviceLatitude=&deviceLongitude=&deviceModel=generic-google_sdk&userId=&currentMode=Design 11-14 17:41:10.831: W/ZZ(368): BT_downloader:downloadTextData from URL: https://www.buzztouch.com/api/app/?command=reportToCloud&appGuid=JA101FB7F94D6EC716B030656&apiKey=05331815E56196BAC5AA27C&apiSecret=98B4E5C6B529846D2F4104A&deviceId=&deviceLatitude=&deviceLongitude=&deviceModel=generic-google_sdk&userId=&currentMode=Design 11-14 17:41:10.961: W/ZZ(368): At53_video_player:handleReportToCloudResults EXCEPTION processing results: org.json.JSONException: End of input at character 0 of 11-14 17:41:17.120: W/ZZ(368): At53_video_player:playVideo 11-14 17:41:17.213: D/MediaPlayer(368): Couldn't open file on client side, trying server side 11-14 17:41:17.232: E/MediaPlayer(368): error (1, -2147483648) 11-14 17:41:17.274: W/ZZ(368): At53_video_player:playVideo loading from: https://njappvideo.s3.amazonaws.com/imm001.mp4 11-14 17:41:17.350: D/MediaPlayer(368): Couldn't open file on client side, trying server side 11-14 17:41:17.360: E/MediaPlayer(368): error (1, -2147483648) 11-14 17:41:17.482: D/dalvikvm(368): GC_FOR_MALLOC freed 8973 objects / 884512 bytes in 98ms 11-14 17:41:17.580: D/NativeCrypto(368): Freeing OpenSSL session 11-14 17:41:17.580: D/NativeCrypto(368): Freeing OpenSSL session 11-14 17:41:17.610: D/NativeCrypto(368): Freeing OpenSSL session 11-14 17:41:17.690: E/MediaPlayer(368): Error (1,-2147483648) 11-14 17:41:17.690: D/VideoView(368): Error: 1,-2147483648 11-14 17:41:17.690: W/ZZ(368): At53_video_player:videoViewErrorListener 11-14 17:41:17.841: W/ZZ(368): At53_video_player:stopVideo Please note, I am able to type the URL to the Mp4 directly into my internet browser and watch the video without a problem. So I know the URL to the video is correct and there isn't a problem with the Amazon S3 account. Thanks for all your help guys. Kindest Nick
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
11/14/13 04:28 PM (12 years ago)
I started getting this problem with one of my apps after upgrading android, think I went from 4.1 to 4.2 and it threw up that error, I downloaded on another phone and it worked fine, hmmm might be something funny happening with older app code.
 
nickjames
Aspiring developer
Profile
Posts: 15
Reg: Jun 06, 2013
Reading, Berksh...
2,900
like
11/15/13 05:41 PM (12 years ago)
Further to my original post, I am finding that I can now run the app on the Emulator okay, using a build of 4.1.2 / 16 But not a 'real tablet' with Android 4.1.1 installed. Same error message as yesterday. Anyone else any closer to finding an answer? I have tried using both the 2.0 and 3.0 build from BT too. Also this tablet would not update it's OS from the device update menu?? Nick
 
nickjames
Aspiring developer
Profile
Posts: 15
Reg: Jun 06, 2013
Reading, Berksh...
2,900
like
11/15/13 05:54 PM (12 years ago)
here is another logcat 11-16 00:21:23.621: W/ZZ(894): At53_video_player:playVideo 11-16 00:21:23.811: D/MediaPlayer(894): Couldn't open file on client side, trying server side 11-16 00:21:24.051: W/ZZ(894): At53_video_player:playVideo loading from: http://njappvideo.s3.amazonaws.com/imm001.mp4 11-16 00:21:24.251: D/dalvikvm(894): GC_CONCURRENT freed 255K, 6% free 6790K/7175K, paused 32ms+122ms, total 283ms 11-16 00:21:24.581: E/MediaPlayer(894): error (1, -2147483648) 11-16 00:21:24.595: D/MediaPlayer(894): Couldn't open file on client side, trying server side 11-16 00:21:24.711: I/Choreographer(894): Skipped 95 frames! The application may be doing too much work on its main thread. 11-16 00:21:25.260: D/webviewglue(894): nativeDestroy view: 0x2a2dd470 11-16 00:21:30.770: D/MediaPlayer(894): getMetadata 11-16 00:21:30.770: W/ZZ(894): At53_video_player:videoViewPreparedListener 11-16 00:21:31.050: I/Choreographer(894): Skipped 42 frames! The application may be doing too much work on its main thread. 11-16 00:21:46.281: E/MediaPlayer(894): error (1, -110) 11-16 00:21:46.540: E/MediaPlayer(894): Error (1,-110) 11-16 00:21:46.540: D/VideoView(894): Error: 1,-110 11-16 00:21:46.540: W/ZZ(894): At53_video_player:videoViewErrorListener 11-16 00:21:47.210: W/ZZ(894): At53_video_player:stopVideo 11-16 00:21:49.270: W/AudioSystem(894): AudioFlinger server died!
 
nickjames
Aspiring developer
Profile
Posts: 15
Reg: Jun 06, 2013
Reading, Berksh...
2,900
like
11/16/13 06:00 AM (12 years ago)
Hi Guys, I have tried installing the app on a very similar tablet, by the same manufacturer the only difference is the Kernal Version. It works with Kernal Version 3.0.36+ but NOT with Kernal version 3.0.8 this is the only difference between the 2 x tablets that I can see. I'll go research how I can change kernal versions today... unless anyone knows of a way to adjust the config file to make it work? which is back to the original error. Nick
 
nickjames
Aspiring developer
Profile
Posts: 15
Reg: Jun 06, 2013
Reading, Berksh...
2,900
like
11/25/13 02:28 PM (11 years ago)
Hi Guys, I have spent the last 7 days bug fixing and it's been a whirlwind few days I can tell you, lots of late nights... no forget that I pulled a few all nighters as a newbie to this in order to de-bug the code... However at long last I have manged it... so it is with a Fan-fair that I can reveal the solution to the problem is you ever see the problem when running an Android 3.0 Buzztouch app on a device for the first time and seeing the error message: "Something's Not Right - There was a problem loading the app's configuration data. See the output console in your development tool (Eclipse,Android Studio, etc). (2)" Okay the bug lies here (currently): 4. In Eclipse, open up the BT_strings file. - To solve this problem * Bug section =========== public static String mergeBTVariablesInString(String theString) { ..... //device if(module01_appDelegate.rootApp.getRootDevice() != null){ theString = theString.replace("[deviceId]", module01_appDelegate.rootApp.getRootDevice().getDeviceId()); theString = theString.replace("[deviceLatitude]", module01_appDelegate.rootApp.getRootDevice().getDeviceLatitude()); theString = theString.replace("[deviceLongitude]", module01_appDelegate.rootApp.getRootDevice().getDeviceLongitude()); theString = theString.replace("[deviceModel]", module01_appDelegate.rootApp.getRootDevice().getDeviceModel()); } } ======================= * In this section look for this code... ======================== theString = theString.replace("[deviceId]", module01_appDelegate.rootApp.getRootDevice().getDeviceId()); ========== When this app execute on android 4.1.1 tera, deviceId is null. So,Error message occured "Something's Not Right There was a problem loading the app's configuration data. See the output console in your development tool (Eclipse,Android Studioo, etc). (2)" * To solve this problem - You have to write following code: ================= //device if(module01_appDelegate.rootApp.getRootDevice() != null){ if(module01_appDelegate.rootApp.getRootDevice().getDeviceId()==null) { theString = theString.replace("[deviceId]", ""); }else { theString = theString.replace("[deviceId]", module01_appDelegate.rootApp.getRootDevice().getDeviceId()); } theString = theString.replace("[deviceLatitude]", module01_appDelegate.rootApp.getRootDevice().getDeviceLatitude()); theString = theString.replace("[deviceLongitude]", module01_appDelegate.rootApp.getRootDevice().getDeviceLongitude()); theString = theString.replace("[deviceModel]", module01_appDelegate.rootApp.getRootDevice().getDeviceModel()); } ================== I hope this helps to both solve any other bugs you guys are facing and also helps the Dev Team here at Buzz Touch to keep the site one of the best I have found in helping new app developers to get started in creating some fantastic apps. If you have found this forum string useful, please let me know this post helped by making a comment below. Keep smiling! Nick
 

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.