Discussion Forums  >  Uncategorized

Replies: 15    Views: 379

javooooo
buzztouch Evangelist
Profile
Posts: 719
Reg: Jun 17, 2011
Sydney, Austral...
18,490
06/27/11 07:53 PM (14 years ago)

There was a problem downloading data....

Hi Guys, For the past hour or so, when I try to refresh my application on my iTouch, iPad and in the Simulator, I receive this error: There was a problem downloading data. Please check your internet connection and try again. I'm unsure whether this issue is widespread. My internet connection is fine. I have tried looking through the console log, there are no error messages or anything suspicious. I've also searched the forum, but couldn't find anything conclusive about the issue. Is there a fix? Also, looking at the log, the app sucessfully downloads images etc... so I don't think there is an issue with the connection. Thanks!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
06/27/11 08:30 PM (14 years ago)
This has been occurring lately on some apps. There are a few things that can cause it and it's more likely on 'large' or 'heavy' apps. Large meaning the number of screens and menus in the apps list of screens. When you tap 'refresh' on the app's home screen it attempts to download the same file that loads when you click the 'show the configuration data' in the Core section of the control panel. a) Click the Show Configuration Data link in Conrol Panel > Core settings. Note how long this takes to load. Note how long this takes to load. 6-10 seconds is normal. More than that and the iOS app will start to complain, usually with the 'problem downloading data' message. b) If it loads fine in your browser, have a look at the console in Xcode with the app running. Look for clues in the consoles output. 'Error parsing', type messages. c) If the app is loading the config data, and cannot parse (read) it, you'll need to figure out why? Again, look for clues in the Console. d) If it's loading, and cannot parse it, use this tool to see if you can isolate whats wrong with the JSON data it's downloading: http://jsonlint.com/ (again, use the Core Settings > Show Config Data link to get the JSON data for your app to paste into that tool.) See what you can find?
 
javooooo
buzztouch Evangelist
Profile
Posts: 719
Reg: Jun 17, 2011
Sydney, Austral...
18,490
like
06/27/11 08:34 PM (14 years ago)
a) Took 5 seconds. FYI, the app has about 120 screens. b) There isn't really anything sus or odd in the console.. I'll have another look. There are quite a few error saving messages in the console. Is that a problem? JSONLINT says everythings valid... Parsing seems fine in the console.. there don't seem to be any errors apart from a few saving errors.
 
javooooo
buzztouch Evangelist
Profile
Posts: 719
Reg: Jun 17, 2011
Sydney, Austral...
18,490
like
06/27/11 08:49 PM (14 years ago)
I have absolutely no idea what is happening... no errors. It seems to occur after parsing URL menu items (which I do have a lot of, and they are an integral part of the app). Haven't seen this happen in the Lite version of my app though.
 
javooooo
buzztouch Evangelist
Profile
Posts: 719
Reg: Jun 17, 2011
Sydney, Austral...
18,490
like
06/27/11 09:01 PM (14 years ago)
EDIT: It seems to be happening after loading some HTML pages. If someone would be happy to take a look at this and fix it, I'd be more than happy to pay them for it.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
06/27/11 09:11 PM (14 years ago)
Post: a) The name of the app exactly as it appears in your control panel b) A comment like 'you can look at my app in my control panel' I can look at it on this end, I have access to all the apps but do need your permission. No pay needed ;-)
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
06/27/11 09:13 PM (14 years ago)
Oh...also post the nicknames of the HTML pages you're having trouble loading.
 
