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

Uploading Failed #323

Closed
MordiSacks opened this issue Sep 14, 2016 · 6 comments
Closed

Uploading Failed #323

MordiSacks opened this issue Sep 14, 2016 · 6 comments

Comments

@MordiSacks
Copy link

MordiSacks commented Sep 14, 2016

I can't upload any thing I get

... FAILED
An error occurred requesting /upload

I did a little inspection and I think the issue is that the quotes around the curl headers are missing

This is an echo of line 540 in dropbox_uploader.sh

curl -L -s -X POST -i --globoff -o /tmp/du_resp_24883 --header Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --header Dropbox-API-Arg: {"path": "/ovh/X/vpses/cmss/filesystem/2016-09-14-14-48-40/X_2016-09-14-14-48-43.tar.gz","mode": "overwrite","autorename": true,"mute": false} --header Content-Type: application/octet-stream --data-binary @/home/X_2016-09-14-14-48-43.tar.gz https://content.dropboxapi.com/2/files/upload

And this is the curl response

HTTP/1.1 400 Bad Request
Server: nginx
Date: Wed, 14 Sep 2016 11:44:50 GMT
Content-Type: text/plain; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Dropbox-Request-Id: XXXXXXXXXXXXX
X-Robots-Tag: noindex, nofollow, noimageindex

Error in call to API function "files/upload": Must provide HTTP header "Authorization" or URL parameter "authorization".

When I add quotes it seems to work.

@andreafabrizi
Copy link
Owner

If you echo the command, you won't see the quotes, but if you look at the code you can verify that the quotes are not missing.
Can you please try the testUnit.sh script? Can you also run the script in debug mode (-d) and send me the full output (remove your token before).

@MordiSacks
Copy link
Author

Thank'r your response, here is the output of debug mode

2016-09-18-13-56-13: Uploading X_2016-09-18-13-56-10.tar.gz to Dropbox
0.2
Linux cmss.triple.co.il 3.10.0-327.28.3.el7.x86_64 #1 SMP Thu Aug 18 19:05:49 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
\S
Kernel \r on an \m

