Cyberduck Mountain Duck CLI

#6427 closed feature (fixed)

Support Dropbox

Reported by: rhin Owned by: dkocher
Priority: normal Milestone: 5.2
Component: dropbox Version: 4.2
Severity: normal Keywords:
Cc: Architecture:
Platform:

Description

Fresh install of Dropbox Cyberduck connection profile with Cyberduck version 4.2 correctly asks for Dropbox login credentials first, then the API keys dialogue pane. I enter exactly the App key and App secret copied from my Dropbox account Developer page. Authorisation then fails with an error pane entitled 'Login failed' and in blue and underlined as a hyperlink 'Unauthorized'. The link address is 'unauthorised': not a valid URL.

Has anyone else noticed this behaviour?

Change History (32)

comment:1 Changed on Dec 7, 2011 at 10:48:29 AM by dkocher

Please post the transcript from the log drawer (⌘-L).

comment:2 Changed on Dec 7, 2011 at 1:33:46 PM by rhin

Log drawer shows [some values obfuscated]:

GET /0/token?email=admin%40<Dropbox user email address>&password=<password> HTTP/1.1 Authorization: OAuth oauth_consumer_key="<App key>", oauth_version="1.0", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1323264560", oauth_nonce="-3899957315948300361", oauth_signature="<alphanumeric code>" Host: api.getdropbox.com:443 Connection: Keep-Alive User-Agent: Cyberduck/4.2 (Darwin/11.2.0) (universal) HTTP/1.1 401 Unauthorized Server: nginx Date: Wed, 07 Dec 2011 13:24:37 GMT Content-Type: application/json Transfer-Encoding: chunked Connection: keep-alive

[END]

Version 0, edited on Dec 7, 2011 at 1:33:46 PM by rhin (next)

comment:3 follow-up: Changed on Dec 7, 2011 at 2:22:18 PM by dkocher

I don't see an error in the request other than the credentials might be wrong. Can you contact Dropbox Support for investigation of the authentiation failure on their side.

comment:4 Changed on Dec 7, 2011 at 2:22:28 PM by dkocher

#6418 closed as duplicate.

comment:5 in reply to: ↑ 3 Changed on Dec 7, 2011 at 4:02:17 PM by rhin

Replying to dkocher:

I don't see an error in the request other than the credentials might be wrong. Can you contact Dropbox Support for investigation of the authentiation failure on their side.

No go with Dropbox Support. Decision: leave Dropbox and use other services for now.

comment:6 Changed on Jan 9, 2012 at 1:12:04 PM by Laureen Jandroep

I am getting the same loop. Fresh install on a macbook pro. Triple checked creds.

comment:7 Changed on May 9, 2012 at 8:49:32 AM by dkocher

  • Component changed from core to dropbox
  • Owner set to dkocher

comment:8 Changed on May 9, 2012 at 8:58:10 AM by dkocher

#6670 closed as duplicate.

comment:9 Changed on May 9, 2012 at 8:58:19 AM by dkocher

#6551 closed as duplicate.

comment:10 Changed on May 9, 2012 at 9:00:35 AM by dkocher

I can replicate this issue.

comment:11 Changed on May 9, 2012 at 9:01:44 AM by dkocher

#6660 closed as duplicate.

comment:12 Changed on May 16, 2012 at 8:56:32 AM by dkocher

#6684 closed as duplicate.

comment:13 Changed on Oct 7, 2012 at 3:57:12 PM by dkocher

  • Resolution set to wontfix
  • Status changed from new to closed

We have removed support for Dropbox in r9661.

comment:14 follow-up: Changed on May 19, 2013 at 4:42:16 PM by みらい そらの

Hi,

