Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Dropbox #6427

Closed
cyberduck opened this issue Dec 6, 2011 · 25 comments
Closed

Support Dropbox #6427

cyberduck opened this issue Dec 6, 2011 · 25 comments

Comments

@cyberduck
Copy link
Collaborator

@cyberduck cyberduck commented Dec 6, 2011

50478fa created the issue

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?

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Dec 7, 2011

@dkocher commented

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

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Dec 7, 2011

50478fa commented

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

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Dec 7, 2011

@dkocher commented

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.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Dec 7, 2011

@dkocher commented

#6418 closed as duplicate.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Dec 7, 2011

50478fa commented

Replying to [comment:3 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.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Jan 9, 2012

Laureen Jandroep commented

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

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented May 9, 2012

@dkocher commented

#6670 closed as duplicate.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented May 9, 2012

@dkocher commented

#6551 closed as duplicate.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented May 9, 2012

@dkocher commented

I can replicate this issue.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented May 9, 2012

@dkocher commented

#6660 closed as duplicate.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented May 16, 2012

@dkocher commented

#6684 closed as duplicate.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Oct 7, 2012

@dkocher commented

We have removed support for Dropbox in 6a1053a.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented May 19, 2013

f6f8d35 commented

Hi,

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

  1. patch the following to 8ae975d (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);
  1. Use this small script to obtain Access Token.
    https://www.dropbox.com/s/mj92ccgvwoit746/oauth_oob.pl

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

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

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented May 20, 2013

82f2515 commented

Replying to [comment:15 みらい そらの]:

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.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented May 20, 2013

f6f8d35 commented

Replying to [comment:16 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.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented May 20, 2013

@dkocher commented

Will reevaluate support for next major milestone.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented May 20, 2013

@dkocher commented

Replying to [comment:14 みらい そらの]:

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

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Aug 21, 2013

@dkocher commented

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

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Feb 18, 2015

@dkocher commented

We have no immediate plans to bring back support.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Jun 16, 2015

@dkocher commented

#8879 closed as duplicate.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Jun 16, 2015

f6f8d35 commented

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...

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Jun 16, 2015

f6f8d35 commented

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.

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Jan 16, 2016

@dkocher commented

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

Loading

@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Sep 7, 2016

@dkocher commented

In pull request 435.

Loading

@cyberduck cyberduck closed this Sep 7, 2016
@cyberduck
Copy link
Collaborator Author

@cyberduck cyberduck commented Oct 19, 2016

@dkocher commented

Milestone renamed

Loading

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants