Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2513] Webview does not follow redirects on iOS

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2011-04-15T03:21:40.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M05
ComponentsiOS
Labelsdefect, ios, release-1.6.0, webview
Reporterctredway
AssigneeBlain Hamon
Created2011-04-15T03:21:39.000+0000
Updated2017-03-02T20:59:14.000+0000

Description

See this HD ticket:
http://developer.appcelerator.com/helpdesk/view/58771">http://developer.appcelerator.com/helpdesk/view/58771

Basically this url: http://blog.peirce.edu/feeds/posts/default?alt=rss">http://blog.peirce.edu/feeds/posts/default?alt=rss redirects to this url: http://feeds.feedburner.com/PeirceConnections">http://feeds.feedburner.com/PeirceConnections

This error is generated in Ti Developers console:
[ERROR] Error loading: , Error: Error Domain=WebKitErrorDomain Code=102 "Frame load interrupted" UserInfo=0x6b3ab30 {NSErrorFailingURLKey=http://feeds.feedburner.com/PeirceConnections">http://feeds.feedburner.com/PeirceConnections, NSErrorFailingURLStringKey=http://feeds.feedburner.com/PeirceConnections">http://feeds.feedburner.com/PeirceConnections, NSLocalizedDescription=Frame load interrupted}

Tested on iOS 4.2,4.1 with Ti SDK 1.4.3 & 1.5

Comments

  1. szul 2011-04-15

    To elaborate on this issue, my primary concern isn't with the redirect from the RSS feed to FeedBurner, but with the proxy URL's that exist inside of the FeedBurner feed. To summarize the HD ticket mentioned above, I loop through the items in the FeedBurner feed to create a table view containing the titles of the blog posts. Onclick of the table view creates a modal window that pans up on the iPad containing a web view that loads the URL associated with each item in the RSS feed. This URL contains tracking information. Once FeedBurner registers that tracking information, it redirects to the actual blog post URL. This is where the URL is failing to redirect - on the individual item.

  2. Blain Hamon 2011-04-15

    After some investigating, the issue isn't redirects. It turns out that it's redirecting fine. I was able to recreate the issue outside of titanium, even without a redirect (IE, requesting the url directly), and the frame load bug still persisted.

    It's because the iPhone does not have an RSS reader built-in to the webView.

    When you put the url into Safari, it redirects to http://reader.mac.com/mobile/v1/http%3A%2F%2Ffeeds.feedburner.com%2FPeirceConnections"> http://reader.mac.com/mobile/v1/http%3A%2F%2Ffeeds.feedburner.com%2... that decodes and makes an HTML page with the RSS's contents. If you try to enter this url in a native web view (IE, even outside Titanium with Apple's default useragent), you'll be greeted with a page blocking access.

    In short, the redirect works, but an RSS viewer is not implemented by Apple for use in an iPhone app. The RSS parsing and presentation is left to the developer.

  3. szul 2011-04-15

    Can you verify that this problem exists in conjunction with my comments directly under the initial post? This issue came from my HelpDesk ticket, and isn't actually with the initial URL and redirect, but instead the URL's that exist inside of the RSS feed. I am able to consume the RSS feed and display a table view with excerpted content; however, the link URL that is present for each RSS item entry is a Google/Feedburner URL that redirects to the actual HTML blog post on the Internet. It is this redirect that is actually causing me an issue.

  4. Blain Hamon 2011-04-15

    Okay, I tried again, this time with viewing the RSS in a desktop browser, then copying the URLs contained within. E.g.,

       var win = Titanium.UI.currentWindow;
       var webby = Ti.UI.createWebView({url:'http://feedproxy.google.com/~r/PeirceConnections/~3/uL-Ou178TcQ/career-resolutions-for-2011.html'});
       win.add(webby);
       

    The page loaded fine for me. Is this what you mean?

  5. szul 2011-04-15

    Yes. What version of the Titanium mobile SDK are you using? This was an issue for me in 1.4.2, 1.4.3 and 1.5 prior to the official 1.5 release. As a workaround, I used the feed URL that the marketing people delivery to Feedburner rather than the Feedburner URL. If your SDK is greater than the 1.5 pre-release that was used when this ticket was first created, then feel free to close this ticket as fixed. I'll rewrite my code to use the FeedBurner URL the next chance I get and use the HelpDesk if any issues arise.

  6. Lee Morris 2017-03-02

    Closed as invalid.

JSON Source