title: New error in iOS 5: WebKit discarded an uncaught exception
body: <p>I am trying to load a <code>UIWebView</code> with the Facebook OAuth authorization URL and I am using the following code. When my <code>UIWebView</code> loads with Facebook login page, I enter my credentials, then press the "Log in" button. When I hit the button I am getting the following error:</p>
  
  <blockquote>
    <p>WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener:delegate:  Application tried to present modally an active controller .</p>
  </blockquote>
  
  <p>This same code works fine with iOS 4.3 and previous versions, but it doesn't work in iOS 5.0. I don't understand the problem, can anyone please help me?</p>
  
  <pre><code>NSString *redirectUrlString = @"http://www.facebook.com/connect/login_success.html";
  NSString *authFormatString = @"https://graph.facebook.com/oauth/authorize?client_id=%@&amp;redirect_uri=%@&amp;scope=%@&amp;type=user_agent&amp;display=touch";
  
  NSString *urlString = [NSString stringWithFormat:authFormatString, _apiKey, redirectUrlString, _requestedPermissions];
  NSURL *url = [NSURL URLWithString:urlString];
  
  NSLog(@"NSURL: %@", urlString);
  
  NSURLRequest *request = [NSURLRequest requestWithURL:url];
  [_webView loadRequest:request];
  </code></pre>