Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I have this issue where datastoreInfo.mtime
is nil
for some of my datastores. I would expect that it can never be nil. This is all the more curious that datastore.mtime
is never nil for the same datastore. This makes the mtime attribute unrealiable to use.
I have had this issue for several months now but never got round to reporting it/examining it deeply.
Caram
(main)> store
=> #<DBDatastore:0x111ea5680>
(main)> store.mtime
=> 2015-02-14 22:20:08 +0100
(main)> store.manager.listDatastoreInfo(nil).select{ |id, info| info.mtime == nil }.values.first.mtime
=> nil
iOS 8.1.3
XCode 6.1
SDK 3.1.2
The mtime
on both DBDatastore
and DBDatastoreInfo
can be nil
, per the documentation:
https://www.dropbox.com/developers/datastore/docs/ios#DBDatastore.mtime :
The last modified time for this datastore, or nil if no data has been synced yet.
https://www.dropbox.com/developers/datastore/docs/ios#DBDatastoreInfo.mtime :
The last modified time for this datastore, or nil if none is set.
The fact that one is nil
when the other isn't though is a little surprising. When does this happen exactly? Can you supply some sample code?
Also, are you sure you're looking at the same datastore in your output here? That is, store.mtime
, is referring to a specific datastore, but store.manager.listDatastoreInfo(nil).select
... seems to be looking for any DBDatastoreInfo
where mtime
is nil
.
Greg, yeap they are the same datastores; I did check, even though did not report all the command lines here. Sorry no sample code but the entire app, difficult to know when and why it did occur, but the result is still visible today in some datastore.
Is there anything I could to to provide you with more information for this datastore?
I would suspect a datastore
and listDatastoreInfo
are not looking at the same data struture and for some reason, in some unfortunate corner case, the time
attribute does not get copied across. But obviously I don't have the code to check this out. 😉
Thanks Caram. Some sample code and steps to reproduce this would be helpful. Also, sample output showing this happening with the same datastore, e.g., with a specific ID, may be useful.
Anyway, since both of these can be nil
, is it possible you're somehow just catching this before it was propagated to both places? When is this happening? I.e., when are you catching it in the debugger (per your above output)?
Also, just to confirm, you are always looking at mtime
and not "time", right? I just ask because you said "time" in your original question (which I fixed) but you did it again in this followup.
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!