javooooo
buzztouch Evangelist
Profile
Posts: 719
Reg: Jun 17, 2011
Sydney, Austral...
18,490
like
06/27/11 09:14 PM (14 years ago)
You can have a look at my app- NeoPal Premium. In the console, it mentions some of the HTML pages before the message pops up. You'll see the HTML pages that seem to be causing the issue on the Game Guides menu. Mainly the later ones in the list. Thanks for your help David! Here is an example of what happens: {itemNickname:Dubloon Disaster, itemId:2A26896170C55BE67940522, itemType:BT_screen_customHTML, dataURL:http://www.buzztouch.com/applications/EAEE441F91597FDD4486D5681/customHTML-2A26896170C55BE67940522.html, navBarTitleText:Dubloon Disaster, hideFromSearch:0, includeAds:0}
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
06/27/11 09:39 PM (14 years ago)
Amazing! So get this...in many files in the source-code the application looks for the occurance of the word 'ERROR'. It does this because the little download method that runs returns the word ERROR if somethign goes wrong. So, when somethign goes wrong, ERROR is returned and this word is what triggers the message you are seeing. 'There was a problem downlaoding some data.' I sluethed this out because when I first compiled the app and launched it, everything worked perfect. It wasn't until I hit the refresh button on the app's home screen that I saw he ugly pop-up error message. I got to digging arround... As it turns out, several places in your app use the word 'Terror', such as on the 'Carnival of Terror' menu item and screen. This is soooo funny. Anyway, the word Terror includes the word ERROR (in lower case) and this is what's triggering the message you're seeing. The downloaded data does contain the word ERROR so you'll always see the message! For sure an oversigh on our part. There are two ways to fix this (and yes we'll get the source code updated on this end for future folks). a) Do a project wide Find in Xcode with your project open. Replace occurances of @ERROR with @ERROR-99 or something else your project won't include in it's text. Example: [appName]appDelegate.m uses: neopal2_appDelegate.m: if([message rangeOfString:@'ERROR' options:NSCaseInsensitiveSearch].location != NSNotFound){ And you would change that too: neopal2_appDelegate.m: if([message rangeOfString:@'ERROR-99' options:NSCaseInsensitiveSearch].location != NSNotFound){ This change would be needed everywhere this is used. It's probably in a few dozen places which is why Xcodes Find in Project would be helpful. You'll be telling Xcode to do a case-sensitve search for @ERROR and it wills how you all the places this is used. b) Find all the occurances of the word 'error' in your nicknames and change then to something else. See if this works. This may be much faster. You'll be looking at navigation bar titles and menu-item names. Probably only where you have Terror. The RSS feeds that return data will hopefully NOT return anything with the word Terror in it. I can say that about 30,000 apps are powered by this tool and I have never seen this. I'm giggling a bit because of all the things that we discover. I'm also cringing a bit and hoping this didn't cause too much trouble? Good luck!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
06/27/11 09:40 PM (14 years ago)
oh, lastly...we'll be updated the project based on this thead and should have the new download available in a few days. You could wait until then too?
 
javooooo
buzztouch Evangelist
Profile
Posts: 719
Reg: Jun 17, 2011
Sydney, Austral...
18,490
like
06/27/11 09:45 PM (14 years ago)
Thanks David. You really are a genius! Glad it know it wasn't my fault. Any ideas to how long it would take you to fix it at your end? I get it. I think I'll do the Search XCODE thingo, faster than waiting. Thanks!
 
javooooo
buzztouch Evangelist
Profile
Posts: 719
Reg: Jun 17, 2011
Sydney, Austral...
18,490
like
06/27/11 09:49 PM (14 years ago)
When I try to project search @ERROR, I can't seem to find anything....
 
javooooo
buzztouch Evangelist
Profile
Posts: 719
Reg: Jun 17, 2011
Sydney, Austral...
18,490
like
06/27/11 11:07 PM (14 years ago)
Rightio, I removed the Terror, all good. However, ideally I do need to keep Terror in the app. I'm sorry, its late, I can't seem to get the search project thing to work. It can't find any results for @ERROR. Any suggestions?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
06/27/11 11:11 PM (14 years ago)
The Search in Project dialogue window is a bit tricky. I set it to do a case-sensitive search and entered ERROR in the box (without the @). It shows a few dozen places. In thinking, you probably don't have to change all the occurances. If this seems hard, just find the ones in the main files you are using. These are: BT_Config > [appName]appDelegate.m BT_Screens > BT_screen_webView.m BT_Screens > BT_screen_rssReader.m BT_Screens > BT_screen_customHTML.m BT_Screens > BT_screen_customURL.m BT_Screens > BT_screen_menuList.m I don't think you're using any other screens. Scroll down in each of these files and you'll see where this @ERROR is checked when the data is done loading. All the methods are nearly identical. Not sure how long it will take us on our end. Lots of things going on and it's tought to move this up the list with 1 out of 30,000 occurances. Giggles. Don't hesitate to re-post if you can't get it. We'll work through it till you can ;-)
 
javooooo
buzztouch Evangelist
Profile
Posts: 719
Reg: Jun 17, 2011
Sydney, Austral...
18,490
like
06/27/11 11:22 PM (14 years ago)
Fixed. FYI to anyone who needs to fix this: Go into XCODE, EDIT ---> FIND ---> FIND & REPLACE IN WORKSPACE. In that dialog, click on the magnifying glass in the left corner of the search bar. Select STARTS WITH ..., MATCH CASE. Then type: @ERROR into the search bar. Click FIND. In the REPLACE section, type @ERROR-99 Thanks for the help David, all fixed :D
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
06/27/11 11:54 PM (14 years ago)
whoo hoo. Still laughing about this one-for-the-ages.
 

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.