andreafabrizi / Dropbox-Uploader

Dropbox Uploader is a BASH script which can be used to upload, download, list or delete files from Dropbox, an online file sharing, synchronization and backup service.
https://www.andreafabrizi.it/2016/01/01/Dropbox-Uploader/
GNU General Public License v3.0
6.57k stars 1.08k forks source link

dropbox_uploader does not work any more #498

Open Ghaz75 opened 4 years ago

Ghaz75 commented 4 years ago

I confirm that due to some change in the security patches of dropbox service, your script does not work anymore as developer app since September 2019. If you kindly update it. Thanks

Rubenkl commented 4 years ago

Not true, still see everything being uploaded..

tjluoma commented 4 years ago

I'm not sure, but it sounds like what @Ghaz75 might be saying is not that existing "developer apps" using dropbox_uploader but that it is no longer possible to create NEW "developer apps" using dropbox_uploader?

I could imagine Dropbox making such a change but "grandfathering" in existing apps / setups.

weichenusqq commented 4 years ago

I have try so many time with dropbox_uploader upload command and it never ask for my api key. Doesn't it mean the original script no longer work?

Ghaz75 commented 4 years ago

Not true, still see everything being uploaded..

If you remove your developer api and install it from scratch it will not work. In fact since September 2019 my dropbox_uploader.sh stopped uploading the files. I deleted my App online and reconfigure all the credentials from scratch. I got new App key. I even removed the dropbox_uploader and reinstalled it from scatch in two of my RPis with different App keys. Now it never connects with the host. This issue is still there and its April 2020. I am specifically talking about using it on RPis I never tried on any other machine. Its status is that it is not connected with the host, what to talk about second stage that is uploading.

Ghaz75 commented 4 years ago

Someone told me that now dropbox requires mime type to be mentioned somewhere in the configuration for App as it is in the case of OAuth2 of Google Drive.

syto203 commented 4 years ago

still works as of writing this comment. tested with a new account.

averissimo commented 4 years ago

Just tried it and can confirm what syto203 said.

New account with latest repository. I was having problems, but it was due to having a 2 year old version of the uploader.

garrettboone commented 4 years ago

@Ghaz75 Is it possible that uploading failed due to the changes in Dropbox's policy regarding symlinks? That happened in the Fall around the time you noted.

Ghaz75 commented 4 years ago

I am still unable to use it in my three machines and two Raspberry Pis 2 & 3. My entire network was ok till September last year and since then it has refused to get token access. I uninstalled Dropbix_uploader and then fetch the latest repository made new Api, generated new key but it does not work anymore. So I switched myself to Googledrive Api

Get Outlook for Androidhttps://aka.ms/ghei36


