Discussion Forums  >  BT.com Website, Account Questions

Replies: 36    Views: 562

David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
09/14/15 10:27 AM (9 years ago)

Download Data Issue Fixed - details

These comments are related to this post and some iOS issues when downloading data: https://www.buzztouch.com/forum/thread.php?fid=D8210B51BF8F5066CB42904&tid=D8210B51BF8F5066CB42904 Hi Gang, The issue in the other post is FIXED. I'm confident about this. 100% Comments.... SSL: The SSL certificate we're using did validate. Many of your insist it did not. I tried all sorts of tests and cannot find a single thing wrong with the certificate. All browsers (Chrome, Safari, Explorer, Firefox) validate the "identify of the certificate" and I don't see any of the "identify" issues posted above. This doesn't mean you didn't have any problems, it just means you did not see what I've been seeing for two days (and many many others that were fine). The reason the SSL issue is important is that the apps mentioned above were having trouble downloading data from the Buzztouch backend. They are likely using the https:// prefix (secure) in the dataURL, which is good. Whey they aren't getting the same data our browsers are is the mystery. Naturally there are were workarounds for this but they all suck if you're already up and running. Changing an app's configuration is time consuming (thanks Apple for an approval process from the dark ages). Including data in the project, using a non-secure URL, etc. These "would work" presumably but you shouldn't have to do that. You could, but it's up to you to determine if you want to go through that trouble. The SSL issue is fixed now so "refreshing" the app should be all it takes. iOS / Android: Interestingly, nobody complained about any Android projects. This either means nobody cares about Android (LOL) or it was isolated to iOS. I've been digging into the iOS core for two days. Seems like it should have been easy. Not so much. I WAS ABLE TO PRODUCE THE PROBLEM on a few iOS version, not all though. The mystery was / is 100% related to the SSL certificate I renewed a few days ago. I was able to confirm this after debugging the BT_downloader.m class. This is the Class file that does the downloading and the file in question when you get the "invalid app data" message. I purchased several other SSL certificates from other providers and installed them and tested them, just to make sure. Browsers, fine. iOS projects. Some fine, some not. Strange. I purchased Inexpenisive SSL certs, expensive SSL certs, etc. All produced the same results. This of course makes me wonder about the whole "SSL thing" anyway. Sigh, what a racket that is! Generating SSL signing requests, uploading, restarting, configuring, over and over again while "nobody notices" is a giant pain the reard. I generally purchase SSL certs from GoDaddy. I'm not at all a GoDaddy fan for most things, but for SSL I've had good experience for many many years. The certificate we use on BT.com is issued by GoDaddy. SO, not a certificate problem but issues begin literally the moment the cert expired. I'm not buying it, gotta be realted. SO, not a browser problem but instead an iOS problem on some devices. Whatever, makes no sense. I suppose the NSMutableURLRequest object used to do the downloading (in BT_downloader.m) could be different across different iOS versions but again this makes no sense. And, NOTHING changed on the devices experiencing the problems. I guess it's possible that some went through an iOS update process (iOS 7 to iOS 8 etc) but this is highly unlikely. Blah, blah, I'll save the rants for later. What I did to fix this (without taking the entire system down) is complicated.... a) Setup an additional load balancer to handle all requests from devices and browsers (millions of them, thousands per second) through a different server. b) Wrote some server side (Apache web server) rules to re-route requests to this newly configured load balancer and then server. c) Route these requests to a newly configured server specifically spun-up to handle these strange / broken requests. Again, requests from "working clients" like desktop browsers and some iOS devices were fine but some were not. Re-routing everything to a newly setup temporary server seemed like the best approach d) The newly configured server did an internal request (within the same network, in the same data center, not the public internet) to the "other" existing server to fetch app data. All this was done to prevent thousands and thousands of working apps from breaking. e) With that going, all requests were taking a different network path to their data, call it triage. At this point I was able to take down the previously live server and do some digging around without killling any working apps, or BT.com. This was fun. Sweat, stress, anxiety, what the heck is going on! Doing heart surgery on a system that's worked nearly perfectly for a very long time is not my idea of fun. f) I deleted the newly installed SSL certificates from the pit-stopped-server. I removed the SSL logs and all other data related to Apache's handling of these requests. g) I re-installed all the SSL goodies, re-booted, re-started Apache and crossed my fingers. h) When the server came back up, and all tests worked well, I un-did the triage equipment and re-routed everything to the previous system. All's well. Ah, the day and the life of David. If you're system admin or deal with this kinda thing day-to-day like I do, have a beer for me, this was one for the ages!
 
