Uppy fails with Dropbox

I start receiving errors from Dropbox providers:
“Error: request to dropbox returned 400”
“provider.dropbox.size.error Error: request to dropbox returned 400”
Its occurs when click to upload the selected Dropbox files.
Anyone can help me?
Thanks in advance

This seems like an unusual issue. From the looks of it, you are already able to list your dropbox files, but this error occurs when you are trying to upload the file because companion is not able to get the file size from dropbox.

What kind/format of file is this particular file that you are trying to upload? Could you try and see if the problem persists with other files in other formats(e,g mp4, jpg)? Also, if it’s not confidential, could you share that specific file, to see if the problem can be reproduced? Otherwise, I could also guess that this might have been a temporary issue from dropbox’s end.

Reopening this old issue – just encountered it today after revisiting getting Dropbox to work.

Front end:
"@uppy/dropbox": "^1.4.9",

@uppy/companion": "^1.13.2

and the error:

::ffff: - - [20/Jul/2020:19:56:19 +0000] "OPTIONS /dropbox/get/get%20started%20with%20dropbox.pdf HTTP/1.1" 200 4 "http://localhost:3000/dashboard" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36"
companion: 2020-07-20T19:56:19.090Z [info] companion.client.version uppy client version @uppy/companion-client=1.5.1
companion: 2020-07-20T19:56:19.198Z [error] provider.dropbox.size.error ProviderApiError: request to dropbox returned 400
::ffff: - - [20/Jul/2020:19:56:19 +0000] "POST /dropbox/get/get%20started%20with%20dropbox.pdf HTTP/1.1" 424 45 "http://localhost:3000/dashboard" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36"

That’s on the “Getting Started” Dropbox file they seed new accounts with. Errors on all pdfs tried. Does it on .png I tested as well. Same issue – can connect app, can browse files, but error occurs on fetching metadata from Dropbox.

I wonder what’s up with my config if this is working OK for others?

I set up a quick example to test this, and I was fine. I used the @uppy/companion for my companion, Dropbox with uppy, and setup my own very simple XHR Server.

The end result of this is that it worked. From the error that you’ve provided, there seems to be an issue in getting the file from Dropbox. This could be an issue with Dropbox’s API, but that is unlikely. However, I cannot be too sure.

Are you able to provide some code snippets from the Uppy site and especially the Companion server?
- Andrew

Revisited this issue and posting here in case others run into the problem.

The error was a red herring and threw me down the wrong path. I figured out that it was an nginx proxy config issue that was preventing the dropbox integration from fully working. Weird.

I have nginx in front of companion. Here’s the post that helped me sort out the config:

The OP was having an issue, but their config is correct for nginx+companion.

No more error!