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.56k stars 1.08k forks source link

where is log file #509

Open SBFRF opened 4 years ago

SBFRF commented 4 years ago

when i am trying to do things i get a fail, with directions to check a log, the log file is not in the local directory (where i'm working) or in the ~/Dropbox-Uploader/ directory. Where would i find said log?

~/Dropbox-Uploader/dropbox_uploader.sh mkdir NormBase2
 > Creating Directory "/NormBase2"... FAILED
Some error occured. Please check the log.
biounix commented 4 years ago

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

aaronmweiss commented 4 years ago

I too am receiving this error, and I'd expect better documentation for this.

lbcard commented 4 years ago

Not sure where the log file is either but I had this 'Some error occurred' issue and saw a user fixed this on #501 by unlinking then regenerating a new key. This worked for me.

sgbeal commented 4 years ago

To second that: deleting my (ancient) app (created only for this purpose years ago) and recreating it with new settings also solved it.

Also important is a detail i initially overlooked in the setup: the "App Key" is not the key that this tool needs. Be sure to, in the Dropbox App Console, use the "Generate access token" option to get a key. That much longer ID is the one these tools need.

Edit: even so, i'd still like to know where this mysterious log file is.

sbf- commented 4 years ago

AFAIK there is no log, but when you execute the script in debug mode (-d) there is some useful information in the response file:

$ cat /tmp/du_resp_debug
HTTP/1.1 100 Continue

HTTP/1.1 401 Unauthorized
Server: envoy
Date: Thu, 24 Sep 2020 19:33:07 GMT
Content-Type: application/json
Www-Authenticate: Bearer realm="Dropbox-API"
Content-Security-Policy: sandbox allow-forms allow-scripts
X-Dropbox-Request-Id: fa273c72916c4d6c8f31e24ec01d905d
X-Robots-Tag: noindex, nofollow, noimageindex
Strict-Transport-Security: max-age=15552000; includeSubDomains
X-Robots-Tag: noindex, nofollow, noimageindex
Vary: Accept-Encoding
Transfer-Encoding: chunked

{"error_summary": "invalid_access_token/..", "error": {".tag": "invalid_access_token"}}
sgbeal commented 4 years ago

For the sake of those stumbling across this ticket while looking for the mythical log, here's a second mistake i tripped over which lead to the invalid access token: Dropbox's dev console offers 2 styles of access token: short-lived and permanent. That toggle must be selected before generating the token or the default (short-lived) token only lives for 48 hours (or some similarly brief time). If you don't do that, your access will work today and then mysteriously fail a couple of days later, with no immediate indication as to why, barring use of the -d debug flag.