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
Explorer | Level 4
Thank you for checking!
> I just tried it out, and confirmed that the API is still allowing both GET and POST for this endpoint in my testing
Locally, I only experience the issue when sending a GET request for the same file two or more times. The first request is successful, but subsequent requests fail, until another file is requested.
> We'd be happy to look into it further on our side to see if there's something we can do about it from the Dropbox server side, but it's unclear what the issue is exactly so far. Is there a way you could enable some more verbose output (similar to -v for curl above) to gather more information about how exactly the request is failing in the affected environments?
I'm not sure how to do this for React Native. As commented above, I was able to reproduce part of the issue in Safari/iOS. I'm attaching screenshots of the "network" tab for a failing and passing GET request in this environment.
Edit: It may be necessary to click on the image above to view it with greater resolution.
Note that I can't reproduce the POST issue in Safari.
Greg-DB
7 months agoDropbox Staff
Thanks! It looks like there's no response received. In cases like that, we'd need to refer to the network client error to see why that failed (e.g., DNS issue, timeout, etc.). It doesn't look like there's much there though, unfortunately. I do see the "TypeError: Load failed". Is there any additional information there if you expand those two dropdown arrows next to that? And is there anything in the "Preview" tab?
- personalizedrefrigerator7 months agoExplorer | Level 4
The "Preview" tab shows an error message:
The dropdown by "TypeError: Load failed" similarly doesn't show additional information.
The right-click menu for the failed request has options that might be helpful:
"Copy HTTP request":GET /2/files/download Authorization: Bearer TOKEN_HERE Content-Type: application/octet-stream Origin: https://js-draw.web.app Referer: https://js-draw.web.app/ Accept: */* Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: cross-site User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15 Dropbox-API-Arg: {"path":"/info.json"}
"Copy HTTP response":
NaN null
"Copy as cURL":
curl 'https://content.dropboxapi.com/2/files/download' \ -X 'GET' \ -H 'Authorization: Bearer [[token]]' \ -H 'Content-Type: application/octet-stream' \ -H 'Origin: https://js-draw.web.app' \ -H 'Referer: https://js-draw.web.app/' \ -H 'Accept: */*' \ -H 'Sec-Fetch-Dest: empty' \ -H 'Sec-Fetch-Mode: cors' \ -H 'Sec-Fetch-Site: cross-site' \ -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15' \ -H 'Dropbox-API-Arg: {"path":"/info.json"}'
Interestingly, the CURL request is successful when run multiple times in the MacOS terminal app.
I'm now trying to see if I can log network requests made by the iOS simulator (relevant Apple documentation).
- Greg-DB7 months agoDropbox Staff
Thanks for sharing that. Yes, unfortunately it doesn't look like there's anything else useful there.
Just to check, I also tried the curl command a few times but that also worked fine for me.
Logging the failing network requests themselves sounds like a good next step, so let us know if you're able to get anything from that.
- personalizedrefrigerator7 months agoExplorer | Level 4
> Logging the failing network requests themselves sounds like a good next step, so let us know if you're able to get anything from that.
Setting CFNETWORK_DIAGNOSTICS didn't give as much information as I had hoped. This is an excerpt relevant to the failed request:default 15:15:31.519737-0700 Joplin CFNetwork Diagnostics [3:272077] 15:15:31.519 { HTTPCookieStorage::copyCookiesForURL: <CFHTTPCookieStorage 0xredacted [0xredacted]> Request URL: https://content.dropboxapi.com/<redacted> MainDocument URL: null } [3:272077] default 15:15:31.519624-0700 Joplin CFNetwork Diagnostics [3:272076] 15:15:31.519 { AddCookies Continue: request GET https://content.dropboxapi.com/<redacted> HTTPProtocol: Task: 0xredacted } [3:272076] default 15:15:31.519507-0700 Joplin CFNetwork Diagnostics [3:272075] 15:15:31.519 { Vary Validation: (null) Evaluation: PASS Request: https://content.dropboxapi.com/<redacted> VaryHeader: Dropbox-API-Arg, Authorization } [3:272075] default 15:15:31.519387-0700 Joplin CFNetwork Diagnostics [3:272074] 15:15:31.519 { LoaderWhatToDo: (null) Request: https://content.dropboxapi.com/<redacted> CachePolicy: 0 WhatToDo: originload CreateToNow: 0.00093s } [3:272074] default 15:15:31.519254-0700 Joplin CFNetwork Diagnostics [3:272073] 15:15:31.519 { Vary Validation: (null) Evaluation: PASS Request: https://content.dropboxapi.com/<redacted> VaryHeader: Dropbox-API-Arg, Authorization } [3:272073] default 15:15:14.050982-0700 Joplin Task <redacted-task-id>.<10> resuming, timeouts(0.0, 604800.0) QOS(0x19) Voucher (null) default 15:15:14.050704-0700 Joplin CFNetwork Diagnostics [3:271985] 15:15:14.050 { HTTPCookieStorage::copyCookiesForURL: <CFHTTPCookieStorage 0xredacted [0xredacted]> Request URL: https://content.dropboxapi.com/<redacted> MainDocument URL: null } [3:271985] error 15:15:10.042740-0700 Joplin Task <C49036A5-617D-4742-B3E3-58641BD95148>.<9> finished with error [-1005] Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={_kCFStreamErrorCodeKey=57, NSUnderlyingError=0x600000c78060 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0xredacted [0xredacted]>{length = 16, capacity = 16, bytes = 0xredacted}, _kCFStreamErrorCodeKey=57, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <redacted-task-id>.<9>, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask <redacted-task-id>.<9>" ), NSLocalizedDescription=The network connection was lost., NSErrorFailingURLStringKey=https://content.dropboxapi.com/2/files/download, NSErrorFailingURLKey=https://content.dropboxapi.com/2/files/download, _kCFStreamErrorDomainKey=1} default 15:15:10.042500-0700 Joplin Task <redacted-task-id>.<9> summary for task failure {transaction_duration_ms=442, response_status=200, connection=8, reused=1, reused_after_ms=9620, request_start_ms=1, request_duration_ms=0, response_start_ms=440, response_duration_ms=0, request_bytes=179, response_bytes=96, cache_hit=true} default 15:15:10.042383-0700 Joplin CFNetwork Diagnostics [3:271970] 15:15:10.042 { Did Fail: (null) Loader: request GET https://content.dropboxapi.com/<redacted> Error: Error Domain=kCFErrorDomainCFNetwork Code=-1005 UserInfo={NSErrorPeerAddressKey=<private>, _kCFStreamErrorCodeKey=57, _kCFStreamErrorDomainKey=1} init to origin load: 0.000844955s total time: 0.442753s total bytes: 0 } [3:271970]
Many of the `<redacted>` sections above were removed by XCode or iOS.
Additionally, I notice that the above log includes "cache_hit=true".
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!