From: Garrett Boone notifications@github.com Sent: Thursday, April 30, 2020 5:59:28 AM To: andreafabrizi/Dropbox-Uploader Dropbox-Uploader@noreply.github.com Cc: Ghaz75 ghazanfar.ali@live.com; Mention mention@noreply.github.com Subject: Re: [andreafabrizi/Dropbox-Uploader] dropbox_uploader does not work any more (#498)

@Ghaz75https://github.com/Ghaz75 Is it possible that uploading failed due to the changes in Dropbox's policy regarding symlinks? That happened in the Fall around the time you noted.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/andreafabrizi/Dropbox-Uploader/issues/498#issuecomment-621549981, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AINA4BJUHVHXO5X4ZVMXS5TRPDEPBANCNFSM4MDNENQQ.

aredon commented 4 years ago

Similar issue here. Have a fresh install of dropbox_uploader, created a new access token, all queries end in "FAILED". Did anyone figure out a solution?

biounix commented 4 years ago

https://github.com/andreafabrizi/Dropbox-Uploader/issues/508#issuecomment-665932552

anthonyirwin82 commented 4 years ago

https://github.com/andreafabrizi/Dropbox-Uploader/issues/508#issuecomment-673446650 you need to use the dropbox legacy api for this to work

Ghaz75 commented 4 years ago

#508 (comment) you need to use the dropbox legacy api for this to work

Dear can you please tell me how to use legacy api when google has upgraded its api

anthonyirwin82 commented 4 years ago

When you create a new app it asks you which API you want to use. There are 3 options one of which is Dropbox legacy API.

schusz commented 4 years ago

I am using version 1.0. On one Mac it is working, and on another Mac it is not working and I get the message No such file or directory: /filename.txt

The file is in the root of my Dropbox.

I use it like this: /usr/local/Cellar/dropbox-uploader/1.0/bin/dropbox_uploader.sh download filename.txt /Users//Downloads/

I have 2 different Dropbox access codes, one for each Mac, created with Dropbox Legacy API.

On the first Mac I installed Dropbox-Uploader for the first time. Long after September 2019. It is still working.

Why can it not be working on my other Mac with exactly the same script?

tjluoma commented 4 years ago

On both Macs you should have a file in your home folder called .dropbox_uploader.

I use the same .dropbox_uploader on all of my computers and it works fine, so I would try copying it from the computer where it is working to the one where it is not, and see if that helps.

schusz commented 4 years ago

I tried that.

Unloaded the access token. Removed all files. Downloaded dropbox_downloader.sh to my home folder. (BTW: on Mac the file has no dot in front of the name) Created file dbuploader.command with this content so bash is used instead of Catalina's default shell zsh:

#!/bin/bash
/Users/username/dropbox_uploader.sh download filename.txt /Users/Downloads/

Double-clicking this, opens Mac's Terminal.app.

I have it setup exactly the same on my other Mac. It works there, but still not on my other Mac.

I also tried copying the files from the Mac where they work, to no avail.

If it's helpful, I can post the debug log here.

schusz commented 4 years ago

OK. I removed all dropbox-uploader related files and downloaded the file with curl, to my home folder. Ran$./dropbox_uploader.sh, and prompt to enter access code appeared. Created access code on https://www.dropbox.com/developer/apps, using Dropbox Legacy API (deprecated), and entered that in the prompt. then ran $ ./dropbox_uploader.sh download filename.txt /Users/myusername/Downloads Result:

No such file or directory: /filename.txt Some error occured. Please check the log.

Exact same setup as my other Mac (both macOS 10.15.6 Catalina.

I am giving up, unless someone —will be highly appreciated— can make sense of this debug log:

username@hostname ~ % ./dropbox_uploader.sh -d download 'filename.txt' /Users/username/Downloads

1.0 Darwin hostname.internal.salesforce.com 19.6.0 Darwin Kernel Version 19.6.0: Thu Jun 18 20:49:00 PDT 2020; root:xnu-6153.141.1~1/RELEASE_X86_64 x86_64

  • RESPONSE_FILE=/tmp/du_resp_debug
  • [[ '' == '' ]]
  • BIN_DEPS='sed basename date grep stat dd mkdir curl'
  • CURL_BIN=curl
  • which sed basename date grep stat dd mkdir curl
  • [[ 0 != 0 ]]
  • which readlink
  • [[ 0 == 0 ]] ++ readlink -m //test
  • [[ '' == \/\t\e\s\t ]]
  • HAVE_READLINK=0
  • builtin printf ''
  • [[ 0 == 0 ]]
  • PRINTF='builtin printf'
  • PRINTF_OPT='-v o'
  • [[ -e /Users/username/.dropbox_uploader ]]
  • source /Users/username/.dropbox_uploader
  • [[ '' != '' ]]
  • [[ '' != '' ]]
  • [[ 2aosde0y23yavs4 = '' ]]
  • COMMAND=download
  • ARG1=filename.txt
  • ARG2=/Users/username/Downloads
  • let argnum=4-2
  • case $COMMAND in
  • [[ 2 -lt 1 ]]
  • FILE_SRC=filename.txt
  • FILE_DST=/Users/username/Downloads
  • db_download /filename.txt /Users/username/Downloads ++ normalize_path /filename.txt +++ builtin printf /filename.txt ++ path=/filename.txt ++ [[ 0 == 1 ]] ++ echo /filename.txt
  • local SRC=/filename.txt ++ normalize_path /Users/username/Downloads +++ builtin printf /Users/username/Downloads ++ path=/Users/username/Downloads ++ [[ 0 == 1 ]] ++ echo /Users/username/Downloads
  • local DST=/Users/username/Downloads ++ db_stat /filename.txt +++ normalize_path /filename.txt ++++ builtin printf /filename.txt +++ path=/filename.txt +++ [[ 0 == 1 ]] +++ echo /filename.txt ++ local FILE=/filename.txt ++ [[ /filename.txt == \/ ]] ++ curl -X POST -L -s --show-error --globoff -i -o /tmp/du_resp_debug --header 'Authorization: Bearer 2aosde0y23yavs4' --header 'Content-Type: application/json' --data '{"path": "/filename.txt"}' https://api.dropboxapi.com/2/files/get_metadata ++ check_http_response ++ CODE=0 ++ case $CODE in ++ grep -q '^HTTP/[12]. 400' /tmp/du_resp_debug +++ sed -n -e 's/{"error": "([^"])"}/\1/p' /tmp/du_resp_debug ++ ERROR_MSG= ++ case $ERROR_MSG in +++ sed -n 's/{".tag": "([^"])".*/\1/p' /tmp/du_resp_debug ++ local TYPE= ++ case $TYPE in ++ echo ERR
  • TYPE=ERR
  • [[ ERR == \D\I\R ]]
  • [[ ERR == \F\I\L\E ]]
  • print ' > No such file or directory: /filename.txt\n'
  • [[ 0 == 0 ]]
  • echo -ne ' > No such file or directory: /filename.txt\n'

    No such file or directory: /filename.txt

  • ERROR_STATUS=1
  • return
  • remove_temp_files
  • [[ 1 == 0 ]]
  • [[ 1 -ne 0 ]]
  • echo 'Some error occured. Please check the log.' Some error occured. Please check the log.
  • exit 1 username@hostname ~ %
jackiboy commented 4 years ago

The script still works for uploading with new apps. What you need to do is set the Access token expiration to no expiration. image