The FB.login dialog box does not close on Google Chrome


I'm calling FB.login() on a click event in my application. The dialog pops up as expected, but when the user is done logging into Facebook (and/or authorizing the app), the dialog does not close. Instead it loads a white page (inside the dialog) and the title changes to XD Proxy.

This only happens on Google Chrome (I'm using the latest version available right now for Windows 7).

This doesn't happen if Chrome is in Incognito mode.

The fb-login 'social plugin' works fine on Chrome.

To test/debug this further, I created a new Facebook App with vanilla settings. The only change I made was set the Site URL in the app settings. Here's HTML code that you can use to recreate this bug.

Sample Code for recreating issue

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Chrome Bug Test</title>
        <button onclick="dologin()">Login using Facebook</button>

        <div id="fb-root"></div>
        <script src=""></script>
            appId  : '[YOUR APP ID HERE]',
            status : true, // check login status
            cookie : true, // enable cookies to allow the server to access the session
            xfbml  : true  // parse XFBML

        <script type="text/javascript">
            function dologin(){
                    if(console && console.log) {


Facebook Settings that I've tried changing

  1. Setting a site domain, didn't change anything.
  2. Using a custom channelUrl and channel file, didn't help either.

Related bugs tracked at Facebook

Related issues here on Stack Overflow

  • Blank popup with FB connect
  • facebook connect blank pop up on chrome
  • Facebook Connect Login redirecting in Chrome and Safari
  • Facebook connect showing blank popup on login in Internet explorer 8
  • Facebook login popup window stays open when using Fb.login in IE
  • JS SDK FB.login() works but pop-up dialog is staying open after logged in
  • Facebook login hangs at "XD Proxy" when page is installed via Chrome Web Store
  • XD Proxy Facebook
  • XD_Proxy popup won't close

I've seen many people come across this, but what bugs me is that I haven't been able to find a concrete fix for this. Facebook hasn't responded to bug reports yet. One solution would be get rid of Javascript based authentication code and do it solely using serverside mechanism (Facebook PHP SDK). I'd like to avoid that due to time constraints.

Anyone have any ideas how to fix this?

I got a similar call to FB.login() to close the dialog box by changing



onclick="dologin(); return false;"