Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi,
I have an embedded device that downlopads firmware updates over the air via the DropBox API. Downloads worked fine yesterday, and fail today. The code has not changed since then, and I even went back to a revision built a few months ago, and it fails in exactly the same way. I am using a Texas Instruments CC3200 processor. I use the TI library for the OTA process. It can list the files in the repository, but when I try to access them via the link provided the device just hangs. It subsequently reboots. Here is some diagnostic output from the process.
sl_extLib_OtaRun: call OtaClient_ConnectServer OTA server=api.dropbox.com
OtaClient_ConnectServer: http_connect_server api.dropbox.com
[00:00:11.0967] OTA run (0)
sl_extLib_OtaRun: OtaClient_UpdateCheck, vendorStr=3.2.0
OtaClient_UpdateCheck: call http_build_request /1/metadata/auto/
CdnDropbox_SendReqDir: uri=/2/files/list_folder
metadata file=/3.2.0/f00_sys_servicepack.sig, size=256
metadata file=/3.2.0/f43_sys_servicepack.ucf, size=31348
metadata file=/3.2.0/f80_sys_mcuimgA.bin, size=151300
metadata file=/3.2.0/f80_www_logo.png, size=18406
metadata file=/3.2.0/f80_www_main2.html, size=5830
sl_extLib_OtaRun: OtaClient_UpdateCheck, numUpdates=5
[00:00:12.0260] OTA run (0)
sl_extLib_OtaRun: OtaClient_GetNextUpdate: file=/3.2.0/f00_sys_servicepack.sig, size=256
OtaClient_ResourceMetadata: call http_build_request /1/media/auto
OtaClient_ResourceMetadata: file flags=0,metadata flags=0
OtaClient_ResourceMetadata: remove old signature file /sys/servicepack.sig
CdnDropbox_SendReqFileUrl: uri=/2/files/get_temporary_link
[00:00:12.0556] OTA run (0)
sl_extLib_OtaRun: ResourceMetadata CDN file URL = https://dl.dropboxusercontent.com/apitl/1/AAAPogfVrgUuU60x7jjBJL-jMrYmSHG0O8Gb_ReadFileHeaders: domain=dl.dropboxusercontent.com, file=/apitl/1/AAAPogfVrgUuU60x7jjBJL-jMrYmSHG0O8GbVwAf7iHMQOISR2yPAH3YGlgsUr
After the last line the device hangs until the system watchdog reboots it, then the process repeats. Any idea what I might be running into?
Thanks,
Vic Berry
Hello Greg,
We have tested and it works.
Could you please send me dropboxe's address using in a private message (info at gcdis.com)
I would like to send you and your team a gift for Christmas.
Also do not forget to mention the team member names for the Christmas cards.
Hi Greg,
Thank you and your Engineering team. We have tested the OTA on few Chips in field and it worked.
Embedded Devices are limited by memory and this device CC3200 has very tiny memory. It will be good to know the maximum size of link that Dropbox might implement in the future. We are thinking of allocating 1200 bytes.
Thank you Greg!
We are allocating 768 bytes for the temp link (up from 512).
For the other CC3200 users out there: it seems that increasing the size of OtaFileMetadata_t.cdn_url (on ota_api.h) is not enough! You can still get a memory leak on req_uri (in CdnClient_ConnectByUrl), as part of the temp link will be copied to this buffer which originally has 400 bytes!
We were able to find this leak just because, by chance, it was affecting a data structure holding proxy data, which breaks all communication!
If anyone knows of any other additional changes that have to be made in order to accommodate the larger Dropbox temp link please share here! Let's help each other out!
Thanks!
Hello Greg,
It seems that we are having problem again with the returned url, can you please check?
Kindly note that we did change our firmware update process to Amazon IoT but unfortunately we do have a significant number of users that did not update yet to the new firmware and are having issues because of the returned URL.
You can see for yourself that the API calls have been reduced noticeably. Nevertheless, as you already know, transition from one system to another is not linear as we don’t have the power to drive everyone in making the transition within the required time.
With this point in mind, we kindly ask for your understanding and support in returning links shorter for another 2 months. On our side we will put all our efforts in communicating a final notice to our customers so that they make the transition, thus eliminating api calls to dropbox prior to the expiration date.
George
@IOT_Developer Thanks for the report! I'll be happy to look into this for you, but I can't make any promises. First, for reference, can you let me know:
Thanks in advance!
@Greg-DB Thanks for your prompt response. The issue again is with the link returned.
It all started happening this monday. Before that it was less than 400 bytes and we suddenly see it crossing 512 bytes which is the limit.
@IOT_Developer Thanks! I'm not currently aware of anything that should have caused such an increase, and I also currently can't seem to reproduce that increase myself, nor have we received other reports of this, so we'll need to investigate this further. Would you be able to open an API ticket with additional details, e.g., a sample request and response (but please redact your access token), so we can investigate further? Thanks in advance!
Hello @Greg-DB ,
I did create a ticket.
It does not see as reuturn url issue any more though.
please check the log below:
_ReadStatFile: ERROR in sl_FsOpen, status=-11
sl_extLib_OtaRun: call OtaClient_ConnectServer OTA server=api.dropbox.com
OtaClient_ConnectServer: http_connect_server api.dropbox.com
sl_extLib_OtaRun: OtaClient_UpdateCheck, vendorStr=Folder
OtaClient_UpdateCheck: call http_build_request /1/metadata/auto/
CdnDropbox_SendReqDir: uri=/2/files/list_folder
metadata file=/FOLDER/FILE, size=129084
sl_extLib_OtaRun: OtaClient_UpdateCheck, numUpdates=1
sl_extLib_OtaRun: OtaClient_GetNextUpdate: file=/FOLDER/FILE, size=129084
OtaClient_ResourceMetadata: call http_build_request /1/media/auto
OtaClient_ResourceMetadata: file flags=80,metadata flags=80
CdnDropbox_SendReqFileUrl: uri=/2/files/get_temporary_link
L0IYOW2YPF1-gz-x0T0FpxLLXQd_5ftBFoz1het0tnYCziQ_9cAAi-5wuV7P4bJM_Suyry27j05t3uwTHxjBUru-LBuud9k", "has_more": false}
0
Cannot find json fileOtaClient_ResourceMetadata: Error media json_parse_media status=-1
sl_extLib_OtaRun ERROR: OtaClient_ResourceMetadata
@IOT_Developer Thanks! We'll look into it and follow up with you on your ticket shortly.
Hello @Greg-DB ,
the issue has been fixed.
I would like to thank you and Moe for your ultra fast response.
Once again Dropbox has prooven it's value and definately has prooven that stands behind it's products.
George
Hi there!
If you need more help you can view your support options (expected response time for a 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!