We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
personalizedrefrigerator
7 months agoExplorer | Level 4
GET request to /files/download fails with "The network connection was lost"
Hi, Our app uses Dropbox's HTTP API to upload and download files. Since a few days ago, some of our app's requests are failing with "The network connection was lost". This issue was first reported...
personalizedrefrigerator
7 months agoExplorer | Level 4
Hi,
The Joplin note taking app uses Dropbox's HTTP API to upload and download files. Since a few days ago, some of our its requests are failing with "The network connection was lost".
The failing request downloads files from Dropbox using a GET request to content.dropboxapi.com/2/files/download:
fetch(
"https://content.dropboxapi.com/2/files/download",
{
"headers": {
"Dropbox-API-Arg": "{\"path\":\"/info.json\"}",
"Authorization": "Bearer " + API_TOKEN,
"Content-Type": "application/octet-stream"
},
"method":"GET"
}
)
Sometimes, the above fetch does work. However, I can reproduce the failure consistently by sending the above request twice, but only in some environments:
- Running code from the Safari development tools, inspecting a WebView embedded in Joplin.
- Running code from the Chrome development tools, connected to React Native Hermes.
I can't reproduce this when using the same code in a NodeJS REPL or the Firefox JavaScript console.
The examples in the Dropbox documentation send POST rather than GET requests to files/download. Switching to a POST request does seem to fix the issue on Android. However, it still fails on iOS.
Another post on this forum suggests that fetch on iOS doesn't support sending POST requests with an empty body. Dropbox doesn't seem to allow a non-empty body for this request.
Is this forum the correct place to be asking for help with this issue? Is there a way to continue using a GET request to /files/download to download files?
Notes:
- The original version of this post was marked as spam, perhaps due to links to Joplin's source code and issue tracker. These links have been removed and can be provided on request.
- Joplin uses React Native 0.71. The issue still happens after upgrading to React Native 0.73.8.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 9 hours agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!