MacApple
Apple Fan
Profile
Posts: 4675
Reg: Oct 25, 2010
USA
61,150
like
09/14/15 10:32 AM (9 years ago)
You are the man! You know I'll have a beer for you.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
09/14/15 10:39 AM (9 years ago)
Man, you are a true ninja! Heck, I'll have a case of beer ready for you! Mark
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
09/14/15 11:01 AM (9 years ago)
How good do you think tls certs from letsencrypt.org will be??
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
09/14/15 11:54 AM (9 years ago)
Jesus. Take a day off, or a week, you deserve it. Nice!
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
09/14/15 01:22 PM (9 years ago)
YOU ROCK, DAVID!
 
torkliftmatt
Aspiring developer
Profile
Posts: 19
Reg: Dec 15, 2010
kent, washingto...
790
like
09/14/15 01:32 PM (9 years ago)
In the simulator, I'm still getting the issue of downloading. yet my app on my phone works fine. Anyone have any ideas? Trying to update my app to iOS 9.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
09/14/15 01:34 PM (9 years ago)
@torkliftmatt - Have you checked the Debug Console to see what the issue might be? That'd be the best place to start. Mark
 
torkliftmatt
Aspiring developer
Profile
Posts: 19
Reg: Dec 15, 2010
kent, washingto...
790
like
09/14/15 01:34 PM (9 years ago)
BT_loadConfigDataViewController: the download process reported an error?: ERROR-1968: Code: -1200 Description: An SSL error has occurred and a secure connection to the server cannot be made. Anyway I can fix this in the simulator?
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
09/14/15 01:35 PM (9 years ago)
Hmmm. Try a Product > Clean, and delete the current app off the simulator. That might take care of any caching issues.
 
torkliftmatt
Aspiring developer
Profile
Posts: 19
Reg: Dec 15, 2010
kent, washingto...
790
like
09/14/15 01:36 PM (9 years ago)
will do
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
09/14/15 01:36 PM (9 years ago)
Who cares about simulators? They are just development tools. If your app works fine on your phone and on your users' phones, just smile and be happy.
 
Tyroner
Aspiring developer
Profile
Posts: 175
Reg: Dec 26, 2012
Johannesburg, S...
4,200
like
09/14/15 01:36 PM (9 years ago)
Thanks David. My App is back on line! Now investigating self hosted.
 
torkliftmatt
Aspiring developer
Profile
Posts: 19
Reg: Dec 15, 2010
kent, washingto...
790
like
09/14/15 01:37 PM (9 years ago)
Deleted from simulator. Cleaned. Re-installed. Nothing. :)
 
torkliftmatt
Aspiring developer
Profile
Posts: 19
Reg: Dec 15, 2010
kent, washingto...
790
like
09/14/15 01:39 PM (9 years ago)
Im not complaining. Just wondering if anyone else is having issues with the simulator. I have iOS 9 and my app works fine from the previous IOS without any updating.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
09/14/15 01:39 PM (9 years ago)
Nothing as in no errors, or still errors? I'm assuming from the smiley face that you're error free now!
 
