Dropbox chooser response is returning single file dictionary instead of array of files
Refer for full description : http://stackoverflow.com/questions/35336976/dropbox-chooser-crashing-in-ios
SInce the latest update of Dropbox for iOS, DBChooser is crashing in our app as well.
When calling
[[DBChooser defaultChooser] handleOpenURL:url]
where url is something like:
@db-XXXXXXXXXXX://1/chooser?...
we get:
2016-02-11 12:55:18.661 ninox-iphone[4872:2153982] -[NSTaggedPointerString objectForKeyedSubscript:]: unrecognized selector sent to instance 0xa007269645f736962016-02-11 12:55:18.662 ninox-iphone[4872:2153982] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString objectForKeyedSubscript:]: unrecognized selector sent to instance 0xa007269645f73696'*** First throw call stack:(0x183da1900 0x18340ff80 0x183da861c 0x183da55b8 0x183ca968c 0x1000b931c 0x1000b2484 0x1000b1b88 0x100076050 0x188d43528 0x188d42f98 0x188d4b360 0x188d51c34 0x188d51038 0x188d3b588 0x188d3b210 0x185357790 0x185357b10 0x183d58efc 0x183d58990 0x183d56690 0x183c85680 0x185194088 0x188afcd90 0x100085a0c 0x1838268b8)libc++abi.dylib: terminating with uncaught exception of type NSException
Hope this gets fixed soon, since I don't see any workaround.
After doing analasis we found it is because of files key is single element instead of array.
sample response :
URL response with latest dropbox chooser (version : 4.2.4) : db-8343b03llcys1pw://1/chooser?files={"link":"https://dl.dropboxusercontent.com/1/view/rsoof482pcg9d1m/Get%20Started%20with%20Dropbox.pdf","bytes":692088,"name":"Get Started with Dropbox.pdf","is_dir":false,"icon":"https://www.dropbox.com/static/images/icons64/page_white_acrobat.png","isDir":false,"thumbnails":{}}
URL response with dropbox chooser (version : 3.9) : db-8343b03llcys1pw://1/chooser?files=[{"is_dir":false,"thumbnails":{},"isDir":false,"link":"https://dl.dropboxusercontent.com/1/view/kdehqo4khfi0ifo/Getting%20Started.pdf","bytes":249159,"name":"Getting Started.pdf","icon":"https://www.dropbox.com/static/images/icons64/page_white_acrobat.png"}]
Thanks for the reports! We're aware of and working on this issue.
What is ETA for this fix? We have released Beta app using Dropbox chooser and it is crashing user hands. It is severely affecting our product. Tell us know what is the timeline for this fix?
This should be fixed now with version 4.2.5 of the official Dropbox iOS app.
Gregory, thanks for solving this quickly!
I can confirm that everything is working fine again.