Finally I was able to get API 1 support. Dropbox support was recovered.

  1. patch the following to r9660 (You will need to apply http://trac.cyberduck.ch/ticket/6768 workaround too).
    Index: source/ch/cyberduck/core/dropbox/client/AbstractHttpDropboxClient.java
    ===================================================================
    --- source/ch/cyberduck/core/dropbox/client/AbstractHttpDropboxClient.java	(revision 9660)
    +++ source/ch/cyberduck/core/dropbox/client/AbstractHttpDropboxClient.java	(working copy)
    @@ -73,7 +73,7 @@
         /**
          * This is set by Dropbox to indicate what version of the API you are using.
          */
    -    protected static final int API_VERSION = 0;
    +    protected static final int API_VERSION = 1;
     
         /**
          *
    @@ -111,7 +111,8 @@
          * @throws IOException
          * @throws OAuthException
          */
    -    public void authenticate(String key, String secret, String username, String password) throws IOException {
    +    public void authenticate(String key, String secret, String token_key, String token_secret) throws IOException {
    +/*
             String[] params = {"email", username, "password", password};
     
             OAuthConsumer consumer = new CommonsHttpOAuthConsumer(key, secret);
    @@ -133,7 +134,7 @@
                 log.info(String.format("Obtained Token Key:%s", token_key));
                 log.info(String.format("Obtained Token Secret:%s", token_secret));
             }
    -
    +*/
             auth = new Authenticator(key, secret,
                     this.getRequestPath("/oauth/request_token"), this.getRequestPath("/oauth/access_token"), this.getRequestPath("/oauth/authorize"),
                     token_key, token_secret);
    
  2. Use this small script to obtain Access Token.

https://www.dropbox.com/s/mj92ccgvwoit746/oauth_oob.pl

  1. Input the access token and secret as email and password, then consumer key and secret as "API Key".

PS. I attach OSX binary (patched r9660) (due to Xcode issue, only 10.7+ are supported) https://www.dropbox.com/s/oi5vblroi7vt19f/Cyberduck.app.zip

comment:15 follow-up: Changed on May 19, 2013 at 4:43:03 PM by みらい そらの

  • Resolution wontfix deleted
  • Status changed from closed to reopened

comment:16 in reply to: ↑ 15 ; follow-up: Changed on May 20, 2013 at 5:20:32 AM by acksyn

Replying to みらい そらの:

I am having the same issue on 10.7.5, even with the patched binary provided this morning. The provided script https://www.dropbox.com/s/mj92ccgvwoit746/oauth_oob.pl fails with this error:

Can't locate Data/Random.pm in @INC (@INC contains: /Library/Perl/5.12/darwin-thread-multi-2level /Library/Perl/5.12 /Network/Library/Perl/5.12/darwin-thread-multi-2level /Network/Library/Perl/5.12 /Library/Perl/Updates/5.12.3 /System/Library/Perl/5.12/darwin-thread-multi-2level /System/Library/Perl/5.12 /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level /System/Library/Perl/Extras/5.12 .) at /Volumes/Untitled 1/Users/Shared/Dropbox/Backups/Documents/Temp Storage/oauth_oob.pl line 5.

I entered a random string into the script manually, but then it gave the same error for oauth.pm.

log output:

GET /1/metadata/dropbox/?list=true HTTP/1.1
Authorization: OAuth oauth_consumer_key="[munged]", oauth_nonce="-1221737622392253864", oauth_signature="[munged]", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1369025247", oauth_token="[munged]", oauth_version="1.0"
Host: api.getdropbox.com:443
Connection: Keep-Alive
User-Agent: Cyberduck/4.2.2 (Mac OS X/10.7.5) (i386)
HTTP/1.1 401 Unauthorized
Server: nginx
Date: Mon, 20 May 2013 04:47:28 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
set-cookie: locale=en; expires=Sat, 19 May 2018 04:47:28 GMT; Path=/
pragma: no-cache
cache-control: no-cache
x-dropbox-http-protocol: None
x-frame-options: SAMEORIGIN

I've changed the webpage at http://trac.cyberduck.ch/wiki/help/en/howto/dropbox so that the words "this page is defunct" are much more noticeable. I read the whole page 3 times over the last 2 hours without noticing it until just now.

Last edited on May 20, 2013 at 5:25:18 AM by acksyn (previous) (diff)

comment:17 in reply to: ↑ 16 Changed on May 20, 2013 at 11:55:35 AM by みらい そらの

Replying to acksyn:

Can't locate Data/Random.pm in @INC (@INC contains: /Library/Perl/5.12/darwin-thread-multi-2level /Library/Perl/5.12 /Network/Library/Perl/5.12/darwin-thread-multi-2level /Network/Library/Perl/5.12 /Library/Perl/Updates/5.12.3 /System/Library/Perl/5.12/darwin-thread-multi-2level /System/Library/Perl/5.12 /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level /System/Library/Perl/Extras/5.12 .) at /Volumes/Untitled 1/Users/Shared/Dropbox/Backups/Documents/Temp Storage/oauth_oob.pl line 5.

You need to: cpan Data::Random Net::OAuth

Currently, due to Cyberduck's authenticate workflow fault, you need to input access token manually.
It seems there was /token endpoint which directly accepts email and password directly, but it has been removed. So browser-based OAuth must be used.
https://www.dropbox.com/s/mj92ccgvwoit746/oauth_oob.cgi is a CGI version, but you will need to prepare a web server with Net::OAuth...

Off topic: I have modified my fullname in personal preferences, but it isn't reflected.

comment:18 Changed on May 20, 2013 at 9:01:29 PM by dkocher

  • Milestone set to 4.4

Will reevaluate support for next major milestone.

comment:19 in reply to: ↑ 14 Changed on May 20, 2013 at 9:06:24 PM by dkocher

Replying to みらい そらの:

Thanks for the patch. Looks like we have to redo the OAuth exchange.

comment:20 Changed on Aug 21, 2013 at 12:41:21 PM by dkocher

  • Type changed from defect to enhancement

We have dropped support for Dropbox until we add support again with the new API available.

comment:21 Changed on Sep 20, 2013 at 4:54:36 PM by dkocher

  • Milestone 4.5 deleted

comment:22 Changed on Apr 30, 2014 at 1:15:02 PM by dkocher

  • Summary changed from Dropbox connection profile fails to authrorize to Dropbox connection profile fails to authorize

comment:23 Changed on Feb 18, 2015 at 1:59:01 PM by dkocher

  • Resolution set to wontfix
  • Status changed from reopened to closed

We have no immediate plans to bring back support.

comment:24 Changed on Jun 16, 2015 at 9:09:50 AM by dkocher

#8879 closed as duplicate.

comment:25 Changed on Jun 16, 2015 at 6:34:39 PM by みらい そらの

Sigh... I have changed core.jar to use dropboxapi.com rather than getdropbox.com. (You can find the three parts using grep easily) And now my special Cyberduck's Dropbox support is recovered.

I have also updated the Cyberduck.app.zip. Note that you need to delete current bookmark and reenter the account because of hostname update.

Remember, as described in https://trac.cyberduck.io/wiki/help/ja/howto/dropbox , token/secret (here, not email/password) in first box, consumer_key/secret in second box.

Well, now I could understand you, since this patch still depends on OAuth1, which is now deprecated...

comment:26 Changed on Jun 16, 2015 at 6:39:25 PM by みらい そらの

By the way, since my machine is now Yosemite, I cannot build objc part of Cyberduck anymore. I can still build the Java part, but building is getting harder and harder.

comment:27 Changed on Jan 16, 2016 at 12:30:45 PM by dkocher

  • Milestone set to 6.0
  • Resolution wontfix deleted
  • Status changed from closed to reopened

We should evaluate this again with Dropbox API v2 now available.

comment:28 Changed on Jan 16, 2016 at 12:31:19 PM by dkocher

  • Summary changed from Dropbox connection profile fails to authorize to Support Dropbox

comment:29 Changed on Jan 21, 2016 at 2:01:38 PM by dkocher

  • Type changed from enhancement to feature

comment:31 Changed on Sep 7, 2016 at 3:20:27 PM by dkocher

  • Resolution set to fixed
  • Status changed from reopened to closed

comment:32 Changed on Oct 19, 2016 at 2:17:19 PM by dkocher

  • Milestone changed from 6.0 to 5.2

Milestone renamed

Note: See TracTickets for help on using tickets.
swiss made software