torkliftmatt
Aspiring developer
Profile
Posts: 19
Reg: Dec 15, 2010
kent, washingto...
790
like
09/14/15 01:40 PM (9 years ago)
It still does the same thing as before. Error in downloading. Console shows the SSL cert issue.
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
09/14/15 01:40 PM (9 years ago)
(sorry I'm slightly upset by some posts I've read about this transient issue, I should have been as kind as GoNorthWest, he's pretty right)
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
09/14/15 01:42 PM (9 years ago)
@torkliftmatt - Same error if you use a different iOS version in the simulator? Could be related to iOS9 (unless you have that on your phone as well). @fusionsch - I'm hearing ya...some of the earlier posts have me torked a bit as well. Mark
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
09/14/15 01:43 PM (9 years ago)
 
torkliftmatt
Aspiring developer
Profile
Posts: 19
Reg: Dec 15, 2010
kent, washingto...
790
like
09/14/15 01:44 PM (9 years ago)
Im downloading the beta of XCODE to see if its related to iOS 9.0 only, see how it does in 9.1
 
torkliftmatt
Aspiring developer
Profile
Posts: 19
Reg: Dec 15, 2010
kent, washingto...
790
like
09/14/15 01:52 PM (9 years ago)
No cigar on the last trick. Still looking for that ssl cert verification. So weird .
 
torkliftmatt
Aspiring developer
Profile
Posts: 19
Reg: Dec 15, 2010
kent, washingto...
790
like
09/14/15 01:55 PM (9 years ago)
Lets hope its a iOS 9 simulator issue only. I'll test on iOS 9.1 and see if it creates the same issues
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
09/14/15 02:00 PM (9 years ago)
Let us know what happens! You could also completely delete your project from Xcode and start from scratch. That way you're relatively sure nothing is cached somewhere that might be causing an issue. Mark
 
torkliftmatt
Aspiring developer
Profile
Posts: 19
Reg: Dec 15, 2010
kent, washingto...
790
like
09/14/15 02:15 PM (9 years ago)
Same issue on both simulators. 2015-09-14 14:07:33.436 torkliftcentral[4775:217352] BT_loadConfigDataViewController: the download process reported an error?: ERROR-1968: Code: -1200 Description: An SSL error has occurred and a secure connection to the server cannot be made. Super weird. I have deleted from Xcode. Started fresh. Deleted cached data. Everything I can think of. Cleaned, etc. Nothing works to get it to run in the simulator properly. I upgraded to iOS 9 on my 6 plus, and the app works as designed without issues. It has to be an apple thing or Xcode not recognizing the new SSL cert which is preventing it from downloading the new information.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
09/14/15 02:21 PM (9 years ago)
Well, that is indeed strange. In your config file you could change the dataURL to http instead of https and that should at least take care of it from a workaround perspective. Which, as long as you remember to change it back before you publish, should be good for development purposes. Mark
 
AppGuy30
Code is Art
Profile
Posts: 737
Reg: Oct 29, 2011
location unknow...
14,070
like
09/14/15 03:31 PM (9 years ago)
Awesome, it is back up. David you are the man! Props to you! My deepest apologies for any rude responses.
 
MrD500
I hate code!
Profile
Posts: 22
Reg: Mar 31, 2011
MIdwest
220
like
09/14/15 08:28 PM (9 years ago)
I actually had issues with my Android apps but everything is working now! Thank you David!
 
Tony @ Buzztouch
buzztouch Evangelist
Profile
Posts: 528
Reg: Mar 05, 2011
Saint Louis, Mi...
24,620
like
09/14/15 09:44 PM (9 years ago)
Thanks everyone for being so supported of the changes along the way! David works very hard to keep the engine running! David = Code Ninja Tony Buzztouch
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/14/15 11:22 PM (9 years ago)
@Tony, yes! Thought maybe you were in police-life-sucks-these-days-hiding. COP LIVES MATTER BABY! @torkliftmatt: iOS 9. Hmm...maybe saving us all some grief for when this the next gen of the worlds most awesome-tricky-finicky-strange-secure-unsecure-ghetto-draconian operating system in the worls is released on the poor unsuspecting public - officially. I do know that the SSL implementation in iOS is slightly different than how a "real browser" works. In theory it's all the same. In practice, not so much. The interesting thing is this...your SIMULATOR isn't running iOS, it's running an emulator and as such should be using SSL librarios from your Mac and not an actual device. I realize this is confusing but isn't everything. It should be the "same" on the device and on the simulator but as expected, nothing is ever that simple with that stuff. Server side (my world): I could talk for days and days on this but the basics revolve around what SSL / TLS. Reminder. SSL = Secure Socket Layers. TLS = Transport Layer Security. These two "ideas" work together to establish a secure, trusted connection between two devices. In this case a "browser" (your phone) and a server (Buzztouch). Your browser (or phone, aka, client) uses a version of TLS that must have a matching version on the server. Example: If server runs TLS 1.1 your devices uses TLS 1.1 when making SSL requests. Devices (browsers, phones, etc) support many version. Servers support as many versions as the developer (me) configure. For years and years it was TLS 1.1. Today servers sometimes have 1.1 and / or 1.2. My guess is that iOS 9 is FORCING server's to run a newly updated version of TLS. Which, in my opinion is a giant pain in the rear. A year or so ago there was a total-giant-internet-freakout when some SSL / TLS exploits were highly publicized. Remember the "Hearbleed vulnerability"? Some server admins and hardware manufacturers freaked out - as usual when anyone yells "security" or "hack" or "vulnerability" these days. Sigh. In most cases there is zero reason to freak out. But, toss in a few Target, US Gov., Ashly Madison, or other highly publicized hacks and, well, you get the idea. APPLE's notoriously difficult for BRAGGING about protecting their users and FORCING developers to do it their way or no way at all. It would'nt surprise me one bit if iOS 9 is forcing server-admins worldwide to pull their hair out and comply with some not yet published requirment to serve SSL content to their beloved iOS devices. Another big sigh. Your findings suggest this theory, which is soley mine, is accurate. Choose another rainy day in the future to ask me about my long list of APPLE THEORIES. I've got a ton of them. Most of them prove right about 8 months after my initial hunch. The backend that owns my life supports TSL 1.0, 1.1 and 1.2. I'll bet all the money I have (about $50 bucks) that iOS9 FORCES something other than TLS 1.2 which of course is insane in my opinion. Bottom line, I have NO clue why your simulator running iOS 9 doesn't work but your device does. And, as usual, all I can go on is a few hunches, suspicions, a ridiculous amount of experience with this type of thing and some fingers crossed. The rest is up to you :-) Peace.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/14/15 11:44 PM (9 years ago)
@torkliftmatt. FYI....You can add this to your BT_info.plist file if you think it'll help. It shouldn't change anything but it's worth a shot. Open it in a text editor and add... <key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>buzztouch.com</key> <dict> <key>NSIncludesSubdomains</key> <true/> <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> <true/> <key>NSTemporaryExceptionMinimumTLSVersion</key> <string>1.0</string> <key>NSTemporaryExceptionRequiresForwardSecrecy</key> <false/> </dict> </dict> </dict>
 