+ 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
+ [[ /test == \/\t\e\s\t ]]
+ HAVE_READLINK=1
+ builtin printf ''
+ [[ 0 == 0 ]]
+ PRINTF='builtin printf'
+ PRINTF_OPT='-v o'
+ [[ -e /root/.dropbox_uploader ]]
+ source /root/.dropbox_uploader
+ [[ '' != '' ]]
+ [[ '' != '' ]]
+ [[ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX = '' ]]
+ COMMAND=upload
+ ARG1=X_2016-09-18-13-56-10.tar.gz
+ ARG2=ovh/X/vpses/cmss/filesystem//2016-09-18-13-56-08/
+ let argnum=4-2
+ case $COMMAND in
+ [[ 2 -lt 2 ]]
+ FILE_DST=ovh/X/vpses/cmss/filesystem//2016-09-18-13-56-08/
+ (( i=2+1 ))
+ (( i<4 ))
+ FILE_SRC=X_2016-09-18-13-56-10.tar.gz
+ db_upload X_2016-09-18-13-56-10.tar.gz /ovh/X/vpses/cmss/filesystem//2016-09-18-13-56-08/
++ normalize_path X_2016-09-18-13-56-10.tar.gz
+++ builtin printf X_2016-09-18-13-56-10.tar.gz
++ path=X_2016-09-18-13-56-10.tar.gz
++ [[ 1 == 1 ]]
+++ readlink -m X_2016-09-18-13-56-10.tar.gz
++ new_path=/home/X_2016-09-18-13-56-10.tar.gz
++ [[ z == \/ ]]
++ echo /home/X_2016-09-18-13-56-10.tar.gz
+ local SRC=/home/X_2016-09-18-13-56-10.tar.gz
++ normalize_path /ovh/X/vpses/cmss/filesystem//2016-09-18-13-56-08/
+++ builtin printf /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/
++ path=/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/
++ [[ 1 == 1 ]]
+++ readlink -m /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/
++ new_path=/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08
++ [[ / == \/ ]]
++ [[ 57 > 1 ]]
++ new_path=/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/
++ echo /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/
+ local DST=/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/
+ [[ ! -e /home/X_2016-09-18-13-56-10.tar.gz ]]
+ [[ ! -r /home/X_2016-09-18-13-56-10.tar.gz ]]
++ db_stat /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/
+++ normalize_path /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/
++++ builtin printf /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/
+++ path=/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/
+++ [[ 1 == 1 ]]
++++ readlink -m /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/
+++ new_path=/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08
+++ [[ / == \/ ]]
+++ [[ 57 > 1 ]]
+++ new_path=/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/
+++ echo /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/
++ local FILE=/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/
++ curl -X POST -L -s --show-error --globoff -i -o /tmp/du_resp_debug --header 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' --header 'Content-Type: application/json' --data '{"path": "/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/"}' https://api.dropboxapi.com/2/files/get_metadata
++ check_http_response
++ CODE=0
++ case $CODE in
++ grep -q 'HTTP/1.1 400' /tmp/du_resp_debug
+++ sed -n 's/{".tag": *"*\([^"]*\)"*.*/\1/p' /tmp/du_resp_debug
++ local 'TYPE={"error_summary": "path/malformed_path/.", "error": path'
++ case $TYPE in
++ echo ERR
+ TYPE=ERR
+ [[ ERR == \F\I\L\E ]]
+ [[ ERR == \E\R\R ]]
+ [[ / != \/ ]]
+ [[ ERR == \E\R\R ]]
+ [[ / == \/ ]]
++ basename /home/X_2016-09-18-13-56-10.tar.gz
+ local filename=X_2016-09-18-13-56-10.tar.gz
+ DST=/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08//X_2016-09-18-13-56-10.tar.gz
+ [[ -d /home/X_2016-09-18-13-56-10.tar.gz ]]
+ [[ -e /home/X_2016-09-18-13-56-10.tar.gz ]]
+ db_upload_file /home/X_2016-09-18-13-56-10.tar.gz /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08//X_2016-09-18-13-56-10.tar.gz
++ normalize_path /home/X_2016-09-18-13-56-10.tar.gz
+++ builtin printf /home/X_2016-09-18-13-56-10.tar.gz
++ path=/home/X_2016-09-18-13-56-10.tar.gz
++ [[ 1 == 1 ]]
+++ readlink -m /home/X_2016-09-18-13-56-10.tar.gz
++ new_path=/home/X_2016-09-18-13-56-10.tar.gz
++ [[ z == \/ ]]
++ echo /home/X_2016-09-18-13-56-10.tar.gz
+ local FILE_SRC=/home/X_2016-09-18-13-56-10.tar.gz
++ normalize_path /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08//X_2016-09-18-13-56-10.tar.gz
+++ builtin printf /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
++ path=/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
++ [[ 1 == 1 ]]
+++ readlink -m /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
++ new_path=/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
++ [[ z == \/ ]]
++ echo /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
+ local FILE_DST=/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
+ shopt -s nocasematch
++ basename /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
+ basefile_dst=X_2016-09-18-13-56-10.tar.gz
+ [[ X_2016-09-18-13-56-10.tar.gz == \t\h\u\m\b\s\.\d\b ]]
+ [[ X_2016-09-18-13-56-10.tar.gz == \d\e\s\k\t\o\p\.\i\n\i ]]
+ [[ X_2016-09-18-13-56-10.tar.gz == \.\d\s\_\s\t\o\r\e ]]
+ [[ X_2016-09-18-13-56-10.tar.gz == \i\c\o\n\\\r ]]
+ [[ X_2016-09-18-13-56-10.tar.gz == \.\d\r\o\p\b\o\x ]]
+ [[ X_2016-09-18-13-56-10.tar.gz == \.\d\r\o\p\b\o\x\.\a\t\t\r ]]
+ shopt -u nocasematch
++ file_size /home/X_2016-09-18-13-56-10.tar.gz
+++ stat --format=%s /home/X_2016-09-18-13-56-10.tar.gz
++ SIZE=41358945
++ '[' 0 -eq 0 ']'
++ echo 41358945
++ return
+ FILE_SIZE=41358945
++ db_stat /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
+++ normalize_path /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
++++ builtin printf /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
+++ path=/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
+++ [[ 1 == 1 ]]
++++ readlink -m /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
+++ new_path=/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
+++ [[ z == \/ ]]
+++ echo /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
++ local FILE=/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
++ curl -X POST -L -s --show-error --globoff -i -o /tmp/du_resp_debug --header 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' --header 'Content-Type: application/json' --data '{"path": "/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz"}' https://api.dropboxapi.com/2/files/get_metadata
++ check_http_response
++ CODE=0
++ case $CODE in
++ grep -q 'HTTP/1.1 400' /tmp/du_resp_debug
+++ sed -n 's/{".tag": *"*\([^"]*\)"*.*/\1/p' /tmp/du_resp_debug
++ local 'TYPE={"error_summary": "path/not_found/...", "error": path'
++ case $TYPE in
++ echo ERR
+ TYPE=ERR
+ [[ ERR != \E\R\R ]]
+ [[ 41358945 -gt 157286000 ]]
+ db_simple_upload_file /home/X_2016-09-18-13-56-10.tar.gz /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
++ normalize_path /home/X_2016-09-18-13-56-10.tar.gz
+++ builtin printf /home/X_2016-09-18-13-56-10.tar.gz
++ path=/home/X_2016-09-18-13-56-10.tar.gz
++ [[ 1 == 1 ]]
+++ readlink -m /home/X_2016-09-18-13-56-10.tar.gz
++ new_path=/home/X_2016-09-18-13-56-10.tar.gz
++ [[ z == \/ ]]
++ echo /home/X_2016-09-18-13-56-10.tar.gz
+ local FILE_SRC=/home/X_2016-09-18-13-56-10.tar.gz
++ normalize_path /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
+++ builtin printf /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
++ path=/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
++ [[ 1 == 1 ]]
+++ readlink -m /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
++ new_path=/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
++ [[ z == \/ ]]
++ echo /ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
+ local FILE_DST=/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz
+ [[ 0 == 1 ]]
+ CURL_PARAMETERS='-L -s'
+ LINE_CR=
+ print ' > Uploading "/home/X_2016-09-18-13-56-10.tar.gz" to "/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz"... '
+ [[ 0 == 0 ]]
+ echo -ne ' > Uploading "/home/X_2016-09-18-13-56-10.tar.gz" to "/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz"... '
 > Uploading "/home/X_2016-09-18-13-56-10.tar.gz" to "/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz"... + curl -L -s -X POST -i --globoff -o /tmp/du_resp_debug --header 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' --header 'Dropbox-API-Arg: {"path": "/ovh/X/vpses/cmss/filesystem/2016-09-18-13-56-08/X_2016-09-18-13-56-10.tar.gz","mode": "overwrite","autorename": true,"mute": false}' --header 'Content-Type: application/octet-stream' --data-binary @/home/X_2016-09-18-13-56-10.tar.gz https://content.dropboxapi.com/2/files/upload
