Couldn't retrieve child elements from the server

Jul 17, 2013 at 12:06 PM
Edited Jul 17, 2013 at 12:08 PM
Hi All, I'm getting this error when trying to iterate(foreach loop) through a ICloudDirectoryEntry object.

"Couldn't retrieve child elements from the server"

Im pulling the ICloudDirectoryEntry object from dropbox
  ICloudDirectoryEntry folder = dropboxStorage.GetFolder(directory);
This code worked fine a day ago, now its breaking?

Any idea what i might be doing wrong? I'm very new to this api

Thank you
Jul 31, 2013 at 4:11 PM
HI, I have the same problem

but the erros occurs in:

test token (DropBoxTokenIssuer.exe)

or in .Open method:

Dim storageToken = dropBoxStorage.Open(dropBoxConfig, accessToken)

the link: http://stackoverflow.com/questions/9870751/uploading-to-dropbox-using-sharpbox-api
did'nt help.
Aug 13, 2013 at 1:00 PM
Edited Aug 13, 2013 at 1:02 PM
Greetings, everyone. I am trying to recursively retrieve all filenames from a dropbox folder (after going through the authentication process, of course). My application is supposed to have full access to the users' dropbox folder. For this, I use the following simple method:
        List<string> PollFileSystem(string folder)
        {
            Console.WriteLine("Entering " + folder);
            List<string> files = new List<string>();
            try
            {
                ICloudDirectoryEntry dir = DropBox.GetFolder(folder);
                foreach (ICloudFileSystemEntry file in dir)
                {
                    if (file is ICloudDirectoryEntry)
                    {
                        files.AddRange(PollFileSystem(folder + file.Name + "/"));
                    }
                    else
                    {
                        Console.WriteLine("Added " + folder + file.Name);
                        files.Add(folder + file.Name);
                    }
                }
            }
            catch (SharpBoxException e)
            {
                Console.WriteLine(e.Message);
            }
            return files;
        }
This a sample of the generated output from a call to PollFileSystem("/").
Entering /
Entering /Blender/
Added /Blender/19-05-12.blend
(...)
Entering /Blender/archive/
A first chance exception of type 'AppLimit.CloudComputing.SharpBox.Exceptions.SharpBoxException' occurred in AppLimit.CloudComputing.SharpBox.dll
Couldn't retrieve child elements from the server
Entering /Photos/
Added /Photos/How to use the Photos folder.txt
Entering /Photos/Sample Album/
A first chance exception of type 'AppLimit.CloudComputing.SharpBox.Exceptions.SharpBoxException' occurred in AppLimit.CloudComputing.SharpBox.dll
Couldn't retrieve child elements from the server
Entering /Practicum7/
Added /Practicum7/DirectMappedCache.java
(...)
Entering /Public/
Added /Public/How to use the Public folder.txt
Entering /Team 19/
Added /Team 19/15
(...)
As you can see, for some folders an exception is thrown, for others the children were found and added to the list (as would be expected). I cannot seem to grasp the pattern behind which folders throw the exceptions. After a few consecutive runs, the only conclusion I drew was it were always the same folders who's children could not be retrieved.