Crown Solutions
Aspiring developer
Profile
Posts: 463
Reg: Nov 11, 2011
MN
13,480
like
09/15/15 08:27 AM (9 years ago)
Sounds like a made for TV movie in the works... Killer work D, thanks for the effort. PS. next time you are in MN we can have a few beers on my boat. (sorry no sails on this one ;) )
 
torkliftmatt
Aspiring developer
Profile
Posts: 19
Reg: Dec 15, 2010
kent, washingto...
790
like
09/15/15 12:16 PM (9 years ago)
That fixed it David! Great work. Now it says the app can't download data to cache. Should be easy to fix hopefully. Thank you for all of the help :)
 
torkliftmatt
Aspiring developer
Profile
Posts: 19
Reg: Dec 15, 2010
kent, washingto...
790
like
09/15/15 07:31 PM (9 years ago)
BT_screen_pdfDoc: downloadFileCompleted: ERROR-1968: Code: -1022 Description: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection. 2015-09-15 19:26:44.285 torkliftcentral[6542:1280369] BT_fileManager: File does not exist in cached directory: "F544C105DD729A4EC807B37_screenData.pdf" 2015-09-15 19:26:44.285 torkliftcentral[6542:1280369] BT_screen_pdfDoc: Data Save Error 1: There was a problem saving a document: new error. Wont download the PDF from my database. IOS 9 is bring lots of issues to buzz touch. Be careful everyone!
 
Dasda
Apple Fan
Profile
Posts: 4
Reg: Sep 03, 2015
Istanbul
40
like
09/17/15 06:39 AM (9 years ago)
Download error with new ios 9.
 
Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
like
09/20/15 03:27 PM (9 years ago)
Not trying to be negative, just confirming that the issue is still there for iOS 9. Although iOS 8 is working fine now, the SSL error is still occurring on the simulator as well as on the device when building on iOS 9. Thanks a ton for the other fix! All of my iOS 8 apps are working now
 
New Techie
I hate code!
Profile
Posts: 26
Reg: Oct 12, 2011
location unknow...
4,560
like
11/02/15 02:10 PM (9 years ago)
Im having problems with my apps running with ios9 as well. Getting "problem downloading some required data. Try Again.
 

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.