+ check_http_response
+ CODE=0
+ case $CODE in
+ grep -q 'HTTP/1.1 400' /tmp/du_resp_debug
+ grep -q '^HTTP/1.1 200 OK' /tmp/du_resp_debug
+ print 'FAILED\n'
+ [[ 0 == 0 ]]
+ echo -ne 'FAILED\n'
FAILED
+ print 'An error occurred requesting /upload\n'
+ [[ 0 == 0 ]]
+ echo -ne 'An error occurred requesting /upload\n'
An error occurred requesting /upload
+ ERROR_STATUS=1
+ (( i++  ))
+ (( i<4 ))
+ remove_temp_files
+ [[ 1 == 0 ]]
+ exit 1

@andreafabrizi
Copy link
Owner

Could you please attach also the content of the file /tmp/du_resp_debug?

@MordiSacks
Copy link
Author

HTTP/1.1 100 Continue

HTTP/1.1 409 path/insufficient_space/..
Server: nginx
Date: Sun, 18 Sep 2016 10:56:28 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
X-Dropbox-Request-Id: XXXXXXXXXXXXXXXXXXXXXXXXXX
X-Robots-Tag: noindex, nofollow, noimageindex

{"error_summary": "path/insufficient_space/..", "error": {".tag": "path", "reason":{".tag": "insufficient_space"}, "upload_session_id": "XXXXXXXXX"}}

@andreafabrizi
Copy link
Owner

According with the error message, you don't have available space on your dropbox.

@MordiSacks
Copy link
Author

Yes, I see, my account was changed into a business account and then back to pro, something must have gone wrong. Thank you for your time, and great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants