Issue #14 new

DropBox Credential wizard fails

Anonymous created an issue

With this plugin installed, when I do:

Tools -> URL Credential Wizard -> Leave "DropBox" as only selection -> Next

It fails with "Error: Argument cannot be null. Parameter name: userLogin"

I didn't have any opportunity to enter a login. It seems like a bug?

The platform is mono 2.10.8 on Fedora 17.

Comments (25)

  1. DrPeterVC

    I too am getting this error with the latest versions of KeePass and KeeCloud. Strangely it only happens on my work computer (where I am not able to download dropbox and therefore need KeeCloud to work) but seems fine on my home computer (where I do not need it). Both are running Windows 7.

  2. DrPeterVC

    Many thanks for pointing me in the right direction. I have tried various combinations with the proxy (I know the address and port as it is needed for some other apps), automatic, none and manual (with the username and passsword that works for them and save and reboot between) - but sadly no joy for me :-(

  3. DrPeterVC

    "Help -> Check for update" works fine. But sadly I still have the original "Value cannot be null. Parameter name: userLogin" on the dropbox Credential Configuration screen :-(

  4. Chris Wynkoop

    All, I am using the same Mono version on Ubuntu 12.04, (platform is mono 2.10.8), and I get the same response. I built the project myself and found that the UserLogin is never set, how can I address this?

  5. Devin Martin repo owner

    Is everyone here who is having problems running Mono/*nix? I haven't seen this issue specifically on Windows/.net 4.5. I suspect I need to do a bit more testing and debugging on Mono.

  6. Enkidu70

    I am having the same issue on Windows Server 2008 R2. Proxy definition is fine (verified with "Check for update"). I use a proxy with un/pw. But trying to use URL Credential Wizard -> "DropBox" results in the error initially written above.

    Has anyone any idea for me?

  7. kellywt

    Same problem for me on three different computers (windows 7, Ubuntu w/ mono, and XP). Could this be a drop box issue?

    --EDIT--

    It seems to be a firewall/network issue. After connecting to an unrestricted VPN to avoid LAN restrictions it works like a charm.

  8. Haprog

    I have this same problem on a new install of Xubuntu 13.10, Mono 2.10.8.1 and the workaround mentioned by Jack Zhou doesn't work for me.

    Check for Update works like it should but the URL Credentials Wizard always fails with "Error: Argument cannot be null. Parameter name: userLogin" and there's no way to provide login credentials.

  9. Jack Zhou

    Haprog Unfortunately this error is generic, that is, it's the result of an underlying error being masked. If you are willing to recompile the plugin, you can apply the following diff to get it to tell you the real error:

    diff -r 71acba8635cc KeeCloud/Forms/FormCredentialWizard.cs
    --- a/KeeCloud/Forms/FormCredentialWizard.cs    Fri Oct 18 16:08:46 2013 -0600
    +++ b/KeeCloud/Forms/FormCredentialWizard.cs    Fri Dec 27 13:32:43 2013 -0800
    @@ -84,7 +84,7 @@
                             // catch
                         ecxeption =>
                         {
    -                        MessageBox.Show(ecxeption.Message, "Error");
    +                        MessageBox.Show(ecxeption.ToString(), "Error");
                             this.StartOver();
                         },
                             // finally
    @@ -123,7 +123,7 @@
                             // catch
                         ecxeption =>
                         {
    -                        MessageBox.Show(ecxeption.Message, "Error");
    +                        MessageBox.Show(ecxeption.ToString(), "Error");
                             this.StartOver();
                         },
                             // finally
    diff -r 71acba8635cc KeeCloud/Providers/Dropbox/DropboxCredentialConfigurationProvider.cs
    --- a/KeeCloud/Providers/Dropbox/DropboxCredentialConfigurationProvider.cs  Fri Oct 18 16:08:46 2013 -0600
    +++ b/KeeCloud/Providers/Dropbox/DropboxCredentialConfigurationProvider.cs  Fri Dec 27 12:24:07 2013 -0800
    @@ -9,15 +9,8 @@
    
             public InitializeResult Initialize()
             {
    -            try
    -            {
    -                this.authenticationClient.GetToken();
    -                return InitializeResult.Ok;
    -            }
    -            catch
    -            {
    -                return InitializeResult.Error;
    -            }
    +            this.authenticationClient.GetToken();
    +            return InitializeResult.Ok;
             }
    
             public Uri GetExternalAuthorizationUrl()
    @@ -27,15 +20,8 @@
    
             public CredentialClaimResult Claim()
             {
    -            try
    -            {
    -                var result = this.authenticationClient.GetAccessToken();
    -                return new CredentialClaimResult(result.Token, result.Secret);
    -            }
    -            catch
    -            {
    -                return new CredentialClaimResult();
    -            }
    +            var result = this.authenticationClient.GetAccessToken();
    +            return new CredentialClaimResult(result.Token, result.Secret);
             }
         }
     }
    

    The reason why this error shows up is as follows. First, FormCredentialWizard calls DropboxCredentialConfigurationProvider.Initialize(). It fails on DropNetClient.GetToken(), which is supposed to set UserLogin. However, FormCredentialWizard does not check the result of DropboxCredentialConfigurationProvider.Initialize() and calls DropboxCredentialConfigurationProvider.GetExternalAuthorizationUrl(), which in turn calls DropNetClient.BuildAuthorizeUrl(), which fails because userLogin is null.

  10. rujo

    Hi, I'm using KeePass 2.26 and KeeCloud 1.0.42 (from 2014-03-11) and this bug still occurs on my Windows 7. The proxy configuration is OK, verified by "Check for Update" (I don't use any proxy actually). What can I do? Has anyone from KeeCloud devs tried to do anything with it?

  11. rujo

    I applied the diff Jack Zhou has provided above and recompiled the plugin. The error message however isn't very helpful:

    DropNet.Exceptions.DropboxException: Exception of type 'DropNet.Exceptions.DropboxException' was thrown.
       at DropNet.DropNetClient.Execute(ApiType apiType, RestRequest request)
       at DropNet.DropNetClient.GetToken()
       at KeeCloud.Providers.Dropbox.DropboxCredentialConfigurationProvider.Initialize()
       at KeeCloud.Forms.FormCredentialWizard.<buttonNext_Click>b__0()
       at KeeCloud.Utilities.AsyncOperationWithSynchronizationContext.<Run>b__0()
    

    Also I noticed, that the plugin is using hardcoded "dummy" apikey and secret for dropbox - should it be like that?

  12. Jack Zhou

    rujo You have to create your own API key as detailed here. That stack trace looks like it could be a result of using the wrong API key. You should recompile with the correct API key and try again.

  13. rujo

    I used my newly generated api key and still the same stack trace. The DropNet library isn't very descriptive in its exceptions.

  14. Jack Zhou

    rujo It looks like DropboxException has a Response member that stores the HTTP response from the server. Try putting breakpoints on the MessageBox.Show lines and look at the exception object in the debugger.

  15. rujo

    Jack Zhou thank you, I found it. KeeCloud is not respecting proxy settings in the KeePass, and tried to use the proxy server set in IE Internet settings even after setting the KeePass not to use the proxy at all. So whole KeePass worked OK without proxy, but KeeCloud tried to make connections through inaccessible proxy server. After disabling the proxy in the IE KeeCloud also started working.

  16. disconc

    Hi There, brand new(by) user, yet having the same problem, so unable to have the wizard register with dropbox... (in order to use dropbox for syncing) Windows XP, .Net 4, Keepass 2.27, KeeCloud 1.0.42, keepass database created and opened on hdd. When I go to Tools/URL Credential Wizard/Dropbox/Next... all I get is : "Error: Argument cannot be null. Parameter name: userLogin" I don't know how to compile stuff and I am stuck here, so can not sync to dropbox. Could you please help ? Thank you Regards Erik.

  17. Bill Chen

    same issue here.

    Win 7 64-bit, Keepass 2.27, KeeCloud 1.0.42

    I have changed IE's proxy (using sock5 proxy) and successfully show Dropbox.com webpage in IE. in Options - Advanced - Proxy, select Use system proxy settings

    but URL Credential Configuration failed to pop up a browser windows to prompt Dropbox login. It popped up the error "Error: Argument cannot be null. Parameter name: userLogin".

    Any workaround? thanks.

  18. Ben Deeming

    I have had this issue show up on two Linux machines now, one running 14.04, the other Linux Mint 17.1. Both were completely up to date software wise. The workaround for me on both was mozroots --import --ask-remove. The first machine stopped me running the wizard. The second machine (which I didn't have to run the wizard on) it prevented the actual sync from working - just got a popup message stating a DropboxException had been thrown, but no reason given.

  19. Log in to comment